From 0860545368c146fa65e21b53e7e0529775fecda8 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 1 Feb 2024 10:00:58 -0800 Subject: [PATCH 01/18] test runs, more fields needed to be test --- keys/api_tsig.go | 1 + keys/model_keys_tsig_key.go | 2 + keys/test/api_tsig_test.go | 88 +++++++++++++++++++++++------------- keys/test/api_upload_test.go | 11 ++--- 4 files changed, 65 insertions(+), 37 deletions(-) diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 4386f89..327f290 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -13,6 +13,7 @@ package keys import ( "bytes" "context" + _ "github.com/infobloxopen/bloxone-go-client/dns_config" "io" "net/http" "net/url" diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 9ebb444..12c1ea5 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -13,6 +13,7 @@ package keys import ( "encoding/json" "time" + ) // checks if the KeysTSIGKey type satisfies the MappedNullable interface at compile time @@ -38,6 +39,7 @@ type KeysTSIGKey struct { Tags map[string]interface{} `json:"tags,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` + res interface{} } // NewKeysTSIGKey instantiates a new KeysTSIGKey object diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index c11a32a..31eee82 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -7,54 +7,76 @@ Testing TsigAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( "context" - "testing" - + "github.com/infobloxopen/bloxone-go-client/client" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "net/http" + "strings" + "testing" ) func Test_keys_TsigAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + rq := require.New(t) + c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) + rq.NoError(err) + apiClient := c.KeysAPI + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Comment: nil, // or use: String("This is a comment") + CreatedAt: nil, // or use: Time(time.Now()) + Id: nil, //openapiclient.PtrString("123"), + Name: "dummyKey36", + ProtocolName: nil, // or use: String("protocolName") + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + Tags: nil, //make(map[string]interface{}), + UpdatedAt: nil, // or use: Time(time.Now()) + } + var createResp *openapiclient.KeysCreateTSIGKeyResponse // replace with the actual type of resp + var httpRes *http.Response t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Execute() + //t.Skip("skip test") // remove to run test + ctx := context.Background() + req := apiClient.TsigAPI.TsigCreate(ctx) + req = req.Body(dummyKey) + createResp, httpRes, err = req.Execute() require.Nil(t, err) - require.NotNil(t, resp) + require.NotNil(t, createResp) assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string + t.Run("Test TsigAPIService TsigList", func(t *testing.T) { - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() + //t.Skip("skip test") // remove to run test + req := apiClient.TsigAPI.TsigList(context.Background()).Fields("name") + resp, httpRes, err := req.Execute() require.Nil(t, err) + require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigList", func(t *testing.T) { + t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.TsigAPI.TsigList(context.Background()).Execute() + var id string + id = *createResp.GetResult().Id + lastSlash := strings.LastIndex(id, "/") + uuid := string(id[lastSlash+1:]) + + req := apiClient.TsigAPI.TsigRead(context.Background(), uuid) + req.Fields("name") + resp, httpRes, err := req.Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -62,13 +84,17 @@ func Test_keys_TsigAPIService(t *testing.T) { }) - t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { + t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test var id string + id = *createResp.GetResult().Id + lastSlash := strings.LastIndex(id, "/") + uuid := id[lastSlash+1:] + req := apiClient.TsigAPI.TsigUpdate(context.Background(), uuid).Body(dummyKey) - resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Execute() + resp, httpRes, err := req.Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -76,16 +102,16 @@ func Test_keys_TsigAPIService(t *testing.T) { }) - t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test + t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Execute() + var id = *createResp.GetResult().Id + lastSlash := strings.LastIndex(id, "/") + uuid := string(id[lastSlash+1:]) + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), uuid).Execute() require.Nil(t, err) - require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) }) diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index f2cd257..220be43 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -11,19 +11,18 @@ package keys import ( "context" + "github.com/infobloxopen/bloxone-go-client/client" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) func Test_keys_UploadAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + rq := require.New(t) + c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) + rq.NoError(err) + apiClient := c.KeysAPI t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { From 698c3387a7620765b157d58b233ac3a8f93b41ea Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Tue, 13 Feb 2024 09:52:59 -0800 Subject: [PATCH 02/18] tests done, except for kerberos --- keys/.openapi-generator/FILES | 2 + keys/.openapi-generator/VERSION | 2 +- keys/test/api_generate_tsig_test.go | 62 ++++++-- keys/test/api_kerberos_test.go | 206 ++++++++++++++++++++----- keys/test/api_tsig_test.go | 231 ++++++++++++++++++---------- keys/test/api_upload_test.go | 68 ++++++-- 6 files changed, 418 insertions(+), 153 deletions(-) diff --git a/keys/.openapi-generator/FILES b/keys/.openapi-generator/FILES index 619bfc0..a5d04a4 100644 --- a/keys/.openapi-generator/FILES +++ b/keys/.openapi-generator/FILES @@ -40,4 +40,6 @@ model_keys_update_tsig_key_response.go model_protobuf_field_mask.go model_upload_content_type.go model_upload_request.go +test/api_generate_tsig_test.go +test/api_upload_test.go utils.go diff --git a/keys/.openapi-generator/VERSION b/keys/.openapi-generator/VERSION index 9fe9ff9..4b49d9b 100644 --- a/keys/.openapi-generator/VERSION +++ b/keys/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 +7.2.0 \ No newline at end of file diff --git a/keys/test/api_generate_tsig_test.go b/keys/test/api_generate_tsig_test.go index 3ea00f9..8f29e45 100644 --- a/keys/test/api_generate_tsig_test.go +++ b/keys/test/api_generate_tsig_test.go @@ -7,34 +7,62 @@ Testing GenerateTsigAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" + "encoding/json" "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -func Test_keys_GenerateTsigAPIService(t *testing.T) { +//type RoundTripFunc func(req *http.Request) *http.Response +// +//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { +// return f(req), nil +//} +// +//func NewTestClient(fn RoundTripFunc) *http.Client { +// return &http.Client{ +// Transport: RoundTripFunc(fn), +// } +//} +func Test_keys_GenerateTsigAPIService(t *testing.T) { configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test GenerateTsigAPIService GenerateTsigGenerateTSIG", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + dummyKey := openapiclient.KeysGenerateTSIGResult{ + Secret: openapiclient.PtrString("XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc="), + } + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/generate_tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + require.Equal(t, "hmac_sha256", req.URL.Query().Get("algorithm")) + response := openapiclient.KeysGenerateTSIGResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } }) - + apiClient := openapiclient.NewAPIClient(configuration) + request := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm("hmac_sha256") + response, httpRes, err := request.Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) + require.NotNil(t, response) + require.Equal(t, "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", *response.Result.Secret) } diff --git a/keys/test/api_kerberos_test.go b/keys/test/api_kerberos_test.go index 21283c8..6b54d87 100644 --- a/keys/test/api_kerberos_test.go +++ b/keys/test/api_kerberos_test.go @@ -7,75 +7,201 @@ Testing KerberosAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" + "encoding/json" "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -func Test_keys_KerberosAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { +//type RoundTripFunc func(req *http.Request) *http.Response +// +//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { +// return f(req), nil +//} +// +//func NewTestClient(fn RoundTripFunc) *http.Client { +// return &http.Client{ +// Transport: RoundTripFunc(fn), +// } +//} - t.Skip("skip test") // remove to run test +func Test_keys_KerberosAPIService(t *testing.T) { - var id string + t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { - httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() + t.Skip("skip test") + + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysReadKerberosKeyResponse{ + Result: &openapiclient.KerberosKey{ + Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), + Comment: openapiclient.PtrString("Test Kerberos Key"), + Id: nil, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), "dummyKey").Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test KerberosAPIService KerberosList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + t.Run("Test KerberosAPIService KerberosKeyList", func(t *testing.T) { + + t.Skip("skip test") + + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysListKerberosKeyResponse{ + Results: []openapiclient.KerberosKey{ + { + Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), + Comment: openapiclient.PtrString("Test Kerberos Key"), + Id: nil, + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.KerberosAPI.KerberosList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.NotEmpty(t, resp.Results) }) - t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Execute() + t.Run("Test KerberosAPIService KerberosUpdate", func(t *testing.T) { + t.Skip("skip test") + + dummyKey := openapiclient.KerberosKey{ + Algorithm: openapiclient.PtrString("RFC 3961"), + Comment: openapiclient.PtrString("Test Update Kerberos Key"), + Id: nil, + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KerberosKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysUpdateKerberosKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + updateRequest := apiClient.KerberosAPI.KerberosUpdate(context.Background(), "dummyKey").Body(dummyKey) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test KerberosAPIService KerberosUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Execute() - + t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { + + t.Skip("skip test") + + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysUpdateTSIGKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 200, httpRes.StatusCode) + }) + t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { + t.Skip("skip test") + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey36", req.URL.Path) + return &http.Response{ + StatusCode: 204, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: make(http.Header), + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), "dummyKey36").Execute() + require.Nil(t, err) + require.Equal(t, 204, httpRes.StatusCode) }) } diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index 31eee82..27e02c0 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -1,119 +1,182 @@ -/* -DDI Keys API - -Testing TsigAPIService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package keys_test import ( + "bytes" "context" - "github.com/infobloxopen/bloxone-go-client/client" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "io" "net/http" - "strings" "testing" ) -func Test_keys_TsigAPIService(t *testing.T) { - rq := require.New(t) - c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) - rq.NoError(err) - apiClient := c.KeysAPI - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Comment: nil, // or use: String("This is a comment") - CreatedAt: nil, // or use: Time(time.Now()) - Id: nil, //openapiclient.PtrString("123"), - Name: "dummyKey36", - ProtocolName: nil, // or use: String("protocolName") - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - Tags: nil, //make(map[string]interface{}), - UpdatedAt: nil, // or use: Time(time.Now()) - } - var createResp *openapiclient.KeysCreateTSIGKeyResponse // replace with the actual type of resp - var httpRes *http.Response +type RoundTripFunc func(req *http.Request) *http.Response - t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} - //t.Skip("skip test") // remove to run test +func NewTestClient(fn RoundTripFunc) *http.Client { + return &http.Client{ + Transport: RoundTripFunc(fn), + } +} - ctx := context.Background() - req := apiClient.TsigAPI.TsigCreate(ctx) - req = req.Body(dummyKey) - createResp, httpRes, err = req.Execute() +func Test_keys_TsigAPIService(t *testing.T) { + t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysCreateTSIGKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(dummyKey).Execute() require.Nil(t, err) - require.NotNil(t, createResp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigList", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - req := apiClient.TsigAPI.TsigList(context.Background()).Fields("name") - resp, httpRes, err := req.Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysListTSIGKeyResponse{ + Results: []openapiclient.KeysTSIGKey{ + { + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.TsigAPI.TsigList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.NotEmpty(t, resp.Results) }) t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - var id string - id = *createResp.GetResult().Id - lastSlash := strings.LastIndex(id, "/") - uuid := string(id[lastSlash+1:]) - - req := apiClient.TsigAPI.TsigRead(context.Background(), uuid) - req.Fields("name") - resp, httpRes, err := req.Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysListTSIGKeyResponse{ + Results: []openapiclient.KeysTSIGKey{ + { + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), "dummyKey36").Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - var id string - id = *createResp.GetResult().Id - lastSlash := strings.LastIndex(id, "/") - uuid := id[lastSlash+1:] - req := apiClient.TsigAPI.TsigUpdate(context.Background(), uuid).Body(dummyKey) - - resp, httpRes, err := req.Execute() - + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysUpdateTSIGKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - var id = *createResp.GetResult().Id - lastSlash := strings.LastIndex(id, "/") - uuid := string(id[lastSlash+1:]) - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), uuid).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + return &http.Response{ + StatusCode: 204, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: make(http.Header), + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), "dummyKey36").Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 204, httpRes.StatusCode) }) - } diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index 220be43..65676c8 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -7,33 +7,79 @@ Testing UploadAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( + "bytes" "context" - "github.com/infobloxopen/bloxone-go-client/client" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) func Test_keys_UploadAPIService(t *testing.T) { - rq := require.New(t) - c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) - rq.NoError(err) - apiClient := c.KeysAPI t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { + // Assuming that UploadRequest is the request body type for the UploadUpload API + dummyRequest := openapiclient.UploadRequest{ + Comment: openapiclient.PtrString("This is a test upload"), + Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 + //Fields: &openapiclient.ProtobufFieldMask{}, // Fill this as per your requirements + //Tags: map[string]interface{}{ + // "tag1": "value1", + // "tag2": "value2", + //}, + Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type + } - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/keys/upload", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + var reqBody openapiclient.UploadRequest + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyRequest, reqBody) - resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Execute() + response := openapiclient.DdiuploadResponse{ + KerberosKeys: &openapiclient.KerberosKeys{ + Items: []openapiclient.KerberosKey{ + { + Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), + Comment: openapiclient.PtrString("This is a test Kerberos key"), + Domain: openapiclient.PtrString("example.com"), + Id: openapiclient.PtrString("123"), + //Principal: openapiclient.PtrString("test_principal"), + //Tags: map[string]interface{}{"tag1": "value1", "tag2": "value2"}, + //UploadedAt: openapiclient.PtrString("2022-01-01T00:00:00Z"), + //Version: openapiclient.PtrInt64(1), + }, + }, + }, + Warning: openapiclient.PtrString("This is a test warning"), + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(dummyRequest).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) } From 36773af4ac045ea2b711f4d7b864a174911ee19b Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 15 Feb 2024 09:41:49 -0800 Subject: [PATCH 03/18] keys done, dns waiting --- dns_config/test/api_acl_test.go | 237 +++++++++++++--- dns_config/test/api_auth_nsg_test.go | 228 +++++++++++++--- dns_config/test/api_auth_zone_test.go | 255 ++++++++++++++---- dns_config/test/api_cache_flush_test.go | 59 ++-- .../test/api_convert_domain_name_test.go | 61 +++-- dns_config/test/api_convert_rname_test.go | 54 +++- dns_config/test/api_host_test.go | 144 ++++++++-- 7 files changed, 840 insertions(+), 198 deletions(-) diff --git a/dns_config/test/api_acl_test.go b/dns_config/test/api_acl_test.go index 46d107e..847e155 100644 --- a/dns_config/test/api_acl_test.go +++ b/dns_config/test/api_acl_test.go @@ -7,87 +7,244 @@ Testing AclAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" "testing" +) - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" +type RoundTripFunc func(req *http.Request) *http.Response - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" -) +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} -func Test_dns_config_AclAPIService(t *testing.T) { +func NewTestClient(fn RoundTripFunc) *http.Client { + return &http.Client{ + Transport: RoundTripFunc(fn), + } +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_AclAPIService(t *testing.T) { t.Run("Test AclAPIService AclCreate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AclAPI.AclCreate(context.Background()).Execute() + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - }) + var reqBody dns_config.ConfigACL + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyAcl, reqBody) - t.Run("Test AclAPIService AclDelete", func(t *testing.T) { + response := dns_config.ConfigCreateACLResponse{ + Result: &dummyAcl, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Skip("skip test") // remove to run test + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - var id string + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - httpRes, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + resp, httpRes, err := aclAPI.AclAPI.AclCreate(ctx).Body(dummyAcl).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test AclAPIService AclList", func(t *testing.T) { + t.Run("Test AclAPIService AclRead", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AclAPI.AclList(context.Background()).Execute() + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) - }) - - t.Run("Test AclAPIService AclRead", func(t *testing.T) { + response := dns_config.ConfigReadACLResponse{ + Result: &dummyAcl, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Skip("skip test") // remove to run test + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - var id string + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AclAPI.AclRead(context.Background(), id).Execute() + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + readRequest := aclAPI.AclAPI.AclRead(ctx, *dummyAcl.Id) + resp, httpRes, err := aclAPI.AclAPI.AclReadExecute(readRequest) require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAcl, *resp.Result) + }) + + t.Run("Test AclAPIService AclList", func(t *testing.T) { + //t.Skip("skip test") // remove to run test + + dummyAclList := []dns_config.ConfigACL{ + { + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId1"), + Name: "dummyAclName1", + }, + { + Comment: openapiclient.PtrString("This is another dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId2"), + Name: "dummyAclName2", + }, + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + + response := dns_config.ConfigListACLResponse{ + Results: dummyAclList, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + resp, httpRes, err := aclAPI.AclAPI.AclList(ctx).Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAclList, resp.Results) }) t.Run("Test AclAPIService AclUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test + + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } + + updatedAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), + Id: dummyAcl.Id, + Name: "updatedDummyAclName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + + response := dns_config.ConfigUpdateACLResponse{ + Result: &updatedAcl, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + updateRequest := aclAPI.AclAPI.AclUpdate(ctx, *dummyAcl.Id).Body(updatedAcl) + resp, httpRes, err := updateRequest.Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, updatedAcl, *resp.Result) + }) - var id string + t.Run("Test AclAPIService AclDelete", func(t *testing.T) { - resp, httpRes, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Execute() + //t.Skip("skip test") // remove to run test - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + httpRes, err := aclAPI.AclAPI.AclDelete(ctx, *dummyAcl.Id).Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_nsg_test.go b/dns_config/test/api_auth_nsg_test.go index 365aee3..97027a0 100644 --- a/dns_config/test/api_auth_nsg_test.go +++ b/dns_config/test/api_auth_nsg_test.go @@ -1,93 +1,237 @@ /* DNS Configuration API -Testing AuthNsgAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_AuthNsgAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + t.Run("Test AuthNesAPIService AuthNesCreate", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), + Id: openapiclient.PtrString("dummyAuthNesId"), + Name: "dummyAuthNesName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) - t.Run("Test AuthNsgAPIService AuthNsgCreate", func(t *testing.T) { + response := dns_config.ConfigCreateAuthNSGResponse{ + Result: &dummyAuthNsg, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Skip("skip test") // remove to run test + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authNesAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + createRequest := authNesAPI.AuthNsgAPI.AuthNsgCreate(ctx).Body(dummyAuthNsg) + resp, httpRes, err := createRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthNsg, *resp.Result) }) - t.Run("Test AuthNsgAPIService AuthNsgDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test + t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test - httpRes, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId"), + Name: "dummyAuthNsgName", + } - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) - }) + response := dns_config.ConfigReadAuthNSGResponse{ + Result: &dummyAuthNsg, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Execute() + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + readRequest := authNsgAPI.AuthNsgAPI.AuthNsgRead(ctx, *dummyAuthNsg.Id) + resp, httpRes, err := readRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthNsg, *resp.Result) }) - t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test + t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test + + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId"), + Name: "dummyAuthNsgName", + } + + updatedAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), + Id: dummyAuthNsg.Id, + Name: "updatedDummyAuthNsgName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + + response := dns_config.ConfigUpdateAuthNSGResponse{ + Result: &updatedAuthNsg, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + updateRequest := authNsgAPI.AuthNsgAPI.AuthNsgUpdate(ctx, *dummyAuthNsg.Id).Body(updatedAuthNsg) + resp, httpRes, err := updateRequest.Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, updatedAuthNsg, *resp.Result) + }) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Execute() + t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + //t.Skip("skip test") // remove to run test + + dummyAuthNsgList := []dns_config.ConfigAuthNSG{ + { + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId1"), + Name: "dummyAuthNsgName1", + }, + { + Comment: openapiclient.PtrString("This is another dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId2"), + Name: "dummyAuthNsgName2", + }, + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + + response := dns_config.ConfigListAuthNSGResponse{ + Results: dummyAuthNsgList, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + listRequest := authNsgAPI.AuthNsgAPI.AuthNsgList(ctx) + resp, httpRes, err := listRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthNsgList, resp.Results) }) - t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { + t.Run("Test AuthNsgAPIService AuthNsgDelete", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - var id string + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId"), + Name: "dummyAuthNsgName", + } - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Execute() + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + deleteRequest := authNsgAPI.AuthNsgAPI.AuthNsgDelete(ctx, *dummyAuthNsg.Id) + httpRes, err := deleteRequest.Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index bb3daaa..a03bc4c 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -1,105 +1,270 @@ /* DNS Configuration API -Testing AuthZoneAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_AuthZoneAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { + t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Execute() + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) - }) + response := dns_config.ConfigCreateAuthZoneResponse{ + Result: &dummyAuthZone, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { + return &http.Response{ + StatusCode: 201, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Execute() + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + createRequest := authZoneAPI.AuthZoneAPI.AuthZoneCreate(ctx).Body(dummyAuthZone) + resp, httpRes, err := createRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 201, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, *resp.Result) }) - t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { + t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigCopyAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + + dummyConfigCopyResponse := dns_config.ConfigCopyResponse{ + Description: openapiclient.PtrString("This is a copy of the dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyCopyId"), + JobId: openapiclient.PtrString("dummyJobId"), + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + //require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + + response := dns_config.ConfigCopyAuthZoneResponse{ + Result: &dummyConfigCopyResponse, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 201, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + copyRequest := authZoneAPI.AuthZoneAPI.AuthZoneCopy(ctx).Body(dummyAuthZone) + resp, httpRes, err := copyRequest.Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 201, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, *resp.Result) + }) - t.Skip("skip test") // remove to run test + t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test - httpRes, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) - }) + response := dns_config.ConfigReadAuthZoneResponse{ + Result: &dummyAuthZone, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Run("Test AuthZoneAPIService AuthZoneList", func(t *testing.T) { + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Execute() + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + readRequest := authZoneAPI.AuthZoneAPI.AuthZoneRead(ctx, *dummyAuthZone.Id) + resp, httpRes, err := readRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, *resp.Result) }) - t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { + t.Run("Test AuthZoneAPIService AuthZoneList", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) - t.Skip("skip test") // remove to run test + response := dns_config.ConfigListAuthZoneResponse{ + Results: []dns_config.ConfigAuthZone{dummyAuthZone}, + } + body, err := json.Marshal(response) + require.NoError(t, err) - var id string + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + listRequest := authZoneAPI.AuthZoneAPI.AuthZoneList(ctx) + resp, httpRes, err := listRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, resp.Results[0]) }) t.Run("Test AuthZoneAPIService AuthZoneUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + + updatedAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), + Id: dummyAuthZone.Id, + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + + response := dns_config.ConfigUpdateAuthZoneResponse{ + Result: &updatedAuthZone, + } + body, err := json.Marshal(response) + require.NoError(t, err) - var id string + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + updateRequest := authZoneAPI.AuthZoneAPI.AuthZoneUpdate(ctx, *dummyAuthZone.Id).Body(updatedAuthZone) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, updatedAuthZone, *resp.Result) + }) + + t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + httpRes, err := authZoneAPI.AuthZoneAPI.AuthZoneDelete(ctx, *dummyAuthZone.Id).Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_cache_flush_test.go b/dns_config/test/api_cache_flush_test.go index a7ee097..7558b84 100644 --- a/dns_config/test/api_cache_flush_test.go +++ b/dns_config/test/api_cache_flush_test.go @@ -1,40 +1,65 @@ /* DNS Configuration API -Testing CacheFlushAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_CacheFlushAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test CacheFlushAPIService CacheFlushCreate", func(t *testing.T) { + // Create a dummy CacheFlush object + dummyCacheFlush := dns_config.ConfigCacheFlush{ + FlushSubdomains: openapiclient.PtrBool(true), + Fqdn: openapiclient.PtrString("dummyFqdn"), + Ophid: openapiclient.PtrString("dummyOphid"), + ServiceId: openapiclient.PtrString("dummyServiceId"), + Ttl: openapiclient.PtrInt64(120), + ViewName: openapiclient.PtrString("dummyViewName"), + } - t.Skip("skip test") // remove to run test + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/cache_flush", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - resp, httpRes, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Execute() + var reqBody dns_config.ConfigCacheFlush + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyCacheFlush, reqBody) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - }) + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + cacheFlushAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + _, httpRes, err := cacheFlushAPI.CacheFlushAPI.CacheFlushCreate(ctx).Body(dummyCacheFlush).Execute() + require.Nil(t, err) + //require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + }) } diff --git a/dns_config/test/api_convert_domain_name_test.go b/dns_config/test/api_convert_domain_name_test.go index 108d68d..4d3b7ec 100644 --- a/dns_config/test/api_convert_domain_name_test.go +++ b/dns_config/test/api_convert_domain_name_test.go @@ -1,42 +1,63 @@ /* DNS Configuration API -Testing ConvertDomainNameAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_ConvertDomainNameAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test ConvertDomainNameAPIService ConvertDomainNameConvert", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var domainName string - - resp, httpRes, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() - + // Create a dummy domain name + dummyDomainName := "example.com" + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/convert_domain_name/"+dummyDomainName, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := dns_config.ConfigConvertDomainName{ + Idn: openapiclient.PtrString("example.com"), + Punycode: openapiclient.PtrString("xn--example-2ya.com"), + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + convertDomain := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + resp, httpRes, err := convertDomain.ConvertDomainNameAPI.ConvertDomainNameConvert(ctx, dummyDomainName).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Nil(t, resp.Result) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_convert_rname_test.go b/dns_config/test/api_convert_rname_test.go index 23ddedf..7f166c6 100644 --- a/dns_config/test/api_convert_rname_test.go +++ b/dns_config/test/api_convert_rname_test.go @@ -1,41 +1,69 @@ /* DNS Configuration API -Testing ConvertRnameAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" + "io" + "net/http" + "testing" ) func Test_dns_config_ConvertRnameAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test ConvertRnameAPIService ConvertRnameConvertRName", func(t *testing.T) { - t.Skip("skip test") // remove to run test + // Define a dummy email address + emailAddress := "test@example.com" + + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/convert_rname/"+emailAddress, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigConvertRNameResponse{ + Rname: openapiclient.PtrString("test.example.com."), + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - var emailAddress string + convertRename := dns_config.NewAPIClient(configuration) + ctx := context.Background() - resp, httpRes, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() + resp, httpRes, err := convertRename.ConvertRnameAPI.ConvertRnameConvertRName(ctx, emailAddress).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "test.example.com.", *resp.Rname) }) diff --git a/dns_config/test/api_host_test.go b/dns_config/test/api_host_test.go index 8965b8e..2950634 100644 --- a/dns_config/test/api_host_test.go +++ b/dns_config/test/api_host_test.go @@ -1,67 +1,169 @@ /* DNS Configuration API -Testing HostAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" + "io" + "net/http" + "testing" ) func Test_dns_config_HostAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test HostAPIService HostList", func(t *testing.T) { - t.Skip("skip test") // remove to run test - + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/host", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigListHostResponse{ + Results: []dns_config.ConfigHost{ + { + Id: openapiclient.PtrString("host1"), + AbsoluteName: openapiclient.PtrString("host1.example.com"), + }, + { + Id: openapiclient.PtrString("host2"), + AbsoluteName: openapiclient.PtrString("host2.example.com"), + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + // Create a new API client with the mock HTTP client + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + apiClient := dns_config.NewAPIClient(configuration) + + // Call the method and check the response resp, httpRes, err := apiClient.HostAPI.HostList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "host1", *resp.Results[0].Id) + assert.Equal(t, "host1.example.com", *resp.Results[0].AbsoluteName) + assert.Equal(t, "host2", *resp.Results[1].Id) + assert.Equal(t, "host2.example.com", *resp.Results[1].AbsoluteName) }) t.Run("Test HostAPIService HostRead", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigReadHostResponse{ + Result: &dns_config.ConfigHost{ + Id: openapiclient.PtrString("host1"), + AbsoluteName: openapiclient.PtrString("host1.example.com"), + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + // Create a new API client with the mock HTTP client + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + apiClient := dns_config.NewAPIClient(configuration) + + // Call the method and check the response + id := "host1" resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), id).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "host1", *resp.Result.Id) + assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) }) t.Run("Test HostAPIService HostUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Execute() + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigReadHostResponse{ + Result: &dns_config.ConfigHost{ + Id: openapiclient.PtrString("host1"), + AbsoluteName: openapiclient.PtrString("host1.example.com"), + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + // Create a new API client with the mock HTTP client + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + apiClient := dns_config.NewAPIClient(configuration) + + // Call the method and check the response + id := "host1" + hostUpdateInput := dns_config.ConfigHost{ + AbsoluteName: openapiclient.PtrString("host1.example.com"), + } + resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(hostUpdateInput).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "host1", *resp.Result.Id) + assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) }) From 742121d18e577855f51a1fcbb6b3bcce7584f466 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Sun, 25 Feb 2024 20:43:11 -0800 Subject: [PATCH 04/18] Complete unit tests for dns_data, dns_config, and keys modules --- dns_config/.openapi-generator-ignore | 3 + dns_config/.openapi-generator/FILES | 126 -------- dns_config/.openapi-generator/VERSION | 2 +- dns_config/docs/AclAPI.md | 164 +++++----- dns_config/docs/AuthNsgAPI.md | 164 +++++----- dns_config/docs/AuthZoneAPI.md | 202 ++++++------ dns_config/docs/CacheFlushAPI.md | 30 +- dns_config/docs/ConvertDomainNameAPI.md | 30 +- dns_config/docs/ConvertRnameAPI.md | 30 +- dns_config/docs/DelegationAPI.md | 164 +++++----- dns_config/docs/ForwardNsgAPI.md | 164 +++++----- dns_config/docs/ForwardZoneAPI.md | 194 +++++------ dns_config/docs/GlobalAPI.md | 124 +++---- dns_config/docs/HostAPI.md | 114 +++---- dns_config/docs/LbdnAPI.md | 164 +++++----- dns_config/docs/ServerAPI.md | 172 +++++----- dns_config/docs/ViewAPI.md | 202 ++++++------ dns_config/test/api_acl_test.go | 220 ++++--------- dns_config/test/api_auth_nsg_test.go | 224 +++++-------- dns_config/test/api_auth_zone_test.go | 269 ++++++---------- dns_config/test/api_cache_flush_test.go | 55 ++-- .../test/api_convert_domain_name_test.go | 43 +-- dns_config/test/api_convert_rname_test.go | 48 +-- dns_config/test/api_delegation_test.go | 176 +++++++--- dns_config/test/api_forward_nsg_test.go | 170 +++++++--- dns_config/test/api_forward_zone_test.go | 236 ++++++++++---- dns_config/test/api_global_test.go | 131 +++++--- dns_config/test/api_host_test.go | 140 +++----- dns_config/test/api_lbdn_test.go | 154 ++++++--- dns_config/test/api_server_test.go | 154 ++++++--- dns_config/test/api_view_test.go | 193 ++++++++--- dns_data/.openapi-generator/FILES | 1 + dns_data/.openapi-generator/VERSION | 2 +- dns_data/README.md | 24 +- dns_data/api_record.go | 256 ++++++++------- dns_data/docs/RecordAPI.md | 204 ++++++------ dns_data/model_data_create_record_response.go | 6 +- dns_data/model_data_list_record_response.go | 6 +- dns_data/model_data_read_record_response.go | 6 +- dns_data/model_data_record.go | 49 ++- dns_data/model_data_record_inheritance.go | 6 +- ...model_data_soa_serial_increment_request.go | 6 +- ...odel_data_soa_serial_increment_response.go | 6 +- dns_data/model_data_update_record_response.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_data/model_protobuf_field_mask.go | 6 +- dns_data/test/api_record_test.go | 189 +++++++---- internal/utils.go | 14 + keys/.openapi-generator/FILES | 1 - keys/README.md | 25 +- keys/api_generate_tsig.go | 34 +- keys/api_kerberos.go | 302 +++++++++++++----- keys/api_tsig.go | 206 ++++++------ keys/api_upload.go | 34 +- keys/client.go | 14 +- keys/docs/GenerateTsigAPI.md | 30 +- keys/docs/KerberosAPI.md | 199 ++++++++---- keys/docs/TsigAPI.md | 164 +++++----- keys/docs/UploadAPI.md | 30 +- keys/model_ddiupload_response.go | 6 +- keys/model_kerberos_key.go | 6 +- keys/model_kerberos_keys.go | 6 +- keys/model_keys_create_tsig_key_response.go | 6 +- keys/model_keys_generate_tsig_response.go | 6 +- keys/model_keys_generate_tsig_result.go | 6 +- keys/model_keys_list_kerberos_key_response.go | 6 +- keys/model_keys_list_tsig_key_response.go | 6 +- keys/model_keys_read_kerberos_key_response.go | 6 +- keys/model_keys_read_tsig_key_response.go | 6 +- keys/model_keys_tsig_key.go | 50 ++- ...model_keys_update_kerberos_key_response.go | 6 +- keys/model_keys_update_tsig_key_response.go | 6 +- keys/model_protobuf_field_mask.go | 6 +- keys/model_upload_content_type.go | 5 +- keys/model_upload_request.go | 54 +++- keys/test/api_generate_tsig_test.go | 66 ++-- keys/test/api_kerberos_test.go | 188 ++++------- keys/test/api_tsig_test.go | 175 +++++----- keys/test/api_upload_test.go | 57 +--- keys/utils.go | 2 +- 80 files changed, 3606 insertions(+), 3163 deletions(-) diff --git a/dns_config/.openapi-generator-ignore b/dns_config/.openapi-generator-ignore index 7484ee5..9d89018 100644 --- a/dns_config/.openapi-generator-ignore +++ b/dns_config/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +*.go +*.md +!api*test.go diff --git a/dns_config/.openapi-generator/FILES b/dns_config/.openapi-generator/FILES index c1b1372..4279035 100644 --- a/dns_config/.openapi-generator/FILES +++ b/dns_config/.openapi-generator/FILES @@ -1,19 +1,3 @@ -README.md -api_acl.go -api_auth_nsg.go -api_auth_zone.go -api_cache_flush.go -api_convert_domain_name.go -api_convert_rname.go -api_delegation.go -api_forward_nsg.go -api_forward_zone.go -api_global.go -api_host.go -api_lbdn.go -api_server.go -api_view.go -client.go docs/AclAPI.md docs/AuthNsgAPI.md docs/AuthZoneAPI.md @@ -137,113 +121,3 @@ docs/Inheritance2InheritedUInt32.md docs/LbdnAPI.md docs/ServerAPI.md docs/ViewAPI.md -model_auth_zone_external_provider.go -model_config_acl.go -model_config_acl_item.go -model_config_auth_nsg.go -model_config_auth_zone.go -model_config_auth_zone_config.go -model_config_auth_zone_inheritance.go -model_config_bulk_copy_error.go -model_config_bulk_copy_response.go -model_config_bulk_copy_view.go -model_config_cache_flush.go -model_config_convert_domain_name.go -model_config_convert_domain_name_response.go -model_config_convert_r_name_response.go -model_config_copy_auth_zone.go -model_config_copy_auth_zone_response.go -model_config_copy_forward_zone.go -model_config_copy_forward_zone_response.go -model_config_copy_response.go -model_config_create_acl_response.go -model_config_create_auth_nsg_response.go -model_config_create_auth_zone_response.go -model_config_create_delegation_response.go -model_config_create_forward_nsg_response.go -model_config_create_forward_zone_response.go -model_config_create_lbdn_response.go -model_config_create_server_response.go -model_config_create_view_response.go -model_config_custom_root_ns_block.go -model_config_delegation.go -model_config_delegation_server.go -model_config_display_view.go -model_config_dnssec_validation_block.go -model_config_dtc_config.go -model_config_dtc_policy.go -model_config_ecs_block.go -model_config_ecs_zone.go -model_config_external_primary.go -model_config_external_secondary.go -model_config_forward_nsg.go -model_config_forward_zone.go -model_config_forward_zone_config.go -model_config_forwarder.go -model_config_forwarders_block.go -model_config_global.go -model_config_host.go -model_config_host_associated_server.go -model_config_host_inheritance.go -model_config_inherited_acl_items.go -model_config_inherited_custom_root_ns_block.go -model_config_inherited_dnssec_validation_block.go -model_config_inherited_dtc_config.go -model_config_inherited_ecs_block.go -model_config_inherited_forwarders_block.go -model_config_inherited_kerberos_keys.go -model_config_inherited_sort_list_items.go -model_config_inherited_zone_authority.go -model_config_inherited_zone_authority_m_name_block.go -model_config_internal_secondary.go -model_config_kerberos_key.go -model_config_lbdn.go -model_config_list_acl_response.go -model_config_list_auth_nsg_response.go -model_config_list_auth_zone_response.go -model_config_list_delegation_response.go -model_config_list_forward_nsg_response.go -model_config_list_forward_zone_response.go -model_config_list_host_response.go -model_config_list_lbdn_response.go -model_config_list_server_response.go -model_config_list_view_response.go -model_config_read_acl_response.go -model_config_read_auth_nsg_response.go -model_config_read_auth_zone_response.go -model_config_read_delegation_response.go -model_config_read_forward_nsg_response.go -model_config_read_forward_zone_response.go -model_config_read_global_response.go -model_config_read_host_response.go -model_config_read_lbdn_response.go -model_config_read_server_response.go -model_config_read_view_response.go -model_config_root_ns.go -model_config_server.go -model_config_server_inheritance.go -model_config_sort_list_item.go -model_config_trust_anchor.go -model_config_tsig_key.go -model_config_ttl_inheritance.go -model_config_update_acl_response.go -model_config_update_auth_nsg_response.go -model_config_update_auth_zone_response.go -model_config_update_delegation_response.go -model_config_update_forward_nsg_response.go -model_config_update_forward_zone_response.go -model_config_update_global_response.go -model_config_update_host_response.go -model_config_update_lbdn_response.go -model_config_update_server_response.go -model_config_update_view_response.go -model_config_view.go -model_config_view_inheritance.go -model_config_warning.go -model_config_zone_authority.go -model_config_zone_authority_m_name_block.go -model_inheritance2_assigned_host.go -model_inheritance2_inherited_bool.go -model_inheritance2_inherited_string.go -model_inheritance2_inherited_u_int32.go -utils.go diff --git a/dns_config/.openapi-generator/VERSION b/dns_config/.openapi-generator/VERSION index 73a86b1..4b49d9b 100644 --- a/dns_config/.openapi-generator/VERSION +++ b/dns_config/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.2.0 \ No newline at end of file diff --git a/dns_config/docs/AclAPI.md b/dns_config/docs/AclAPI.md index cb8cd18..2186694 100644 --- a/dns_config/docs/AclAPI.md +++ b/dns_config/docs/AclAPI.md @@ -26,24 +26,24 @@ Create the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclCreate`: ConfigCreateACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclCreate`: %v\n", resp) + body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclCreate`: ConfigCreateACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the ACL object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List ACL objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclList`: ConfigListACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclList`: ConfigListACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclRead`: ConfigReadACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclRead`: ConfigReadACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclUpdate`: ConfigUpdateACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclUpdate`: ConfigUpdateACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/AuthNsgAPI.md b/dns_config/docs/AuthNsgAPI.md index c121ebd..57a9e46 100644 --- a/dns_config/docs/AuthNsgAPI.md +++ b/dns_config/docs/AuthNsgAPI.md @@ -26,24 +26,24 @@ Create the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgCreate`: ConfigCreateAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgCreate`: %v\n", resp) + body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgCreate`: ConfigCreateAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the AuthNSG object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List AuthNSG objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgList`: ConfigListAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgList`: ConfigListAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgRead`: ConfigReadAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgRead`: ConfigReadAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgUpdate`: ConfigUpdateAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgUpdate`: ConfigUpdateAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/AuthZoneAPI.md b/dns_config/docs/AuthZoneAPI.md index 041d137..3191123 100644 --- a/dns_config/docs/AuthZoneAPI.md +++ b/dns_config/docs/AuthZoneAPI.md @@ -27,24 +27,24 @@ Copies the __AuthZone__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCopyAuthZone("TargetView_example") // ConfigCopyAuthZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneCopy`: ConfigCopyAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCopy`: %v\n", resp) + body := *openapiclient.NewConfigCopyAuthZone("TargetView_example") // ConfigCopyAuthZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneCopy`: ConfigCopyAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCopy`: %v\n", resp) } ``` @@ -93,25 +93,25 @@ Create the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneCreate`: ConfigCreateAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCreate`: %v\n", resp) + body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneCreate`: ConfigCreateAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCreate`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Moves the AuthZone object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,32 +229,32 @@ List AuthZone objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneList`: ConfigListAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneList`: ConfigListAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneList`: %v\n", resp) } ``` @@ -311,26 +311,26 @@ Read the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneRead`: ConfigReadAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneRead`: ConfigReadAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneRead`: %v\n", resp) } ``` @@ -385,26 +385,26 @@ Update the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneUpdate`: ConfigUpdateAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneUpdate`: ConfigUpdateAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/CacheFlushAPI.md b/dns_config/docs/CacheFlushAPI.md index 7bc0fa2..9354a5f 100644 --- a/dns_config/docs/CacheFlushAPI.md +++ b/dns_config/docs/CacheFlushAPI.md @@ -22,24 +22,24 @@ Create the Cache Flush object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCacheFlush() // ConfigCacheFlush | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CacheFlushAPI.CacheFlushCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CacheFlushCreate`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `CacheFlushAPI.CacheFlushCreate`: %v\n", resp) + body := *openapiclient.NewConfigCacheFlush() // ConfigCacheFlush | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CacheFlushAPI.CacheFlushCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CacheFlushCreate`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `CacheFlushAPI.CacheFlushCreate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ConvertDomainNameAPI.md b/dns_config/docs/ConvertDomainNameAPI.md index 9843f03..cb6e7c9 100644 --- a/dns_config/docs/ConvertDomainNameAPI.md +++ b/dns_config/docs/ConvertDomainNameAPI.md @@ -22,24 +22,24 @@ Convert the object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - domainName := "domainName_example" // string | Input domain name in either of IDN or punycode representations. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConvertDomainNameAPI.ConvertDomainNameConvert``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ConvertDomainNameConvert`: ConfigConvertDomainNameResponse - fmt.Fprintf(os.Stdout, "Response from `ConvertDomainNameAPI.ConvertDomainNameConvert`: %v\n", resp) + domainName := "domainName_example" // string | Input domain name in either of IDN or punycode representations. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConvertDomainNameAPI.ConvertDomainNameConvert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConvertDomainNameConvert`: ConfigConvertDomainNameResponse + fmt.Fprintf(os.Stdout, "Response from `ConvertDomainNameAPI.ConvertDomainNameConvert`: %v\n", resp) } ``` diff --git a/dns_config/docs/ConvertRnameAPI.md b/dns_config/docs/ConvertRnameAPI.md index a7f16be..226ce47 100644 --- a/dns_config/docs/ConvertRnameAPI.md +++ b/dns_config/docs/ConvertRnameAPI.md @@ -22,24 +22,24 @@ Convert the object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - emailAddress := "emailAddress_example" // string | Input email address. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConvertRnameAPI.ConvertRnameConvertRName``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ConvertRnameConvertRName`: ConfigConvertRNameResponse - fmt.Fprintf(os.Stdout, "Response from `ConvertRnameAPI.ConvertRnameConvertRName`: %v\n", resp) + emailAddress := "emailAddress_example" // string | Input email address. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConvertRnameAPI.ConvertRnameConvertRName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConvertRnameConvertRName`: ConfigConvertRNameResponse + fmt.Fprintf(os.Stdout, "Response from `ConvertRnameAPI.ConvertRnameConvertRName`: %v\n", resp) } ``` diff --git a/dns_config/docs/DelegationAPI.md b/dns_config/docs/DelegationAPI.md index 0139c9d..5921d77 100644 --- a/dns_config/docs/DelegationAPI.md +++ b/dns_config/docs/DelegationAPI.md @@ -26,24 +26,24 @@ Create the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigDelegation() // ConfigDelegation | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationCreate`: ConfigCreateDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationCreate`: %v\n", resp) + body := *openapiclient.NewConfigDelegation() // ConfigDelegation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationCreate`: ConfigCreateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Moves the Delegation object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List Delegation objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationList`: ConfigListDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationList`: ConfigListDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationRead`: ConfigReadDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationRead`: ConfigReadDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigDelegation() // ConfigDelegation | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationUpdate`: ConfigUpdateDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigDelegation() // ConfigDelegation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationUpdate`: ConfigUpdateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ForwardNsgAPI.md b/dns_config/docs/ForwardNsgAPI.md index ccf787f..a887b7e 100644 --- a/dns_config/docs/ForwardNsgAPI.md +++ b/dns_config/docs/ForwardNsgAPI.md @@ -26,24 +26,24 @@ Create the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgCreate`: ConfigCreateForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgCreate`: %v\n", resp) + body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgCreate`: ConfigCreateForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the ForwardNSG object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List ForwardNSG objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgList`: ConfigListForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgList`: ConfigListForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgRead`: ConfigReadForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgRead`: ConfigReadForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgUpdate`: ConfigUpdateForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgUpdate`: ConfigUpdateForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ForwardZoneAPI.md b/dns_config/docs/ForwardZoneAPI.md index ae7ff8b..746faaa 100644 --- a/dns_config/docs/ForwardZoneAPI.md +++ b/dns_config/docs/ForwardZoneAPI.md @@ -27,24 +27,24 @@ Copies the __ForwardZone__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCopyForwardZone("TargetView_example") // ConfigCopyForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneCopy`: ConfigCopyForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCopy`: %v\n", resp) + body := *openapiclient.NewConfigCopyForwardZone("TargetView_example") // ConfigCopyForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneCopy`: ConfigCopyForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCopy`: %v\n", resp) } ``` @@ -93,24 +93,24 @@ Create the ForwardZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneCreate`: ConfigCreateForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCreate`: %v\n", resp) + body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneCreate`: ConfigCreateForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCreate`: %v\n", resp) } ``` @@ -159,22 +159,22 @@ Move the Forward Zone object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -227,31 +227,31 @@ List Forward Zone objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneList`: ConfigListForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneList`: ConfigListForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneList`: %v\n", resp) } ``` @@ -307,25 +307,25 @@ Read the Forward Zone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneRead`: ConfigReadForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneRead`: ConfigReadForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneRead`: %v\n", resp) } ``` @@ -379,25 +379,25 @@ Update the Forward Zone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneUpdate`: ConfigUpdateForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneUpdate`: ConfigUpdateForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/GlobalAPI.md b/dns_config/docs/GlobalAPI.md index 6dd47b5..da7aac9 100644 --- a/dns_config/docs/GlobalAPI.md +++ b/dns_config/docs/GlobalAPI.md @@ -25,24 +25,24 @@ Read the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead`: ConfigReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead`: ConfigReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) } ``` @@ -91,25 +91,25 @@ Read the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead2`: ConfigReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead2`: ConfigReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) } ``` @@ -163,24 +163,24 @@ Update the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate`: ConfigUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) + body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate`: ConfigUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) } ``` @@ -229,25 +229,25 @@ Update the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate2`: ConfigUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate2`: ConfigUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) } ``` diff --git a/dns_config/docs/HostAPI.md b/dns_config/docs/HostAPI.md index c6433fa..897dc01 100644 --- a/dns_config/docs/HostAPI.md +++ b/dns_config/docs/HostAPI.md @@ -24,32 +24,32 @@ List DNS Host objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostList`: ConfigListHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostList`: ConfigListHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostList`: %v\n", resp) } ``` @@ -106,26 +106,26 @@ Read the DNS Host object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostRead`: ConfigReadHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostRead`: ConfigReadHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostRead`: %v\n", resp) } ``` @@ -180,26 +180,26 @@ Update the DNS Host object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigHost() // ConfigHost | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostUpdate`: ConfigUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigHost() // ConfigHost | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostUpdate`: ConfigUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/LbdnAPI.md b/dns_config/docs/LbdnAPI.md index e21786e..cd45642 100644 --- a/dns_config/docs/LbdnAPI.md +++ b/dns_config/docs/LbdnAPI.md @@ -26,24 +26,24 @@ Create the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnCreate`: ConfigCreateLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnCreate`: %v\n", resp) + body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnCreate`: ConfigCreateLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List __LBDN__ objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnList`: ConfigListLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnList`: ConfigListLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnRead`: ConfigReadLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnRead`: ConfigReadLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnUpdate`: ConfigUpdateLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnUpdate`: ConfigUpdateLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ServerAPI.md b/dns_config/docs/ServerAPI.md index 3413e39..4b8e307 100644 --- a/dns_config/docs/ServerAPI.md +++ b/dns_config/docs/ServerAPI.md @@ -26,25 +26,25 @@ Create the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerCreate`: ConfigCreateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) + body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerCreate`: ConfigCreateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the Server object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ List Server objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerList`: ConfigListServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerList`: ConfigListServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Read the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerRead`: ConfigReadServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerRead`: ConfigReadServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerUpdate`: ConfigUpdateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerUpdate`: ConfigUpdateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ViewAPI.md b/dns_config/docs/ViewAPI.md index 88cb110..c3106ba 100644 --- a/dns_config/docs/ViewAPI.md +++ b/dns_config/docs/ViewAPI.md @@ -27,24 +27,24 @@ Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigBulkCopyView([]string{"Resources_example"}, "Target_example") // ConfigBulkCopyView | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewBulkCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewBulkCopy`: ConfigBulkCopyResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewBulkCopy`: %v\n", resp) + body := *openapiclient.NewConfigBulkCopyView([]string{"Resources_example"}, "Target_example") // ConfigBulkCopyView | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewBulkCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewBulkCopy`: ConfigBulkCopyResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewBulkCopy`: %v\n", resp) } ``` @@ -93,25 +93,25 @@ Create the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigView("Name_example") // ConfigView | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewCreate`: ConfigCreateViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewCreate`: %v\n", resp) + body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewCreate`: ConfigCreateViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewCreate`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Move the View object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,32 +229,32 @@ List View objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewList`: ConfigListViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewList`: ConfigListViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewList`: %v\n", resp) } ``` @@ -311,26 +311,26 @@ Read the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewRead`: ConfigReadViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewRead`: ConfigReadViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewRead`: %v\n", resp) } ``` @@ -385,26 +385,26 @@ Update the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigView("Name_example") // ConfigView | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewUpdate`: ConfigUpdateViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewUpdate`: ConfigUpdateViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewUpdate`: %v\n", resp) } ``` diff --git a/dns_config/test/api_acl_test.go b/dns_config/test/api_acl_test.go index 847e155..1ff4711 100644 --- a/dns_config/test/api_acl_test.go +++ b/dns_config/test/api_acl_test.go @@ -13,238 +13,150 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -type RoundTripFunc func(req *http.Request) *http.Response + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" +) -func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { - return f(req), nil +var dns_config_Post = openapiclient.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", } -func NewTestClient(fn RoundTripFunc) *http.Client { - return &http.Client{ - Transport: RoundTripFunc(fn), - } +var dns_config_Patch = openapiclient.ConfigACL{ + Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), + Id: dns_config_Post.Id, + Name: "updatedDummyAclName", } func Test_dns_config_AclAPIService(t *testing.T) { t.Run("Test AclAPIService AclCreate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) - var reqBody dns_config.ConfigACL + var reqBody openapiclient.ConfigACL require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyAcl, reqBody) + require.Equal(t, dns_config_Post, reqBody) - response := dns_config.ConfigCreateACLResponse{ - Result: &dummyAcl, - } + response := openapiclient.ConfigCreateACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := aclAPI.AclAPI.AclCreate(ctx).Body(dummyAcl).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclCreate(context.Background()).Body(dns_config_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AclAPIService AclRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + t.Run("Test AclAPIService AclList", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigReadACLResponse{ - Result: &dummyAcl, - } + response := openapiclient.ConfigListACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - readRequest := aclAPI.AclAPI.AclRead(ctx, *dummyAcl.Id) - resp, httpRes, err := aclAPI.AclAPI.AclReadExecute(readRequest) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAcl, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AclAPIService AclList", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAclList := []dns_config.ConfigACL{ - { - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId1"), - Name: "dummyAclName1", - }, - { - Comment: openapiclient.PtrString("This is another dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId2"), - Name: "dummyAclName2", - }, - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + t.Run("Test AclAPIService AclRead", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigListACLResponse{ - Results: dummyAclList, - } + response := openapiclient.ConfigReadACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := aclAPI.AclAPI.AclList(ctx).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclRead(context.Background(), *dns_config_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAclList, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AclAPIService AclUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - updatedAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), - Id: dummyAcl.Id, - Name: "updatedDummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + var reqBody openapiclient.ConfigACL + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dns_config_Patch, reqBody) - response := dns_config.ConfigUpdateACLResponse{ - Result: &updatedAcl, - } + response := openapiclient.ConfigUpdateACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - updateRequest := aclAPI.AclAPI.AclUpdate(ctx, *dummyAcl.Id).Body(updatedAcl) - resp, httpRes, err := updateRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclUpdate(context.Background(), *dns_config_Patch.Id).Body(dns_config_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, updatedAcl, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AclAPIService AclDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - httpRes, err := aclAPI.AclAPI.AclDelete(ctx, *dummyAcl.Id).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AclAPI.AclDelete(context.Background(), *dns_config_Post.Id).Execute() require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_nsg_test.go b/dns_config/test/api_auth_nsg_test.go index 97027a0..621306d 100644 --- a/dns_config/test/api_auth_nsg_test.go +++ b/dns_config/test/api_auth_nsg_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing AuthNsgAPIService */ @@ -13,225 +13,149 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -func Test_dns_config_AuthNsgAPIService(t *testing.T) { + "github.com/stretchr/testify/require" - t.Run("Test AuthNesAPIService AuthNesCreate", func(t *testing.T) { + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" +) - //t.Skip("skip test") // remove to run test +var ConfigAuthNSG_Post = openapiclient.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), + Id: openapiclient.PtrString("dummyAuthNesId"), + Name: "dummyAuthNesName", +} +var ConfigAuthNSG_Patch = openapiclient.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), + Id: ConfigAuthNSG_Post.Id, + Name: "updatedDummyAuthNsgName", +} - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), - Id: openapiclient.PtrString("dummyAuthNesId"), - Name: "dummyAuthNesName", - } +func Test_dns_config_AuthNsgAPIService(t *testing.T) { - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + t.Run("Test AuthNsgAPIService AuthNsgCreate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - response := dns_config.ConfigCreateAuthNSGResponse{ - Result: &dummyAuthNsg, - } + var reqBody openapiclient.ConfigAuthNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthNSG_Post, reqBody) + + response := openapiclient.ConfigCreateAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNesAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - createRequest := authNesAPI.AuthNsgAPI.AuthNsgCreate(ctx).Body(dummyAuthNsg) - resp, httpRes, err := createRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(ConfigAuthNSG_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthNsg, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId"), - Name: "dummyAuthNsgName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigReadAuthNSGResponse{ - Result: &dummyAuthNsg, - } + response := openapiclient.ConfigListAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - readRequest := authNsgAPI.AuthNsgAPI.AuthNsgRead(ctx, *dummyAuthNsg.Id) - resp, httpRes, err := readRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthNsg, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId"), - Name: "dummyAuthNsgName", - } - - updatedAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), - Id: dummyAuthNsg.Id, - Name: "updatedDummyAuthNsgName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigUpdateAuthNSGResponse{ - Result: &updatedAuthNsg, - } + response := openapiclient.ConfigReadAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - updateRequest := authNsgAPI.AuthNsgAPI.AuthNsgUpdate(ctx, *dummyAuthNsg.Id).Body(updatedAuthNsg) - resp, httpRes, err := updateRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), *ConfigAuthNSG_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, updatedAuthNsg, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - //t.Skip("skip test") // remove to run test - - dummyAuthNsgList := []dns_config.ConfigAuthNSG{ - { - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId1"), - Name: "dummyAuthNsgName1", - }, - { - Comment: openapiclient.PtrString("This is another dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId2"), - Name: "dummyAuthNsgName2", - }, - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + var reqBody openapiclient.ConfigAuthNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthNSG_Patch, reqBody) - response := dns_config.ConfigListAuthNSGResponse{ - Results: dummyAuthNsgList, - } + response := openapiclient.ConfigUpdateAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - listRequest := authNsgAPI.AuthNsgAPI.AuthNsgList(ctx) - resp, httpRes, err := listRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), *ConfigAuthNSG_Patch.Id).Body(ConfigAuthNSG_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthNsgList, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AuthNsgAPIService AuthNsgDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId"), - Name: "dummyAuthNsgName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - deleteRequest := authNsgAPI.AuthNsgAPI.AuthNsgDelete(ctx, *dummyAuthNsg.Id) - httpRes, err := deleteRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), *ConfigAuthNSG_Post.Id).Execute() require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index a03bc4c..5c83e21 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing AuthZoneAPIService */ @@ -13,258 +13,179 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -func Test_dns_config_AuthZoneAPIService(t *testing.T) { + "github.com/stretchr/testify/require" - t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" +) + +var ConfigCopyAuthZone_Post = openapiclient.ConfigCopyAuthZone{ + Comment: openapiclient.PtrString("This is a copyping AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), +} +var ConfigAuthZone_Post = openapiclient.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), +} +var ConfigAuthZone_Patch = openapiclient.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), + Id: ConfigAuthZone_Post.Id, +} - //t.Skip("skip test") // remove to run test +func Test_dns_config_AuthZoneAPIService(t *testing.T) { - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } + t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) + var reqBody openapiclient.ConfigCopyAuthZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigCopyAuthZone_Post, reqBody) - response := dns_config.ConfigCreateAuthZoneResponse{ - Result: &dummyAuthZone, - } + response := openapiclient.ConfigCopyAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 201, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - createRequest := authZoneAPI.AuthZoneAPI.AuthZoneCreate(ctx).Body(dummyAuthZone) - resp, httpRes, err := createRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(ConfigCopyAuthZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 201, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigCopyAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - dummyConfigCopyResponse := dns_config.ConfigCopyResponse{ - Description: openapiclient.PtrString("This is a copy of the dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyCopyId"), - JobId: openapiclient.PtrString("dummyJobId"), - } + t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) - //require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + var reqBody openapiclient.ConfigAuthZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthZone_Post, reqBody) - response := dns_config.ConfigCopyAuthZoneResponse{ - Result: &dummyConfigCopyResponse, - } + response := openapiclient.ConfigCreateAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 201, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - copyRequest := authZoneAPI.AuthZoneAPI.AuthZoneCopy(ctx).Body(dummyAuthZone) - resp, httpRes, err := copyRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(ConfigAuthZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 201, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) - - response := dns_config.ConfigReadAuthZoneResponse{ - Result: &dummyAuthZone, - } - body, err := json.Marshal(response) - require.NoError(t, err) + t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) return &http.Response{ - StatusCode: 200, - Body: io.NopCloser(bytes.NewReader(body)), + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - readRequest := authZoneAPI.AuthZoneAPI.AuthZoneRead(ctx, *dummyAuthZone.Id) - resp, httpRes, err := readRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), *ConfigAuthZone_Post.Id).Execute() require.Nil(t, err) - require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AuthZoneAPIService AuthZoneList", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigListAuthZoneResponse{ - Results: []dns_config.ConfigAuthZone{dummyAuthZone}, - } + response := openapiclient.ConfigListAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - listRequest := authZoneAPI.AuthZoneAPI.AuthZoneList(ctx) - resp, httpRes, err := listRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, resp.Results[0]) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneUpdate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - updatedAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), - Id: dummyAuthZone.Id, - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigUpdateAuthZoneResponse{ - Result: &updatedAuthZone, - } + response := openapiclient.ConfigReadAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - updateRequest := authZoneAPI.AuthZoneAPI.AuthZoneUpdate(ctx, *dummyAuthZone.Id).Body(updatedAuthZone) - resp, httpRes, err := updateRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), *ConfigAuthZone_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, updatedAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test + t.Run("Test AuthZoneAPIService AuthZoneUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } + var reqBody openapiclient.ConfigAuthZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthZone_Patch, reqBody) - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + response := openapiclient.ConfigUpdateAuthZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) return &http.Response{ - StatusCode: 200, - Body: io.NopCloser(bytes.NewReader([]byte{})), + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - httpRes, err := authZoneAPI.AuthZoneAPI.AuthZoneDelete(ctx, *dummyAuthZone.Id).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), *ConfigAuthZone_Patch.Id).Body(ConfigAuthZone_Patch).Execute() require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) + require.NotNil(t, resp) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_cache_flush_test.go b/dns_config/test/api_cache_flush_test.go index 7558b84..58a35a0 100644 --- a/dns_config/test/api_cache_flush_test.go +++ b/dns_config/test/api_cache_flush_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing CacheFlushAPIService */ @@ -13,53 +13,48 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var ConfigCacheFlush_Post = openapiclient.ConfigCacheFlush{ + FlushSubdomains: openapiclient.PtrBool(true), + Fqdn: openapiclient.PtrString("dummyFqdn"), + Ophid: openapiclient.PtrString("dummyOphid"), + ServiceId: openapiclient.PtrString("dummyServiceId"), + Ttl: openapiclient.PtrInt64(120), + ViewName: openapiclient.PtrString("dummyViewName"), +} + func Test_dns_config_CacheFlushAPIService(t *testing.T) { t.Run("Test CacheFlushAPIService CacheFlushCreate", func(t *testing.T) { - // Create a dummy CacheFlush object - dummyCacheFlush := dns_config.ConfigCacheFlush{ - FlushSubdomains: openapiclient.PtrBool(true), - Fqdn: openapiclient.PtrString("dummyFqdn"), - Ophid: openapiclient.PtrString("dummyOphid"), - ServiceId: openapiclient.PtrString("dummyServiceId"), - Ttl: openapiclient.PtrInt64(120), - ViewName: openapiclient.PtrString("dummyViewName"), - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/dns/cache_flush", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) - var reqBody dns_config.ConfigCacheFlush + var reqBody openapiclient.ConfigCacheFlush require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyCacheFlush, reqBody) + require.Equal(t, ConfigCacheFlush_Post, reqBody) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - cacheFlushAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - _, httpRes, err := cacheFlushAPI.CacheFlushAPI.CacheFlushCreate(ctx).Body(dummyCacheFlush).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + _, httpRes, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(ConfigCacheFlush_Post).Execute() require.Nil(t, err) - //require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) + } diff --git a/dns_config/test/api_convert_domain_name_test.go b/dns_config/test/api_convert_domain_name_test.go index 4d3b7ec..5df948e 100644 --- a/dns_config/test/api_convert_domain_name_test.go +++ b/dns_config/test/api_convert_domain_name_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing ConvertDomainNameAPIService */ @@ -13,51 +13,42 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var domainName = "example.com" + func Test_dns_config_ConvertDomainNameAPIService(t *testing.T) { t.Run("Test ConvertDomainNameAPIService ConvertDomainNameConvert", func(t *testing.T) { - // Create a dummy domain name - dummyDomainName := "example.com" - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/convert_domain_name/"+dummyDomainName, req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/convert_domain_name/"+domainName, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigConvertDomainName{ - Idn: openapiclient.PtrString("example.com"), - Punycode: openapiclient.PtrString("xn--example-2ya.com"), - } + response := openapiclient.ConfigConvertDomainNameResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - convertDomain := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := convertDomain.ConvertDomainNameAPI.ConvertDomainNameConvert(ctx, dummyDomainName).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Nil(t, resp.Result) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_convert_rname_test.go b/dns_config/test/api_convert_rname_test.go index 7f166c6..630f4a2 100644 --- a/dns_config/test/api_convert_rname_test.go +++ b/dns_config/test/api_convert_rname_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing ConvertRnameAPIService */ @@ -13,58 +13,42 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var emailAddress = "test@example.com" + func Test_dns_config_ConvertRnameAPIService(t *testing.T) { t.Run("Test ConvertRnameAPIService ConvertRnameConvertRName", func(t *testing.T) { - - // Define a dummy email address - emailAddress := "test@example.com" - - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "GET", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/dns/convert_rname/"+emailAddress, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - // Create a dummy response - response := dns_config.ConfigConvertRNameResponse{ - Rname: openapiclient.PtrString("test.example.com."), - } + response := openapiclient.ConfigConvertRNameResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - convertRename := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := convertRename.ConvertRnameAPI.ConvertRnameConvertRName(ctx, emailAddress).Execute() - + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "test.example.com.", *resp.Rname) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_delegation_test.go b/dns_config/test/api_delegation_test.go index 9833d9f..13d19bd 100644 --- a/dns_config/test/api_delegation_test.go +++ b/dns_config/test/api_delegation_test.go @@ -7,87 +7,167 @@ Testing DelegationAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_DelegationAPIService(t *testing.T) { +var ConfigDelegation_Post = openapiclient.ConfigDelegation{ + Id: openapiclient.PtrString("ConfigDelegationPost"), + Comment: nil, + DelegationServers: nil, + Disabled: nil, + Fqdn: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + View: nil, +} +var ConfigDelegation_Patch = openapiclient.ConfigDelegation{ + Id: openapiclient.PtrString("ConfigDelegationPatch"), + Comment: nil, + DelegationServers: nil, + Disabled: nil, + Fqdn: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + View: nil, +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_DelegationAPIService(t *testing.T) { t.Run("Test DelegationAPIService DelegationCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigDelegation + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigDelegation_Post, reqBody) + + response := openapiclient.ConfigCreateDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(ConfigDelegation_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DelegationAPIService DelegationDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DelegationAPIService DelegationList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.DelegationAPI.DelegationList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DelegationAPIService DelegationRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DelegationAPI.DelegationRead(context.Background(), *ConfigDelegation_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DelegationAPIService DelegationUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + var reqBody openapiclient.ConfigDelegation + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigDelegation_Patch, reqBody) + + response := openapiclient.ConfigUpdateDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), *ConfigDelegation_Patch.Id).Body(ConfigDelegation_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + t.Run("Test DelegationAPIService DelegationDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), *ConfigDelegation_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_forward_nsg_test.go b/dns_config/test/api_forward_nsg_test.go index 8d9ac14..26929e6 100644 --- a/dns_config/test/api_forward_nsg_test.go +++ b/dns_config/test/api_forward_nsg_test.go @@ -7,87 +7,167 @@ Testing ForwardNsgAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ForwardNsgAPIService(t *testing.T) { +var ConfigForwardNSG_Post = openapiclient.ConfigForwardNSG{ + Id: openapiclient.PtrString("ConfigForwardNSGPost"), + Comment: nil, + ExternalForwarders: nil, + ForwardersOnly: nil, + Hosts: nil, + InternalForwarders: nil, + Name: "", + Nsgs: nil, + Tags: nil, +} +var ConfigForwardNSG_Patch = openapiclient.ConfigForwardNSG{ + Id: openapiclient.PtrString("ConfigForwardNSGPatch"), + Comment: nil, + ExternalForwarders: nil, + ForwardersOnly: nil, + Hosts: nil, + InternalForwarders: nil, + Name: "", + Nsgs: nil, + Tags: nil, +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_ForwardNsgAPIService(t *testing.T) { t.Run("Test ForwardNsgAPIService ForwardNsgCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigForwardNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardNSG_Post, reqBody) + + response := openapiclient.ConfigCreateForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(ConfigForwardNSG_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), *ConfigForwardNSG_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), *ConfigForwardNSG_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigForwardNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardNSG_Patch, reqBody) + + response := openapiclient.ConfigUpdateForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), *ConfigForwardNSG_Patch.Id).Body(ConfigForwardNSG_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_forward_zone_test.go b/dns_config/test/api_forward_zone_test.go index 683d1cd..43ad78d 100644 --- a/dns_config/test/api_forward_zone_test.go +++ b/dns_config/test/api_forward_zone_test.go @@ -7,99 +7,225 @@ Testing ForwardZoneAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ForwardZoneAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ForwardZoneAPIService ForwardZoneCopy", func(t *testing.T) { +var ConfigCopyForwardZone_Post = openapiclient.ConfigCopyForwardZone{ + Id: openapiclient.PtrString("ConfigCopyForwardZonePost"), + Comment: nil, + ExternalForwarders: nil, + Hosts: nil, + InternalForwarders: nil, + Nsgs: nil, + Recursive: nil, + SkipOnError: nil, + TargetView: "", +} +var ConfigForwardZone_Post = openapiclient.ConfigForwardZone{ + Id: openapiclient.PtrString("ConfigForwardZonePost"), + Comment: nil, + CreatedAt: nil, + Disabled: nil, + ExternalForwarders: nil, + ForwardOnly: nil, + Fqdn: nil, + Hosts: nil, + InternalForwarders: nil, + MappedSubnet: nil, + Mapping: nil, + Nsgs: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + UpdatedAt: nil, + View: nil, + Warnings: nil, +} - t.Skip("skip test") // remove to run test +var ConfigForwardZone_Patch = openapiclient.ConfigForwardZone{ + Id: openapiclient.PtrString("ConfigForwardZonePatch"), + Comment: nil, + CreatedAt: nil, + Disabled: nil, + ExternalForwarders: nil, + ForwardOnly: nil, + Fqdn: nil, + Hosts: nil, + InternalForwarders: nil, + MappedSubnet: nil, + Mapping: nil, + Nsgs: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + UpdatedAt: nil, + View: nil, + Warnings: nil, +} - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Execute() +func Test_dns_config_ForwardZoneAPIService(t *testing.T) { + t.Run("Test ForwardZoneAPIService ForwardZoneCopy", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigCopyForwardZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigCopyForwardZone_Post, reqBody) + + response := openapiclient.ConfigCopyForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(ConfigCopyForwardZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigForwardZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardZone_Post, reqBody) + + response := openapiclient.ConfigCreateForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(ConfigForwardZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ForwardZoneAPIService ForwardZoneDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), *ConfigForwardZone_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + var reqBody openapiclient.ConfigForwardZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardZone_Patch, reqBody) + + response := openapiclient.ConfigUpdateForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), *ConfigForwardZone_Patch.Id).Body(ConfigForwardZone_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + t.Run("Test ForwardZoneAPIService ForwardZoneDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), *ConfigForwardZone_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_global_test.go b/dns_config/test/api_global_test.go index e114660..ec0001f 100644 --- a/dns_config/test/api_global_test.go +++ b/dns_config/test/api_global_test.go @@ -7,74 +7,133 @@ Testing GlobalAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_GlobalAPIService(t *testing.T) { +var ConfigGlobal_Patch = openapiclient.ConfigGlobal{ + Id: "Patch1", +} +var ConfigGlobal_Patch2 = openapiclient.ConfigGlobal{ + Id: "Patch2", +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_GlobalAPIService(t *testing.T) { t.Run("Test GlobalAPIService GlobalRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalRead2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobal_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), ConfigGlobal_Patch.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigGlobal + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigGlobal_Patch, reqBody) + + response := openapiclient.ConfigUpdateGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(ConfigGlobal_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalUpdate2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobal_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigGlobal + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigGlobal_Patch2, reqBody) + + response := openapiclient.ConfigUpdateGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), ConfigGlobal_Patch.Id).Body(ConfigGlobal_Patch2).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_host_test.go b/dns_config/test/api_host_test.go index 2950634..cd3e2c9 100644 --- a/dns_config/test/api_host_test.go +++ b/dns_config/test/api_host_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing HostAPIService */ @@ -13,158 +13,96 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var ConfigHost_Patch = openapiclient.ConfigHost{ + Id: openapiclient.PtrString("ConfigHostPatch"), +} + func Test_dns_config_HostAPIService(t *testing.T) { t.Run("Test HostAPIService HostList", func(t *testing.T) { - - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "GET", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/dns/host", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - // Create a dummy response - response := dns_config.ConfigListHostResponse{ - Results: []dns_config.ConfigHost{ - { - Id: openapiclient.PtrString("host1"), - AbsoluteName: openapiclient.PtrString("host1.example.com"), - }, - { - Id: openapiclient.PtrString("host2"), - AbsoluteName: openapiclient.PtrString("host2.example.com"), - }, - }, - } + response := openapiclient.ConfigListHostResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - // Create a new API client with the mock HTTP client - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - apiClient := dns_config.NewAPIClient(configuration) - - // Call the method and check the response + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.HostAPI.HostList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "host1", *resp.Results[0].Id) - assert.Equal(t, "host1.example.com", *resp.Results[0].AbsoluteName) - assert.Equal(t, "host2", *resp.Results[1].Id) - assert.Equal(t, "host2.example.com", *resp.Results[1].AbsoluteName) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HostAPIService HostRead", func(t *testing.T) { - - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHost_Patch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - // Create a dummy response - response := dns_config.ConfigReadHostResponse{ - Result: &dns_config.ConfigHost{ - Id: openapiclient.PtrString("host1"), - AbsoluteName: openapiclient.PtrString("host1.example.com"), - }, - } + response := openapiclient.ConfigReadHostResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - // Create a new API client with the mock HTTP client - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - apiClient := dns_config.NewAPIClient(configuration) - - // Call the method and check the response - id := "host1" - resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), id).Execute() - + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), *ConfigHost_Patch.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "host1", *resp.Result.Id) - assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HostAPIService HostUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHost_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Accept")) + var reqBody openapiclient.ConfigHost + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigHost_Patch, reqBody) - // Create a dummy response - response := dns_config.ConfigReadHostResponse{ - Result: &dns_config.ConfigHost{ - Id: openapiclient.PtrString("host1"), - AbsoluteName: openapiclient.PtrString("host1.example.com"), - }, - } + response := openapiclient.ConfigUpdateHostResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - // Create a new API client with the mock HTTP client - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - apiClient := dns_config.NewAPIClient(configuration) - - // Call the method and check the response - id := "host1" - hostUpdateInput := dns_config.ConfigHost{ - AbsoluteName: openapiclient.PtrString("host1.example.com"), - } - resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(hostUpdateInput).Execute() - + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), *ConfigHost_Patch.Id).Body(ConfigHost_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "host1", *resp.Result.Id) - assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_lbdn_test.go b/dns_config/test/api_lbdn_test.go index 6433b4a..382ddb7 100644 --- a/dns_config/test/api_lbdn_test.go +++ b/dns_config/test/api_lbdn_test.go @@ -7,87 +7,151 @@ Testing LbdnAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_LbdnAPIService(t *testing.T) { +var ConfigLBDN_Post = openapiclient.ConfigLBDN{ + Id: openapiclient.PtrString("ConfigLBDNPost"), +} +var ConfigLBDN_Patch = openapiclient.ConfigLBDN{ + Id: openapiclient.PtrString("ConfigLBDNPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_LbdnAPIService(t *testing.T) { t.Run("Test LbdnAPIService LbdnCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigLBDN + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigLBDN_Post, reqBody) + + response := openapiclient.ConfigCreateLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(ConfigLBDN_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), *ConfigLBDN_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.LbdnAPI.LbdnList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LbdnAPI.LbdnRead(context.Background(), *ConfigLBDN_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigLBDN + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigLBDN_Patch, reqBody) + + response := openapiclient.ConfigUpdateLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), *ConfigLBDN_Patch.Id).Body(ConfigLBDN_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_server_test.go b/dns_config/test/api_server_test.go index 485d79f..a2fb260 100644 --- a/dns_config/test/api_server_test.go +++ b/dns_config/test/api_server_test.go @@ -7,87 +7,151 @@ Testing ServerAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ServerAPIService(t *testing.T) { +var ConfigServer_Post = openapiclient.ConfigServer{ + Id: openapiclient.PtrString("ConfigServerPost"), +} +var ConfigServer_Patch = openapiclient.ConfigServer{ + Id: openapiclient.PtrString("ConfigServerPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_ServerAPIService(t *testing.T) { t.Run("Test ServerAPIService ServerCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigServer + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigServer_Post, reqBody) + + response := openapiclient.ConfigCreateServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(ConfigServer_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *ConfigServer_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ServerAPI.ServerList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *ConfigServer_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigServer + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigServer_Patch, reqBody) + + response := openapiclient.ConfigUpdateServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *ConfigServer_Patch.Id).Body(ConfigServer_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_view_test.go b/dns_config/test/api_view_test.go index 47b4c37..29e73bb 100644 --- a/dns_config/test/api_view_test.go +++ b/dns_config/test/api_view_test.go @@ -7,99 +7,188 @@ Testing ViewAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ViewAPIService(t *testing.T) { +var ConfigBulkCopyView_Post = openapiclient.ConfigBulkCopyView{ + AuthZoneConfig: nil, + ForwardZoneConfig: nil, + Recursive: nil, + Resources: nil, + SecondaryZoneConfig: nil, + SkipOnError: nil, + Target: "TargetPost", +} +var ConfigView_Post = openapiclient.ConfigView{ + Id: openapiclient.PtrString("ConfigViewPost"), +} +var ConfigView_Patch = openapiclient.ConfigView{ + Id: openapiclient.PtrString("ConfigViewPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_ViewAPIService(t *testing.T) { t.Run("Test ViewAPIService ViewBulkCopy", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/bulk_copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigBulkCopyView + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigBulkCopyView_Post, reqBody) + + response := openapiclient.ConfigBulkCopyResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(ConfigBulkCopyView_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ViewAPI.ViewCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigView + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigView_Post, reqBody) + + response := openapiclient.ConfigCreateViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(ConfigView_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ViewAPI.ViewDelete(context.Background(), *ConfigView_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ViewAPI.ViewList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewRead(context.Background(), *ConfigView_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigView + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigView_Patch, reqBody) + + response := openapiclient.ConfigUpdateViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewUpdate(context.Background(), *ConfigView_Patch.Id).Body(ConfigView_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_data/.openapi-generator/FILES b/dns_data/.openapi-generator/FILES index 606c946..0c87762 100644 --- a/dns_data/.openapi-generator/FILES +++ b/dns_data/.openapi-generator/FILES @@ -22,4 +22,5 @@ model_data_soa_serial_increment_response.go model_data_update_record_response.go model_inheritance2_inherited_u_int32.go model_protobuf_field_mask.go +test/api_record_test.go utils.go diff --git a/dns_data/.openapi-generator/VERSION b/dns_data/.openapi-generator/VERSION index 73a86b1..4b49d9b 100644 --- a/dns_data/.openapi-generator/VERSION +++ b/dns_data/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.2.0 \ No newline at end of file diff --git a/dns_data/README.md b/dns_data/README.md index c915354..e1d4afb 100644 --- a/dns_data/README.md +++ b/dns_data/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import dns_data "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_data.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_data.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_data.ContextOperationServerIndices` and `dns_data.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -115,11 +115,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_data.ContextAPIKeys, + map[string]dns_data.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_data/api_record.go b/dns_data/api_record.go index 844179e..d47f10e 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type RecordAPI interface { /* - RecordCreate Create the DNS resource record. + RecordCreate Create the DNS resource record. - Use this method to create a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to create a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ RecordCreate(ctx context.Context) ApiRecordCreateRequest @@ -39,14 +40,14 @@ type RecordAPI interface { RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) /* - RecordDelete Move the DNS resource record to recycle bin. + RecordDelete Move the DNS resource record to recycle bin. - Use this method to move a DNS __Record__ object to the recycle bin. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to move a DNS __Record__ object to the recycle bin. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest @@ -54,13 +55,13 @@ type RecordAPI interface { RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) /* - RecordList Retrieve DNS resource records. + RecordList Retrieve DNS resource records. - Use this method to retrieve DNS __Record__ objects. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve DNS __Record__ objects. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ RecordList(ctx context.Context) ApiRecordListRequest @@ -69,14 +70,14 @@ type RecordAPI interface { RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) /* - RecordRead Retrieve the DNS resource record. + RecordRead Retrieve the DNS resource record. - Use this method to retrieve a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ RecordRead(ctx context.Context, id string) ApiRecordReadRequest @@ -85,14 +86,14 @@ type RecordAPI interface { RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) /* - RecordSOASerialIncrement Increment serial number for the SOA record. + RecordSOASerialIncrement Increment serial number for the SOA record. - Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest @@ -101,14 +102,14 @@ type RecordAPI interface { RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) /* - RecordUpdate Update the DNS resource record. + RecordUpdate Update the DNS resource record. - Use this method to update a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to update a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest @@ -121,10 +122,10 @@ type RecordAPI interface { type RecordAPIService internal.Service type ApiRecordCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - body *DataRecord - inherit *string + body *DataRecord + inherit *string } func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { @@ -148,25 +149,24 @@ RecordCreate Create the DNS resource record. Use this method to create a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequest { return ApiRecordCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DataCreateRecordResponse +// @return DataCreateRecordResponse func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataCreateRecordResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataCreateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordCreate") @@ -251,9 +251,9 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC } type ApiRecordDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string + id string } func (r ApiRecordDeleteRequest) Execute() (*http.Response, error) { @@ -266,24 +266,24 @@ RecordDelete Move the DNS resource record to recycle bin. Use this method to move a DNS __Record__ object to the recycle bin. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ func (a *RecordAPIService) RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest { return ApiRecordDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordDelete") @@ -355,50 +355,50 @@ func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http. } type ApiRecordListRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordListRequest) Fields(fields string) ApiRecordListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRecordListRequest) Filter(filter string) ApiRecordListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRecordListRequest) Offset(offset int32) ApiRecordListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRecordListRequest) Limit(limit int32) ApiRecordListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRecordListRequest) PageToken(pageToken string) ApiRecordListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRecordListRequest) OrderBy(orderBy string) ApiRecordListRequest { r.orderBy = &orderBy return r @@ -432,25 +432,24 @@ RecordList Retrieve DNS resource records. Use this method to retrieve DNS __Record__ objects. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest { return ApiRecordListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DataListRecordResponse +// @return DataListRecordResponse func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataListRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataListRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordList") @@ -554,14 +553,14 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR } type ApiRecordReadRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordReadRequest) Fields(fields string) ApiRecordReadRequest { r.fields = &fields return r @@ -583,27 +582,26 @@ RecordRead Retrieve the DNS resource record. Use this method to retrieve a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordReadRequest { return ApiRecordReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataReadRecordResponse +// @return DataReadRecordResponse func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataReadRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataReadRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordRead") @@ -687,10 +685,10 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR } type ApiRecordSOASerialIncrementRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataSOASerialIncrementRequest + id string + body *DataSOASerialIncrementRequest } func (r ApiRecordSOASerialIncrementRequest) Body(body DataSOASerialIncrementRequest) ApiRecordSOASerialIncrementRequest { @@ -708,27 +706,26 @@ RecordSOASerialIncrement Increment serial number for the SOA record. Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest { return ApiRecordSOASerialIncrementRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataSOASerialIncrementResponse +// @return DataSOASerialIncrementResponse func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataSOASerialIncrementResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataSOASerialIncrementResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordSOASerialIncrement") @@ -811,11 +808,11 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI } type ApiRecordUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataRecord - inherit *string + id string + body *DataRecord + inherit *string } func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { @@ -839,27 +836,26 @@ RecordUpdate Update the DNS resource record. Use this method to update a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest { return ApiRecordUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataUpdateRecordResponse +// @return DataUpdateRecordResponse func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataUpdateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataUpdateRecordResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataUpdateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordUpdate") diff --git a/dns_data/docs/RecordAPI.md b/dns_data/docs/RecordAPI.md index 9a09e0e..1b08a69 100644 --- a/dns_data/docs/RecordAPI.md +++ b/dns_data/docs/RecordAPI.md @@ -27,25 +27,25 @@ Create the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordCreate`: DataCreateRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordCreate`: %v\n", resp) + body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordCreate`: DataCreateRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordCreate`: %v\n", resp) } ``` @@ -95,22 +95,22 @@ Move the DNS resource record to recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -163,32 +163,32 @@ Retrieve DNS resource records. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordList`: DataListRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordList`: DataListRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordList`: %v\n", resp) } ``` @@ -245,26 +245,26 @@ Retrieve the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordRead`: DataReadRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordRead`: DataReadRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordRead`: %v\n", resp) } ``` @@ -319,25 +319,25 @@ Increment serial number for the SOA record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewDataSOASerialIncrementRequest() // DataSOASerialIncrementRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordSOASerialIncrement``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordSOASerialIncrement`: DataSOASerialIncrementResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordSOASerialIncrement`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewDataSOASerialIncrementRequest() // DataSOASerialIncrementRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordSOASerialIncrement``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordSOASerialIncrement`: DataSOASerialIncrementResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordSOASerialIncrement`: %v\n", resp) } ``` @@ -391,26 +391,26 @@ Update the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordUpdate`: DataUpdateRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordUpdate`: DataUpdateRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordUpdate`: %v\n", resp) } ``` diff --git a/dns_data/model_data_create_record_response.go b/dns_data/model_data_create_record_response.go index 870d899..2914142 100644 --- a/dns_data/model_data_create_record_response.go +++ b/dns_data/model_data_create_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataCreateRecordResponse) SetResult(v DataRecord) { } func (o DataCreateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataCreateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_list_record_response.go b/dns_data/model_data_list_record_response.go index e633b11..8ce789e 100644 --- a/dns_data/model_data_list_record_response.go +++ b/dns_data/model_data_list_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *DataListRecordResponse) SetResults(v []DataRecord) { } func (o DataListRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableDataListRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_read_record_response.go b/dns_data/model_data_read_record_response.go index 7541c04..57ccdab 100644 --- a/dns_data/model_data_read_record_response.go +++ b/dns_data/model_data_read_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataReadRecordResponse) SetResult(v DataRecord) { } func (o DataReadRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataReadRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_record.go b/dns_data/model_data_record.go index 35e1911..19ea0bd 100644 --- a/dns_data/model_data_record.go +++ b/dns_data/model_data_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,6 +13,8 @@ package dns_data import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the DataRecord type satisfies the MappedNullable interface at compile time @@ -41,7 +43,7 @@ type DataRecord struct { // The DNS protocol textual representation of the DNS resource record data. DnsRdata *string `json:"dns_rdata,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *DataRecordInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpamHost *string `json:"ipam_host,omitempty"` @@ -73,6 +75,8 @@ type DataRecord struct { Zone *string `json:"zone,omitempty"` } +type _DataRecord DataRecord + // NewDataRecord instantiates a new DataRecord object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -916,7 +920,7 @@ func (o *DataRecord) SetZone(v string) { } func (o DataRecord) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1004,6 +1008,43 @@ func (o DataRecord) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DataRecord) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rdata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataRecord := _DataRecord{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataRecord) + + if err != nil { + return err + } + + *o = DataRecord(varDataRecord) + + return err +} + type NullableDataRecord struct { value *DataRecord isSet bool @@ -1039,3 +1080,5 @@ func (v *NullableDataRecord) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_record_inheritance.go b/dns_data/model_data_record_inheritance.go index 55e5209..88f08ec 100644 --- a/dns_data/model_data_record_inheritance.go +++ b/dns_data/model_data_record_inheritance.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataRecordInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o DataRecordInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataRecordInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_soa_serial_increment_request.go b/dns_data/model_data_soa_serial_increment_request.go index ce4dabf..2ae5f8c 100644 --- a/dns_data/model_data_soa_serial_increment_request.go +++ b/dns_data/model_data_soa_serial_increment_request.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -140,7 +140,7 @@ func (o *DataSOASerialIncrementRequest) SetSerialIncrement(v int64) { } func (o DataSOASerialIncrementRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,3 +196,5 @@ func (v *NullableDataSOASerialIncrementRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_soa_serial_increment_response.go b/dns_data/model_data_soa_serial_increment_response.go index 352d117..cc83af7 100644 --- a/dns_data/model_data_soa_serial_increment_response.go +++ b/dns_data/model_data_soa_serial_increment_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataSOASerialIncrementResponse) SetResult(v DataRecord) { } func (o DataSOASerialIncrementResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataSOASerialIncrementResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_update_record_response.go b/dns_data/model_data_update_record_response.go index aca7ee5..ac6d08d 100644 --- a/dns_data/model_data_update_record_response.go +++ b/dns_data/model_data_update_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataUpdateRecordResponse) SetResult(v DataRecord) { } func (o DataUpdateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataUpdateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_inheritance2_inherited_u_int32.go b/dns_data/model_inheritance2_inherited_u_int32.go index c23f897..9d2885f 100644 --- a/dns_data/model_inheritance2_inherited_u_int32.go +++ b/dns_data/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_protobuf_field_mask.go b/dns_data/model_protobuf_field_mask.go index 17ded5d..21401df 100644 --- a/dns_data/model_protobuf_field_mask.go +++ b/dns_data/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/test/api_record_test.go b/dns_data/test/api_record_test.go index 8d3ff42..bc33028 100644 --- a/dns_data/test/api_record_test.go +++ b/dns_data/test/api_record_test.go @@ -7,101 +7,182 @@ Testing RecordAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_data +package dns_data_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_data" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_data_RecordAPIService(t *testing.T) { +var DataRecord_Post = openapiclient.DataRecord{ + Id: openapiclient.PtrString("DataRecordPost"), +} +var DataSOASerialIncrementRequest_Post = openapiclient.DataSOASerialIncrementRequest{ + Id: openapiclient.PtrString("IncrementRequest"), +} +var DataRecord_Patch = openapiclient.DataRecord{ + Id: openapiclient.PtrString("DataRecordPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_data_RecordAPIService(t *testing.T) { t.Run("Test RecordAPIService RecordCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.RecordAPI.RecordCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.DataRecord + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, DataRecord_Post, reqBody) + + response := openapiclient.DataCreateRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(DataRecord_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.RecordAPI.RecordDelete(context.Background(), *DataRecord_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.DataListRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.RecordAPI.RecordList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.DataReadRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordRead(context.Background(), *DataRecord_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordSOASerialIncrement", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataSOASerialIncrementRequest_Post.Id+"/serial_increment", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.DataSOASerialIncrementRequest + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, DataSOASerialIncrementRequest_Post, reqBody) + + response := openapiclient.DataSOASerialIncrementResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), *DataSOASerialIncrementRequest_Post.Id).Body(DataSOASerialIncrementRequest_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.DataRecord + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, DataRecord_Patch, reqBody) + + response := openapiclient.DataUpdateRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), *DataRecord_Patch.Id).Body(DataRecord_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/internal/utils.go b/internal/utils.go index 3600f5b..da62760 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -1,5 +1,19 @@ package internal +import "net/http" + type MappedNullable interface { ToMap() (map[string]interface{}, error) } + +type RoundTripFunc func(req *http.Request) *http.Response + +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} + +func NewTestClient(testFn RoundTripFunc) *http.Client { + return &http.Client{ + Transport: RoundTripFunc(testFn), + } +} diff --git a/keys/.openapi-generator/FILES b/keys/.openapi-generator/FILES index a5d04a4..8cf4475 100644 --- a/keys/.openapi-generator/FILES +++ b/keys/.openapi-generator/FILES @@ -40,6 +40,5 @@ model_keys_update_tsig_key_response.go model_protobuf_field_mask.go model_upload_content_type.go model_upload_request.go -test/api_generate_tsig_test.go test/api_upload_test.go utils.go diff --git a/keys/README.md b/keys/README.md index 20dc152..7653042 100644 --- a/keys/README.md +++ b/keys/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import keys "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `keys.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `keys.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `keys.ContextOperationServerIndices` and `keys.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description *KerberosAPI* | [**KerberosList**](docs/KerberosAPI.md#kerberoslist) | **Get** /keys/kerberos | Retrieve Kerberos keys. *KerberosAPI* | [**KerberosRead**](docs/KerberosAPI.md#kerberosread) | **Get** /keys/kerberos/{id} | Retrieve the Kerberos key. *KerberosAPI* | [**KerberosUpdate**](docs/KerberosAPI.md#kerberosupdate) | **Patch** /keys/kerberos/{id} | Update the Kerberos key. +*KerberosAPI* | [**KeysKerberosPost**](docs/KerberosAPI.md#keyskerberospost) | **Post** /keys/kerberos | *TsigAPI* | [**TsigCreate**](docs/TsigAPI.md#tsigcreate) | **Post** /keys/tsig | Create the TSIG key. *TsigAPI* | [**TsigDelete**](docs/TsigAPI.md#tsigdelete) | **Delete** /keys/tsig/{id} | Delete the TSIG key. *TsigAPI* | [**TsigList**](docs/TsigAPI.md#tsiglist) | **Get** /keys/tsig | Retrieve TSIG keys. @@ -126,11 +127,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + keys.ContextAPIKeys, + map[string]keys.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index d4e3ab8..62faecc 100644 --- a/keys/api_generate_tsig.go +++ b/keys/api_generate_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,19 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type GenerateTsigAPI interface { /* - GenerateTsigGenerateTSIG Generate TSIG key with a random secret. + GenerateTsigGenerateTSIG Generate TSIG key with a random secret. - Use this method to generate a TSIG key with a random secret using the specified algorithm. + Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest @@ -41,9 +42,9 @@ type GenerateTsigAPI interface { type GenerateTsigAPIService internal.Service type ApiGenerateTsigGenerateTSIGRequest struct { - ctx context.Context + ctx context.Context ApiService GenerateTsigAPI - algorithm *string + algorithm *string } // The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. @@ -61,25 +62,24 @@ GenerateTsigGenerateTSIG Generate TSIG key with a random secret. Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest { return ApiGenerateTsigGenerateTSIGRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysGenerateTSIGResponse +// @return KeysGenerateTSIGResponse func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTsigGenerateTSIGRequest) (*KeysGenerateTSIGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysGenerateTSIGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysGenerateTSIGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GenerateTsigAPIService.GenerateTsigGenerateTSIG") diff --git a/keys/api_kerberos.go b/keys/api_kerberos.go index df70288..08df4c6 100644 --- a/keys/api_kerberos.go +++ b/keys/api_kerberos.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,20 +18,21 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type KerberosAPI interface { /* - KerberosDelete Delete the Kerberos key. + KerberosDelete Delete the Kerberos key. - Use this method to delete a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to delete a __KerberosKey__ object. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest @@ -39,13 +40,13 @@ type KerberosAPI interface { KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) /* - KerberosList Retrieve Kerberos keys. + KerberosList Retrieve Kerberos keys. - Use this method to retrieve __KerberosKey__ objects. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve __KerberosKey__ objects. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ KerberosList(ctx context.Context) ApiKerberosListRequest @@ -54,14 +55,14 @@ type KerberosAPI interface { KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) /* - KerberosRead Retrieve the Kerberos key. + KerberosRead Retrieve the Kerberos key. - Use this method to retrieve a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve a __KerberosKey__ object. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest @@ -70,29 +71,41 @@ type KerberosAPI interface { KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) /* - KerberosUpdate Update the Kerberos key. + KerberosUpdate Update the Kerberos key. - Use this method to update a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to update a __KerberosKey__ object. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest // KerberosUpdateExecute executes the request // @return KeysUpdateKerberosKeyResponse KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) + + /* + KeysKerberosPost Method for KeysKerberosPost + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest + */ + KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest + + // KeysKerberosPostExecute executes the request + // @return KeysListKerberosKeyResponse + KeysKerberosPostExecute(r ApiKeysKerberosPostRequest) (*KeysListKerberosKeyResponse, *http.Response, error) } // KerberosAPIService KerberosAPI service type KerberosAPIService internal.Service type ApiKerberosDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string + id string } func (r ApiKerberosDeleteRequest) Execute() (*http.Response, error) { @@ -105,24 +118,24 @@ KerberosDelete Delete the Kerberos key. Use this method to delete a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ func (a *KerberosAPIService) KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest { return ApiKerberosDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *KerberosAPIService) KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosDelete") @@ -194,49 +207,49 @@ func (a *KerberosAPIService) KerberosDeleteExecute(r ApiKerberosDeleteRequest) ( } type ApiKerberosListRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosListRequest) Fields(fields string) ApiKerberosListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiKerberosListRequest) Filter(filter string) ApiKerberosListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiKerberosListRequest) Offset(offset int32) ApiKerberosListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiKerberosListRequest) Limit(limit int32) ApiKerberosListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiKerberosListRequest) PageToken(pageToken string) ApiKerberosListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiKerberosListRequest) OrderBy(orderBy string) ApiKerberosListRequest { r.orderBy = &orderBy return r @@ -264,25 +277,24 @@ KerberosList Retrieve Kerberos keys. Use this method to retrieve __KerberosKey__ objects. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ func (a *KerberosAPIService) KerberosList(ctx context.Context) ApiKerberosListRequest { return ApiKerberosListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysListKerberosKeyResponse +// @return KeysListKerberosKeyResponse func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListKerberosKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosList") @@ -383,13 +395,13 @@ func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*Key } type ApiKerberosReadRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosReadRequest) Fields(fields string) ApiKerberosReadRequest { r.fields = &fields return r @@ -405,27 +417,26 @@ KerberosRead Retrieve the Kerberos key. Use this method to retrieve a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ func (a *KerberosAPIService) KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest { return ApiKerberosReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysReadKerberosKeyResponse +// @return KeysReadKerberosKeyResponse func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadKerberosKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosRead") @@ -506,10 +517,10 @@ func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*Key } type ApiKerberosUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string - body *KerberosKey + id string + body *KerberosKey } func (r ApiKerberosUpdateRequest) Body(body KerberosKey) ApiKerberosUpdateRequest { @@ -527,27 +538,26 @@ KerberosUpdate Update the Kerberos key. Use this method to update a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ func (a *KerberosAPIService) KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest { return ApiKerberosUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysUpdateKerberosKeyResponse +// @return KeysUpdateKerberosKeyResponse func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateKerberosKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosUpdate") @@ -628,3 +638,119 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( return localVarReturnValue, localVarHTTPResponse, nil } + +type ApiKeysKerberosPostRequest struct { + ctx context.Context + ApiService KerberosAPI + body *KerberosKey +} + +func (r ApiKeysKerberosPostRequest) Body(body KerberosKey) ApiKeysKerberosPostRequest { + r.body = &body + return r +} + +func (r ApiKeysKerberosPostRequest) Execute() (*KeysListKerberosKeyResponse, *http.Response, error) { + return r.ApiService.KeysKerberosPostExecute(r) +} + +/* +KeysKerberosPost Method for KeysKerberosPost + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest +*/ +func (a *KerberosAPIService) KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest { + return ApiKeysKerberosPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return KeysListKerberosKeyResponse +func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KeysKerberosPost") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/keys/kerberos" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { + if apiKey, ok := auth["ApiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 327f290..59cb727 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,25 +13,25 @@ package keys import ( "bytes" "context" - _ "github.com/infobloxopen/bloxone-go-client/dns_config" "io" "net/http" "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type TsigAPI interface { /* - TsigCreate Create the TSIG key. + TsigCreate Create the TSIG key. - Use this method to create a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to create a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ TsigCreate(ctx context.Context) ApiTsigCreateRequest @@ -40,14 +40,14 @@ type TsigAPI interface { TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) /* - TsigDelete Delete the TSIG key. + TsigDelete Delete the TSIG key. - Use this method to delete a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to delete a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest @@ -55,13 +55,13 @@ type TsigAPI interface { TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) /* - TsigList Retrieve TSIG keys. + TsigList Retrieve TSIG keys. - Use this method to retrieve __TSIGKey__ objects. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve __TSIGKey__ objects. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ TsigList(ctx context.Context) ApiTsigListRequest @@ -70,14 +70,14 @@ type TsigAPI interface { TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) /* - TsigRead Retrieve the TSIG key. + TsigRead Retrieve the TSIG key. - Use this method to retrieve a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ TsigRead(ctx context.Context, id string) ApiTsigReadRequest @@ -86,14 +86,14 @@ type TsigAPI interface { TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) /* - TsigUpdate Update the TSIG key. + TsigUpdate Update the TSIG key. - Use this method to update a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to update a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest @@ -106,9 +106,9 @@ type TsigAPI interface { type TsigAPIService internal.Service type ApiTsigCreateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - body *KeysTSIGKey + body *KeysTSIGKey } func (r ApiTsigCreateRequest) Body(body KeysTSIGKey) ApiTsigCreateRequest { @@ -126,25 +126,24 @@ TsigCreate Create the TSIG key. Use this method to create a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { return ApiTsigCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysCreateTSIGKeyResponse +// @return KeysCreateTSIGKeyResponse func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysCreateTSIGKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysCreateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigCreate") @@ -226,9 +225,9 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT } type ApiTsigDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string + id string } func (r ApiTsigDeleteRequest) Execute() (*http.Response, error) { @@ -241,24 +240,24 @@ TsigDelete Delete the TSIG key. Use this method to delete a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ func (a *TsigAPIService) TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest { return ApiTsigDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigDelete") @@ -330,49 +329,49 @@ func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Respon } type ApiTsigListRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigListRequest) Fields(fields string) ApiTsigListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiTsigListRequest) Filter(filter string) ApiTsigListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiTsigListRequest) Offset(offset int32) ApiTsigListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiTsigListRequest) Limit(limit int32) ApiTsigListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiTsigListRequest) PageToken(pageToken string) ApiTsigListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiTsigListRequest) OrderBy(orderBy string) ApiTsigListRequest { r.orderBy = &orderBy return r @@ -400,25 +399,24 @@ TsigList Retrieve TSIG keys. Use this method to retrieve __TSIGKey__ objects. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { return ApiTsigListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysListTSIGKeyResponse +// @return KeysListTSIGKeyResponse func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigList") @@ -519,13 +517,13 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey } type ApiTsigReadRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigReadRequest) Fields(fields string) ApiTsigReadRequest { r.fields = &fields return r @@ -541,27 +539,26 @@ TsigRead Retrieve the TSIG key. Use this method to retrieve a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadRequest { return ApiTsigReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysReadTSIGKeyResponse +// @return KeysReadTSIGKeyResponse func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigRead") @@ -642,10 +639,10 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey } type ApiTsigUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - body *KeysTSIGKey + id string + body *KeysTSIGKey } func (r ApiTsigUpdateRequest) Body(body KeysTSIGKey) ApiTsigUpdateRequest { @@ -663,27 +660,26 @@ TsigUpdate Update the TSIG key. Use this method to update a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest { return ApiTsigUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysUpdateTSIGKeyResponse +// @return KeysUpdateTSIGKeyResponse func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateTSIGKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigUpdate") diff --git a/keys/api_upload.go b/keys/api_upload.go index 3d68206..8c6beb2 100644 --- a/keys/api_upload.go +++ b/keys/api_upload.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,19 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type UploadAPI interface { /* - UploadUpload Upload content to the keys service. + UploadUpload Upload content to the keys service. - Use this method to upload specified content type to the keys service. + Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ UploadUpload(ctx context.Context) ApiUploadUploadRequest @@ -41,9 +42,9 @@ type UploadAPI interface { type UploadAPIService internal.Service type ApiUploadUploadRequest struct { - ctx context.Context + ctx context.Context ApiService UploadAPI - body *UploadRequest + body *UploadRequest } func (r ApiUploadUploadRequest) Body(body UploadRequest) ApiUploadUploadRequest { @@ -60,25 +61,24 @@ UploadUpload Upload content to the keys service. Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequest { return ApiUploadUploadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DdiuploadResponse +// @return DdiuploadResponse func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*DdiuploadResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DdiuploadResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DdiuploadResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UploadAPIService.UploadUpload") diff --git a/keys/client.go b/keys/client.go index b3649a4..286dc91 100644 --- a/keys/client.go +++ b/keys/client.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package keys import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,20 +19,20 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DDI Keys API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services GenerateTsigAPI GenerateTsigAPI - KerberosAPI KerberosAPI - TsigAPI TsigAPI - UploadAPI UploadAPI + KerberosAPI KerberosAPI + TsigAPI TsigAPI + UploadAPI UploadAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.GenerateTsigAPI = (*GenerateTsigAPIService)(&c.Common) diff --git a/keys/docs/GenerateTsigAPI.md b/keys/docs/GenerateTsigAPI.md index 6f5663a..4293be1 100644 --- a/keys/docs/GenerateTsigAPI.md +++ b/keys/docs/GenerateTsigAPI.md @@ -22,24 +22,24 @@ Generate TSIG key with a random secret. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - algorithm := "algorithm_example" // string | The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm(algorithm).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GenerateTsigAPI.GenerateTsigGenerateTSIG``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateTsigGenerateTSIG`: KeysGenerateTSIGResponse - fmt.Fprintf(os.Stdout, "Response from `GenerateTsigAPI.GenerateTsigGenerateTSIG`: %v\n", resp) + algorithm := "algorithm_example" // string | The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm(algorithm).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GenerateTsigAPI.GenerateTsigGenerateTSIG``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateTsigGenerateTSIG`: KeysGenerateTSIGResponse + fmt.Fprintf(os.Stdout, "Response from `GenerateTsigAPI.GenerateTsigGenerateTSIG`: %v\n", resp) } ``` diff --git a/keys/docs/KerberosAPI.md b/keys/docs/KerberosAPI.md index 01fc80b..0442efd 100644 --- a/keys/docs/KerberosAPI.md +++ b/keys/docs/KerberosAPI.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**KerberosList**](KerberosAPI.md#KerberosList) | **Get** /keys/kerberos | Retrieve Kerberos keys. [**KerberosRead**](KerberosAPI.md#KerberosRead) | **Get** /keys/kerberos/{id} | Retrieve the Kerberos key. [**KerberosUpdate**](KerberosAPI.md#KerberosUpdate) | **Patch** /keys/kerberos/{id} | Update the Kerberos key. +[**KeysKerberosPost**](KerberosAPI.md#KeysKerberosPost) | **Post** /keys/kerberos | @@ -25,22 +26,22 @@ Delete the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -93,31 +94,31 @@ Retrieve Kerberos keys. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosList`: KeysListKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosList`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosList`: %v\n", resp) } ``` @@ -173,25 +174,25 @@ Retrieve the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosRead`: KeysReadKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosRead`: KeysReadKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosRead`: %v\n", resp) } ``` @@ -245,25 +246,25 @@ Update the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewKerberosKey() // KerberosKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosUpdate`: KeysUpdateKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosUpdate`: KeysUpdateKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosUpdate`: %v\n", resp) } ``` @@ -302,3 +303,67 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## KeysKerberosPost + +> KeysListKerberosKeyResponse KeysKerberosPost(ctx).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" +) + +func main() { + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KeysKerberosPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KeysKerberosPost`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KeysKerberosPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiKeysKerberosPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**KerberosKey**](KerberosKey.md) | | + +### Return type + +[**KeysListKerberosKeyResponse**](KeysListKerberosKeyResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/keys/docs/TsigAPI.md b/keys/docs/TsigAPI.md index 447b8d2..d3d6540 100644 --- a/keys/docs/TsigAPI.md +++ b/keys/docs/TsigAPI.md @@ -26,24 +26,24 @@ Create the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigCreate`: KeysCreateTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigCreate`: %v\n", resp) + body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigCreate`: KeysCreateTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve TSIG keys. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigList`: KeysListTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigList`: KeysListTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigRead`: KeysReadTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigRead`: KeysReadTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigUpdate`: KeysUpdateTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigUpdate`: KeysUpdateTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigUpdate`: %v\n", resp) } ``` diff --git a/keys/docs/UploadAPI.md b/keys/docs/UploadAPI.md index 00cc161..0170ee0 100644 --- a/keys/docs/UploadAPI.md +++ b/keys/docs/UploadAPI.md @@ -22,24 +22,24 @@ Upload content to the keys service. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewUploadRequest("Content_example", openapiclient.uploadContentType("UNKNOWN")) // UploadRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.UploadUpload``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UploadUpload`: DdiuploadResponse - fmt.Fprintf(os.Stdout, "Response from `UploadAPI.UploadUpload`: %v\n", resp) + body := *openapiclient.NewUploadRequest("Content_example", openapiclient.uploadContentType("UNKNOWN")) // UploadRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.UploadUpload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UploadUpload`: DdiuploadResponse + fmt.Fprintf(os.Stdout, "Response from `UploadAPI.UploadUpload`: %v\n", resp) } ``` diff --git a/keys/model_ddiupload_response.go b/keys/model_ddiupload_response.go index a58ddfb..e220432 100644 --- a/keys/model_ddiupload_response.go +++ b/keys/model_ddiupload_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -106,7 +106,7 @@ func (o *DdiuploadResponse) SetWarning(v string) { } func (o DdiuploadResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,3 +159,5 @@ func (v *NullableDdiuploadResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_kerberos_key.go b/keys/model_kerberos_key.go index ee036c9..4285f1e 100644 --- a/keys/model_kerberos_key.go +++ b/keys/model_kerberos_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -311,7 +311,7 @@ func (o *KerberosKey) SetVersion(v int64) { } func (o KerberosKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,3 +382,5 @@ func (v *NullableKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_kerberos_keys.go b/keys/model_kerberos_keys.go index 1c06064..78817e6 100644 --- a/keys/model_kerberos_keys.go +++ b/keys/model_kerberos_keys.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KerberosKeys) SetItems(v []KerberosKey) { } func (o KerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_create_tsig_key_response.go b/keys/model_keys_create_tsig_key_response.go index edd0da5..bfe51e4 100644 --- a/keys/model_keys_create_tsig_key_response.go +++ b/keys/model_keys_create_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysCreateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysCreateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysCreateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_generate_tsig_response.go b/keys/model_keys_generate_tsig_response.go index 85f10e4..5a6ee49 100644 --- a/keys/model_keys_generate_tsig_response.go +++ b/keys/model_keys_generate_tsig_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysGenerateTSIGResponse) SetResult(v KeysGenerateTSIGResult) { } func (o KeysGenerateTSIGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysGenerateTSIGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_generate_tsig_result.go b/keys/model_keys_generate_tsig_result.go index 4f6b49d..9b7dab8 100644 --- a/keys/model_keys_generate_tsig_result.go +++ b/keys/model_keys_generate_tsig_result.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysGenerateTSIGResult) SetSecret(v string) { } func (o KeysGenerateTSIGResult) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysGenerateTSIGResult) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_list_kerberos_key_response.go b/keys/model_keys_list_kerberos_key_response.go index 5966a99..31006cc 100644 --- a/keys/model_keys_list_kerberos_key_response.go +++ b/keys/model_keys_list_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListKerberosKeyResponse) SetResults(v []KerberosKey) { } func (o KeysListKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysListKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_list_tsig_key_response.go b/keys/model_keys_list_tsig_key_response.go index 2a6d699..5d90120 100644 --- a/keys/model_keys_list_tsig_key_response.go +++ b/keys/model_keys_list_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListTSIGKeyResponse) SetResults(v []KeysTSIGKey) { } func (o KeysListTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysListTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_read_kerberos_key_response.go b/keys/model_keys_read_kerberos_key_response.go index dce9578..daeeb0c 100644 --- a/keys/model_keys_read_kerberos_key_response.go +++ b/keys/model_keys_read_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysReadKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysReadKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_read_tsig_key_response.go b/keys/model_keys_read_tsig_key_response.go index fdc725c..3eee404 100644 --- a/keys/model_keys_read_tsig_key_response.go +++ b/keys/model_keys_read_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysReadTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysReadTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 12c1ea5..2e98702 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,7 +13,8 @@ package keys import ( "encoding/json" "time" - + "bytes" + "fmt" ) // checks if the KeysTSIGKey type satisfies the MappedNullable interface at compile time @@ -39,9 +40,10 @@ type KeysTSIGKey struct { Tags map[string]interface{} `json:"tags,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` - res interface{} } +type _KeysTSIGKey KeysTSIGKey + // NewKeysTSIGKey instantiates a new KeysTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -334,7 +336,7 @@ func (o *KeysTSIGKey) SetUpdatedAt(v time.Time) { } func (o KeysTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -369,6 +371,44 @@ func (o KeysTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *KeysTSIGKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKeysTSIGKey := _KeysTSIGKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKeysTSIGKey) + + if err != nil { + return err + } + + *o = KeysTSIGKey(varKeysTSIGKey) + + return err +} + type NullableKeysTSIGKey struct { value *KeysTSIGKey isSet bool @@ -404,3 +444,5 @@ func (v *NullableKeysTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_update_kerberos_key_response.go b/keys/model_keys_update_kerberos_key_response.go index 9e83ae5..189d271 100644 --- a/keys/model_keys_update_kerberos_key_response.go +++ b/keys/model_keys_update_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysUpdateKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysUpdateKerberosKeyResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_update_tsig_key_response.go b/keys/model_keys_update_tsig_key_response.go index dc1acd7..2082989 100644 --- a/keys/model_keys_update_tsig_key_response.go +++ b/keys/model_keys_update_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysUpdateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysUpdateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_protobuf_field_mask.go b/keys/model_protobuf_field_mask.go index c76ddb4..33973a0 100644 --- a/keys/model_protobuf_field_mask.go +++ b/keys/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_upload_content_type.go b/keys/model_upload_content_type.go index dbdf50c..4052062 100644 --- a/keys/model_upload_content_type.go +++ b/keys/model_upload_content_type.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -21,7 +21,7 @@ type UploadContentType string // List of uploadContentType const ( UPLOADCONTENTTYPE_UNKNOWN UploadContentType = "UNKNOWN" - UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" + UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" ) // All allowed values of UploadContentType enum @@ -108,3 +108,4 @@ func (v *NullableUploadContentType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + diff --git a/keys/model_upload_request.go b/keys/model_upload_request.go index bb985e6..351fa56 100644 --- a/keys/model_upload_request.go +++ b/keys/model_upload_request.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package keys import ( "encoding/json" + "bytes" + "fmt" ) // checks if the UploadRequest type satisfies the MappedNullable interface at compile time @@ -22,13 +24,15 @@ type UploadRequest struct { // The description for uploaded content. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` // Base64 encoded content. - Content string `json:"content"` - Fields *ProtobufFieldMask `json:"fields,omitempty"` + Content string `json:"content"` + Fields *ProtobufFieldMask `json:"fields,omitempty"` // The tags for uploaded content in JSON format. Tags map[string]interface{} `json:"tags,omitempty"` - Type UploadContentType `json:"type"` + Type UploadContentType `json:"type"` } +type _UploadRequest UploadRequest + // NewUploadRequest instantiates a new UploadRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -195,7 +199,7 @@ func (o *UploadRequest) SetType(v UploadContentType) { } func (o UploadRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -218,6 +222,44 @@ func (o UploadRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UploadRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUploadRequest := _UploadRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUploadRequest) + + if err != nil { + return err + } + + *o = UploadRequest(varUploadRequest) + + return err +} + type NullableUploadRequest struct { value *UploadRequest isSet bool @@ -253,3 +295,5 @@ func (v *NullableUploadRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/test/api_generate_tsig_test.go b/keys/test/api_generate_tsig_test.go index 8f29e45..5b5d0c3 100644 --- a/keys/test/api_generate_tsig_test.go +++ b/keys/test/api_generate_tsig_test.go @@ -13,56 +13,40 @@ import ( "bytes" "context" "encoding/json" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -//type RoundTripFunc func(req *http.Request) *http.Response -// -//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { -// return f(req), nil -//} -// -//func NewTestClient(fn RoundTripFunc) *http.Client { -// return &http.Client{ -// Transport: RoundTripFunc(fn), -// } -//} - func Test_keys_GenerateTsigAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - dummyKey := openapiclient.KeysGenerateTSIGResult{ - Secret: openapiclient.PtrString("XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc="), - } - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/generate_tsig", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Accept")) - require.Equal(t, "hmac_sha256", req.URL.Query().Get("algorithm")) - response := openapiclient.KeysGenerateTSIGResponse{ - Result: &dummyKey, - } - body, err := json.Marshal(response) - require.NoError(t, err) - return &http.Response{ - StatusCode: 200, - Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, - } + t.Run("Test GenerateTsigAPIService GenerateTsigGenerateTSIG", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/generate_tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysGenerateTSIGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - apiClient := openapiclient.NewAPIClient(configuration) - request := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm("hmac_sha256") - response, httpRes, err := request.Execute() - require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) - require.NotNil(t, response) - require.Equal(t, "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", *response.Result.Secret) + } diff --git a/keys/test/api_kerberos_test.go b/keys/test/api_kerberos_test.go index 6b54d87..240fe01 100644 --- a/keys/test/api_kerberos_test.go +++ b/keys/test/api_kerberos_test.go @@ -13,195 +13,145 @@ import ( "bytes" "context" "encoding/json" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -//type RoundTripFunc func(req *http.Request) *http.Response -// -//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { -// return f(req), nil -//} -// -//func NewTestClient(fn RoundTripFunc) *http.Client { -// return &http.Client{ -// Transport: RoundTripFunc(fn), -// } -//} +var KerberosKey_Patch = openapiclient.KerberosKey{ + Id: openapiclient.PtrString("KerberosKeyPost"), +} +var KerberosKey_Post = openapiclient.KerberosKey{ + Id: openapiclient.PtrString("KerberosKeyPatch"), +} func Test_keys_KerberosAPIService(t *testing.T) { - t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { + t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Post.Id, req.URL.Path) - t.Skip("skip test") + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), *KerberosKey_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + t.Run("Test KerberosAPIService KerberosList", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysReadKerberosKeyResponse{ - Result: &openapiclient.KerberosKey{ - Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), - Comment: openapiclient.PtrString("Test Kerberos Key"), - Id: nil, - }, - } + response := openapiclient.KeysListKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), "dummyKey").Execute() - + resp, httpRes, err := apiClient.KerberosAPI.KerberosList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test KerberosAPIService KerberosKeyList", func(t *testing.T) { - - t.Skip("skip test") - + t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Post.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysListKerberosKeyResponse{ - Results: []openapiclient.KerberosKey{ - { - Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), - Comment: openapiclient.PtrString("Test Kerberos Key"), - Id: nil, - }, - }, - } + response := openapiclient.KeysReadKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KerberosList(context.Background()).Execute() + resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), *KerberosKey_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.NotEmpty(t, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test KerberosAPIService KerberosUpdate", func(t *testing.T) { - - t.Skip("skip test") - - dummyKey := openapiclient.KerberosKey{ - Algorithm: openapiclient.PtrString("RFC 3961"), - Comment: openapiclient.PtrString("Test Update Kerberos Key"), - Id: nil, - } configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Content-Type")) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + var reqBody openapiclient.KerberosKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KerberosKey_Patch, reqBody) - response := openapiclient.KeysUpdateKerberosKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysUpdateKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - updateRequest := apiClient.KerberosAPI.KerberosUpdate(context.Background(), "dummyKey").Body(dummyKey) - resp, httpRes, err := updateRequest.Execute() + resp, httpRes, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), *KerberosKey_Patch.Id).Body(KerberosKey_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - - t.Skip("skip test") - - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - } + t.Run("Test KerberosAPIService KeysKerberosPost", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) - var reqBody openapiclient.KeysTSIGKey + + var reqBody openapiclient.KerberosKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KerberosKey_Post, reqBody) - response := openapiclient.KeysUpdateTSIGKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysListKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) - resp, httpRes, err := updateRequest.Execute() + resp, httpRes, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(KerberosKey_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { - t.Skip("skip test") - configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey36", req.URL.Path) - return &http.Response{ - StatusCode: 204, - Body: io.NopCloser(bytes.NewReader([]byte{})), - Header: make(http.Header), - } - }) - apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), "dummyKey36").Execute() - require.Nil(t, err) - require.Equal(t, 204, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index 27e02c0..061e845 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -1,182 +1,157 @@ +/* +DDI Keys API + +Testing TsigAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + package keys_test import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -type RoundTripFunc func(req *http.Request) *http.Response + "github.com/stretchr/testify/require" -func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { - return f(req), nil -} + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" +) -func NewTestClient(fn RoundTripFunc) *http.Client { - return &http.Client{ - Transport: RoundTripFunc(fn), - } +var KeysTSIGKey_Post = openapiclient.KeysTSIGKey{ + Id: openapiclient.PtrString("KeysTsigPost"), +} +var KeysTSIGKey_Patch = openapiclient.KeysTSIGKey{ + Id: openapiclient.PtrString("KeysTsigPatch"), } func Test_keys_TsigAPIService(t *testing.T) { + t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - } configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KeysTSIGKey_Post, reqBody) - response := openapiclient.KeysCreateTSIGKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysCreateTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(dummyKey).Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(KeysTSIGKey_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + + t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), *KeysTSIGKey_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigList", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysListTSIGKeyResponse{ - Results: []openapiclient.KeysTSIGKey{ - { - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - }, - }, - } + response := openapiclient.KeysListTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.TsigAPI.TsigList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.NotEmpty(t, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Post.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysListTSIGKeyResponse{ - Results: []openapiclient.KeysTSIGKey{ - { - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - }, - }, - } + response := openapiclient.KeysReadTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), "dummyKey36").Execute() - + resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), *KeysTSIGKey_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) + t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - } configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Patch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KeysTSIGKey_Patch, reqBody) - response := openapiclient.KeysUpdateTSIGKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysUpdateTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) - resp, httpRes, err := updateRequest.Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigUpdate(context.Background(), *KeysTSIGKey_Patch.Id).Body(KeysTSIGKey_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) - return &http.Response{ - StatusCode: 204, - Body: io.NopCloser(bytes.NewReader([]byte{})), - Header: make(http.Header), - } - }) - apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), "dummyKey36").Execute() - require.Nil(t, err) - require.Equal(t, 204, httpRes.StatusCode) - }) } diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index 65676c8..a42a744 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -23,63 +23,40 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) +var UploadRequest_Post = openapiclient.UploadRequest{ + Comment: openapiclient.PtrString("Upload Request"), + Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 + Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type +} + func Test_keys_UploadAPIService(t *testing.T) { t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { - // Assuming that UploadRequest is the request body type for the UploadUpload API - dummyRequest := openapiclient.UploadRequest{ - Comment: openapiclient.PtrString("This is a test upload"), - Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 - //Fields: &openapiclient.ProtobufFieldMask{}, // Fill this as per your requirements - //Tags: map[string]interface{}{ - // "tag1": "value1", - // "tag2": "value2", - //}, - Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type - } - configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/keys/upload", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Accept")) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.UploadRequest require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyRequest, reqBody) + require.Equal(t, UploadRequest_Post, reqBody) - response := openapiclient.DdiuploadResponse{ - KerberosKeys: &openapiclient.KerberosKeys{ - Items: []openapiclient.KerberosKey{ - { - Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), - Comment: openapiclient.PtrString("This is a test Kerberos key"), - Domain: openapiclient.PtrString("example.com"), - Id: openapiclient.PtrString("123"), - //Principal: openapiclient.PtrString("test_principal"), - //Tags: map[string]interface{}{"tag1": "value1", "tag2": "value2"}, - //UploadedAt: openapiclient.PtrString("2022-01-01T00:00:00Z"), - //Version: openapiclient.PtrInt64(1), - }, - }, - }, - Warning: openapiclient.PtrString("This is a test warning"), - } + response := openapiclient.DdiuploadResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(dummyRequest).Execute() + resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(UploadRequest_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/keys/utils.go b/keys/utils.go index 54647cd..ac6ed2b 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ From 5312a4cf5ba68ac1e86b005587f757333ad5b522 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Mon, 26 Feb 2024 15:47:23 -0800 Subject: [PATCH 05/18] Just ran make client --- dns_config/.openapi-generator/VERSION | 2 +- dns_config/README.md | 24 +- dns_config/api_acl.go | 245 ++++---- dns_config/api_auth_nsg.go | 245 ++++---- dns_config/api_auth_zone.go | 292 +++++---- dns_config/api_cache_flush.go | 40 +- dns_config/api_convert_domain_name.go | 36 +- dns_config/api_convert_rname.go | 40 +- dns_config/api_delegation.go | 245 ++++---- dns_config/api_forward_nsg.go | 245 ++++---- dns_config/api_forward_zone.go | 280 +++++---- dns_config/api_global.go | 157 +++-- dns_config/api_host.go | 168 +++--- dns_config/api_lbdn.go | 235 ++++---- dns_config/api_server.go | 257 ++++---- dns_config/api_view.go | 294 +++++---- dns_config/client.go | 34 +- dns_config/docs/AclAPI.md | 164 ++--- dns_config/docs/AuthNsgAPI.md | 164 ++--- dns_config/docs/AuthZoneAPI.md | 202 +++---- dns_config/docs/CacheFlushAPI.md | 30 +- dns_config/docs/ConvertDomainNameAPI.md | 30 +- dns_config/docs/ConvertRnameAPI.md | 30 +- dns_config/docs/DelegationAPI.md | 164 ++--- dns_config/docs/ForwardNsgAPI.md | 164 ++--- dns_config/docs/ForwardZoneAPI.md | 194 +++--- dns_config/docs/GlobalAPI.md | 124 ++-- dns_config/docs/HostAPI.md | 114 ++-- dns_config/docs/LbdnAPI.md | 164 ++--- dns_config/docs/ServerAPI.md | 172 +++--- dns_config/docs/ViewAPI.md | 202 +++---- .../model_auth_zone_external_provider.go | 6 +- dns_config/model_config_acl.go | 47 +- dns_config/model_config_acl_item.go | 50 +- dns_config/model_config_auth_nsg.go | 47 +- dns_config/model_config_auth_zone.go | 10 +- dns_config/model_config_auth_zone_config.go | 6 +- .../model_config_auth_zone_inheritance.go | 20 +- dns_config/model_config_bulk_copy_error.go | 6 +- dns_config/model_config_bulk_copy_response.go | 10 +- dns_config/model_config_bulk_copy_view.go | 52 +- dns_config/model_config_cache_flush.go | 6 +- .../model_config_convert_domain_name.go | 6 +- ...del_config_convert_domain_name_response.go | 6 +- .../model_config_convert_r_name_response.go | 6 +- dns_config/model_config_copy_auth_zone.go | 47 +- .../model_config_copy_auth_zone_response.go | 6 +- dns_config/model_config_copy_forward_zone.go | 47 +- ...model_config_copy_forward_zone_response.go | 6 +- dns_config/model_config_copy_response.go | 6 +- .../model_config_create_acl_response.go | 6 +- .../model_config_create_auth_nsg_response.go | 6 +- .../model_config_create_auth_zone_response.go | 6 +- ...model_config_create_delegation_response.go | 6 +- ...odel_config_create_forward_nsg_response.go | 6 +- ...del_config_create_forward_zone_response.go | 6 +- .../model_config_create_lbdn_response.go | 6 +- .../model_config_create_server_response.go | 6 +- .../model_config_create_view_response.go | 6 +- .../model_config_custom_root_ns_block.go | 6 +- dns_config/model_config_delegation.go | 6 +- dns_config/model_config_delegation_server.go | 47 +- dns_config/model_config_display_view.go | 6 +- .../model_config_dnssec_validation_block.go | 6 +- dns_config/model_config_dtc_config.go | 6 +- dns_config/model_config_dtc_policy.go | 6 +- dns_config/model_config_ecs_block.go | 6 +- dns_config/model_config_ecs_zone.go | 48 +- dns_config/model_config_external_primary.go | 51 +- dns_config/model_config_external_secondary.go | 52 +- dns_config/model_config_forward_nsg.go | 47 +- dns_config/model_config_forward_zone.go | 6 +- .../model_config_forward_zone_config.go | 6 +- dns_config/model_config_forwarder.go | 47 +- dns_config/model_config_forwarders_block.go | 6 +- dns_config/model_config_global.go | 55 +- dns_config/model_config_host.go | 10 +- .../model_config_host_associated_server.go | 6 +- dns_config/model_config_host_inheritance.go | 6 +- .../model_config_inherited_acl_items.go | 6 +- ...l_config_inherited_custom_root_ns_block.go | 10 +- ...onfig_inherited_dnssec_validation_block.go | 10 +- .../model_config_inherited_dtc_config.go | 6 +- .../model_config_inherited_ecs_block.go | 10 +- ...model_config_inherited_forwarders_block.go | 10 +- .../model_config_inherited_kerberos_keys.go | 6 +- .../model_config_inherited_sort_list_items.go | 6 +- .../model_config_inherited_zone_authority.go | 22 +- ...g_inherited_zone_authority_m_name_block.go | 10 +- dns_config/model_config_internal_secondary.go | 47 +- dns_config/model_config_kerberos_key.go | 47 +- dns_config/model_config_lbdn.go | 52 +- dns_config/model_config_list_acl_response.go | 6 +- .../model_config_list_auth_nsg_response.go | 6 +- .../model_config_list_auth_zone_response.go | 6 +- .../model_config_list_delegation_response.go | 6 +- .../model_config_list_forward_nsg_response.go | 6 +- ...model_config_list_forward_zone_response.go | 6 +- dns_config/model_config_list_host_response.go | 6 +- dns_config/model_config_list_lbdn_response.go | 6 +- .../model_config_list_server_response.go | 6 +- dns_config/model_config_list_view_response.go | 6 +- dns_config/model_config_read_acl_response.go | 6 +- .../model_config_read_auth_nsg_response.go | 6 +- .../model_config_read_auth_zone_response.go | 6 +- .../model_config_read_delegation_response.go | 6 +- .../model_config_read_forward_nsg_response.go | 6 +- ...model_config_read_forward_zone_response.go | 6 +- .../model_config_read_global_response.go | 6 +- dns_config/model_config_read_host_response.go | 6 +- dns_config/model_config_read_lbdn_response.go | 6 +- .../model_config_read_server_response.go | 6 +- dns_config/model_config_read_view_response.go | 6 +- dns_config/model_config_root_ns.go | 48 +- dns_config/model_config_server.go | 49 +- dns_config/model_config_server_inheritance.go | 64 +- dns_config/model_config_sort_list_item.go | 47 +- dns_config/model_config_trust_anchor.go | 49 +- dns_config/model_config_tsig_key.go | 6 +- dns_config/model_config_ttl_inheritance.go | 6 +- .../model_config_update_acl_response.go | 6 +- .../model_config_update_auth_nsg_response.go | 6 +- .../model_config_update_auth_zone_response.go | 6 +- ...model_config_update_delegation_response.go | 6 +- ...odel_config_update_forward_nsg_response.go | 6 +- ...del_config_update_forward_zone_response.go | 6 +- .../model_config_update_global_response.go | 6 +- .../model_config_update_host_response.go | 6 +- .../model_config_update_lbdn_response.go | 6 +- .../model_config_update_server_response.go | 6 +- .../model_config_update_view_response.go | 6 +- dns_config/model_config_view.go | 57 +- dns_config/model_config_view_inheritance.go | 58 +- dns_config/model_config_warning.go | 6 +- dns_config/model_config_zone_authority.go | 6 +- ...odel_config_zone_authority_m_name_block.go | 6 +- .../model_inheritance2_assigned_host.go | 6 +- .../model_inheritance2_inherited_bool.go | 6 +- .../model_inheritance2_inherited_string.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_config/utils.go | 4 +- dns_data/.openapi-generator/VERSION | 2 +- dns_data/README.md | 24 +- dns_data/api_record.go | 300 +++++----- dns_data/client.go | 8 +- dns_data/docs/RecordAPI.md | 204 +++---- dns_data/model_data_create_record_response.go | 6 +- dns_data/model_data_list_record_response.go | 6 +- dns_data/model_data_read_record_response.go | 6 +- dns_data/model_data_record.go | 49 +- dns_data/model_data_record_inheritance.go | 6 +- ...model_data_soa_serial_increment_request.go | 6 +- ...odel_data_soa_serial_increment_response.go | 6 +- dns_data/model_data_update_record_response.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_data/model_protobuf_field_mask.go | 6 +- dns_data/utils.go | 4 +- infra_mgmt/.openapi-generator/VERSION | 2 +- infra_mgmt/README.md | 24 +- infra_mgmt/api_detail.go | 111 ++-- infra_mgmt/api_hosts.go | 419 +++++++------ infra_mgmt/api_services.go | 276 +++++---- infra_mgmt/client.go | 12 +- infra_mgmt/docs/DetailAPI.md | 88 +-- infra_mgmt/docs/HostsAPI.md | 288 ++++----- infra_mgmt/docs/ServicesAPI.md | 192 +++--- infra_mgmt/model_api_page_info.go | 6 +- infra_mgmt/model_infra_applications.go | 6 +- .../model_infra_applications_response.go | 6 +- infra_mgmt/model_infra_assign_tags_request.go | 12 +- .../model_infra_create_host_response.go | 6 +- .../model_infra_create_service_response.go | 6 +- infra_mgmt/model_infra_detail_host.go | 20 +- .../model_infra_detail_host_service_config.go | 10 +- infra_mgmt/model_infra_detail_location.go | 6 +- infra_mgmt/model_infra_detail_service.go | 12 +- infra_mgmt/model_infra_detail_service_host.go | 12 +- .../model_infra_detail_service_host_config.go | 12 +- infra_mgmt/model_infra_disconnect_request.go | 6 +- infra_mgmt/model_infra_get_host_response.go | 6 +- .../model_infra_get_service_response.go | 6 +- infra_mgmt/model_infra_host.go | 49 +- .../model_infra_list_detail_hosts_response.go | 8 +- ...del_infra_list_detail_services_response.go | 8 +- infra_mgmt/model_infra_list_host_response.go | 10 +- .../model_infra_list_service_response.go | 8 +- infra_mgmt/model_infra_pool_info.go | 6 +- .../model_infra_replace_host_request.go | 6 +- infra_mgmt/model_infra_service.go | 49 +- infra_mgmt/model_infra_service_host_config.go | 6 +- .../model_infra_short_service_status.go | 6 +- .../model_infra_unassign_tags_request.go | 8 +- .../model_infra_update_host_response.go | 6 +- .../model_infra_update_service_response.go | 6 +- infra_mgmt/utils.go | 4 +- infra_provision/.openapi-generator/VERSION | 2 +- infra_provision/README.md | 24 +- infra_provision/api_ui_join_token.go | 259 ++++---- infra_provision/api_uicsr.go | 220 ++++--- infra_provision/client.go | 8 +- infra_provision/docs/UICSRAPI.md | 170 +++--- infra_provision/docs/UIJoinTokenAPI.md | 188 +++--- infra_provision/model_api_page_info.go | 4 +- ...odel_hostactivation_approve_csr_request.go | 4 +- ...stactivation_create_join_token_response.go | 8 +- infra_provision/model_hostactivation_csr.go | 26 +- .../model_hostactivation_csr_state.go | 11 +- ...stactivation_delete_join_tokens_request.go | 4 +- .../model_hostactivation_deny_csr_request.go | 4 +- .../model_hostactivation_join_token.go | 65 +- ...model_hostactivation_list_csrs_response.go | 6 +- ...hostactivation_list_join_token_response.go | 6 +- ...hostactivation_read_join_token_response.go | 4 +- ...odel_hostactivation_revoke_cert_request.go | 6 +- ...stactivation_update_join_token_response.go | 4 +- .../model_join_token_join_token_status.go | 3 +- infra_provision/model_types_inet_value.go | 4 +- infra_provision/model_types_json_value.go | 4 +- infra_provision/utils.go | 2 +- ipam/.openapi-generator/VERSION | 2 +- ipam/README.md | 24 +- ipam/api_address.go | 247 ++++---- ipam/api_address_block.go | 560 +++++++++--------- ipam/api_asm.go | 116 ++-- ipam/api_dhcp_host.go | 195 +++--- ipam/api_dns_usage.go | 93 ++- ipam/api_filter.go | 58 +- ipam/api_fixed_address.go | 255 ++++---- ipam/api_global.go | 155 +++-- ipam/api_ha_group.go | 231 ++++---- ipam/api_hardware_filter.go | 243 ++++---- ipam/api_ip_space.go | 337 ++++++----- ipam/api_ipam_host.go | 247 ++++---- ipam/api_leases_command.go | 38 +- ipam/api_option_code.go | 207 ++++--- ipam/api_option_filter.go | 243 ++++---- ipam/api_option_group.go | 243 ++++---- ipam/api_option_space.go | 243 ++++---- ipam/api_range.go | 329 +++++----- ipam/api_server.go | 255 ++++---- ipam/api_subnet.go | 372 ++++++------ ipam/client.go | 44 +- ipam/docs/AddressAPI.md | 168 +++--- ipam/docs/AddressBlockAPI.md | 428 ++++++------- ipam/docs/AsmAPI.md | 94 +-- ipam/docs/DhcpHostAPI.md | 138 ++--- ipam/docs/DnsUsageAPI.md | 72 +-- ipam/docs/FilterAPI.md | 44 +- ipam/docs/FixedAddressAPI.md | 172 +++--- ipam/docs/GlobalAPI.md | 124 ++-- ipam/docs/HaGroupAPI.md | 168 +++--- ipam/docs/HardwareFilterAPI.md | 164 ++--- ipam/docs/IpSpaceAPI.md | 234 ++++---- ipam/docs/IpamHostAPI.md | 166 +++--- ipam/docs/LeasesCommandAPI.md | 30 +- ipam/docs/OptionCodeAPI.md | 160 ++--- ipam/docs/OptionFilterAPI.md | 164 ++--- ipam/docs/OptionGroupAPI.md | 164 ++--- ipam/docs/OptionSpaceAPI.md | 164 ++--- ipam/docs/RangeAPI.md | 240 ++++---- ipam/docs/ServerAPI.md | 172 +++--- ipam/docs/SubnetAPI.md | 272 ++++----- ipam/model_inheritance_assigned_host.go | 4 +- ipam/model_inheritance_inherited_bool.go | 4 +- ipam/model_inheritance_inherited_float.go | 4 +- .../model_inheritance_inherited_identifier.go | 4 +- ipam/model_inheritance_inherited_string.go | 4 +- ipam/model_inheritance_inherited_u_int32.go | 4 +- ...model_inherited_dhcp_config_filter_list.go | 4 +- ..._inherited_dhcp_config_ignore_item_list.go | 4 +- ipam/model_ipamsvc_access_filter.go | 45 +- ipam/model_ipamsvc_address.go | 49 +- ipam/model_ipamsvc_address_block.go | 20 +- ipam/model_ipamsvc_asm.go | 45 +- ipam/model_ipamsvc_asm_config.go | 6 +- ipam/model_ipamsvc_asm_enable_block.go | 4 +- ipam/model_ipamsvc_asm_growth_block.go | 4 +- ipam/model_ipamsvc_bulk_copy_error.go | 4 +- ipam/model_ipamsvc_bulk_copy_ip_space.go | 46 +- ...del_ipamsvc_bulk_copy_ip_space_response.go | 8 +- ipam/model_ipamsvc_copy_address_block.go | 45 +- ...del_ipamsvc_copy_address_block_response.go | 4 +- ipam/model_ipamsvc_copy_ip_space.go | 45 +- ipam/model_ipamsvc_copy_ip_space_response.go | 4 +- ipam/model_ipamsvc_copy_response.go | 4 +- ipam/model_ipamsvc_copy_subnet.go | 45 +- ipam/model_ipamsvc_copy_subnet_response.go | 4 +- ...l_ipamsvc_create_address_block_response.go | 4 +- ipam/model_ipamsvc_create_address_response.go | 4 +- ipam/model_ipamsvc_create_asm_response.go | 4 +- ...l_ipamsvc_create_fixed_address_response.go | 4 +- .../model_ipamsvc_create_ha_group_response.go | 4 +- ...ipamsvc_create_hardware_filter_response.go | 4 +- .../model_ipamsvc_create_ip_space_response.go | 4 +- ...model_ipamsvc_create_ipam_host_response.go | 4 +- ..._ipamsvc_create_leases_command_response.go | 4 +- ...amsvc_create_next_available_ab_response.go | 4 +- ...amsvc_create_next_available_ip_response.go | 4 +- ...c_create_next_available_subnet_response.go | 4 +- ...del_ipamsvc_create_option_code_response.go | 4 +- ...l_ipamsvc_create_option_filter_response.go | 4 +- ...el_ipamsvc_create_option_group_response.go | 4 +- ...el_ipamsvc_create_option_space_response.go | 4 +- ipam/model_ipamsvc_create_range_response.go | 4 +- ipam/model_ipamsvc_create_server_response.go | 4 +- ipam/model_ipamsvc_create_subnet_response.go | 4 +- ipam/model_ipamsvc_ddns_block.go | 4 +- ipam/model_ipamsvc_ddns_hostname_block.go | 4 +- ipam/model_ipamsvc_ddns_update_block.go | 4 +- ipam/model_ipamsvc_ddns_zone.go | 49 +- ipam/model_ipamsvc_dhcp_config.go | 4 +- ipam/model_ipamsvc_dhcp_info.go | 4 +- ipam/model_ipamsvc_dhcp_inheritance.go | 34 +- .../model_ipamsvc_dhcp_options_inheritance.go | 4 +- ipam/model_ipamsvc_dhcp_packet_stats.go | 4 +- ipam/model_ipamsvc_dhcp_utilization.go | 4 +- ...odel_ipamsvc_dhcp_utilization_threshold.go | 47 +- ipam/model_ipamsvc_dns_usage.go | 4 +- ipam/model_ipamsvc_exclusion_range.go | 46 +- ipam/model_ipamsvc_filter.go | 4 +- ipam/model_ipamsvc_fixed_address.go | 49 +- ...model_ipamsvc_fixed_address_inheritance.go | 12 +- ipam/model_ipamsvc_global.go | 8 +- ipam/model_ipamsvc_ha_group.go | 46 +- ipam/model_ipamsvc_ha_group_heartbeats.go | 4 +- ipam/model_ipamsvc_ha_group_host.go | 45 +- ipam/model_ipamsvc_hardware_filter.go | 45 +- ipam/model_ipamsvc_host.go | 6 +- ipam/model_ipamsvc_host_address.go | 4 +- ipam/model_ipamsvc_host_associated_server.go | 4 +- ...odel_ipamsvc_host_associations_response.go | 6 +- ipam/model_ipamsvc_host_name.go | 46 +- ipam/model_ipamsvc_hostname_rewrite_block.go | 4 +- ipam/model_ipamsvc_ignore_item.go | 46 +- ipam/model_ipamsvc_inherited_asm_config.go | 14 +- ...odel_ipamsvc_inherited_asm_enable_block.go | 8 +- ...odel_ipamsvc_inherited_asm_growth_block.go | 8 +- ipam/model_ipamsvc_inherited_ddns_block.go | 8 +- ...l_ipamsvc_inherited_ddns_hostname_block.go | 8 +- ...del_ipamsvc_inherited_ddns_update_block.go | 8 +- ipam/model_ipamsvc_inherited_dhcp_config.go | 24 +- ipam/model_ipamsvc_inherited_dhcp_option.go | 8 +- ...odel_ipamsvc_inherited_dhcp_option_item.go | 4 +- ...odel_ipamsvc_inherited_dhcp_option_list.go | 4 +- ...pamsvc_inherited_hostname_rewrite_block.go | 8 +- ipam/model_ipamsvc_ip_space.go | 57 +- ipam/model_ipamsvc_ip_space_inheritance.go | 38 +- ipam/model_ipamsvc_ipam_host.go | 45 +- ipam/model_ipamsvc_kerberos_key.go | 45 +- ipam/model_ipamsvc_lease_address.go | 4 +- ipam/model_ipamsvc_lease_range.go | 4 +- ipam/model_ipamsvc_lease_subnet.go | 4 +- ipam/model_ipamsvc_leases_command.go | 45 +- ...del_ipamsvc_list_address_block_response.go | 4 +- ipam/model_ipamsvc_list_address_response.go | 4 +- ipam/model_ipamsvc_list_asm_response.go | 4 +- ipam/model_ipamsvc_list_dns_usage_response.go | 4 +- ipam/model_ipamsvc_list_filter_response.go | 4 +- ...del_ipamsvc_list_fixed_address_response.go | 4 +- ipam/model_ipamsvc_list_ha_group_response.go | 4 +- ...l_ipamsvc_list_hardware_filter_response.go | 4 +- ipam/model_ipamsvc_list_host_response.go | 4 +- ipam/model_ipamsvc_list_ip_space_response.go | 4 +- ipam/model_ipamsvc_list_ipam_host_response.go | 4 +- ...model_ipamsvc_list_option_code_response.go | 4 +- ...del_ipamsvc_list_option_filter_response.go | 4 +- ...odel_ipamsvc_list_option_group_response.go | 4 +- ...odel_ipamsvc_list_option_space_response.go | 4 +- ipam/model_ipamsvc_list_range_response.go | 4 +- ipam/model_ipamsvc_list_server_response.go | 4 +- ipam/model_ipamsvc_list_subnet_response.go | 4 +- ipam/model_ipamsvc_name.go | 46 +- ipam/model_ipamsvc_nameserver.go | 6 +- ...odel_ipamsvc_next_available_ab_response.go | 4 +- ...odel_ipamsvc_next_available_ip_response.go | 4 +- ..._ipamsvc_next_available_subnet_response.go | 4 +- ipam/model_ipamsvc_option_code.go | 48 +- ipam/model_ipamsvc_option_filter.go | 48 +- ipam/model_ipamsvc_option_filter_rule.go | 46 +- ipam/model_ipamsvc_option_filter_rule_list.go | 4 +- ipam/model_ipamsvc_option_group.go | 45 +- ipam/model_ipamsvc_option_item.go | 4 +- ipam/model_ipamsvc_option_space.go | 45 +- ipam/model_ipamsvc_range.go | 56 +- ...del_ipamsvc_read_address_block_response.go | 4 +- ipam/model_ipamsvc_read_address_response.go | 4 +- ipam/model_ipamsvc_read_asm_response.go | 4 +- ipam/model_ipamsvc_read_dns_usage_response.go | 4 +- ...del_ipamsvc_read_fixed_address_response.go | 4 +- ipam/model_ipamsvc_read_global_response.go | 4 +- ipam/model_ipamsvc_read_ha_group_response.go | 4 +- ...l_ipamsvc_read_hardware_filter_response.go | 4 +- ipam/model_ipamsvc_read_host_response.go | 4 +- ipam/model_ipamsvc_read_ip_space_response.go | 4 +- ipam/model_ipamsvc_read_ipam_host_response.go | 4 +- ...model_ipamsvc_read_option_code_response.go | 4 +- ...del_ipamsvc_read_option_filter_response.go | 4 +- ...odel_ipamsvc_read_option_group_response.go | 4 +- ...odel_ipamsvc_read_option_space_response.go | 4 +- ipam/model_ipamsvc_read_range_response.go | 4 +- ipam/model_ipamsvc_read_server_response.go | 4 +- ipam/model_ipamsvc_read_subnet_response.go | 4 +- ipam/model_ipamsvc_server.go | 49 +- ipam/model_ipamsvc_server_inheritance.go | 34 +- ipam/model_ipamsvc_subnet.go | 20 +- ipam/model_ipamsvc_tsig_key.go | 45 +- ...l_ipamsvc_update_address_block_response.go | 4 +- ipam/model_ipamsvc_update_address_response.go | 4 +- ...l_ipamsvc_update_fixed_address_response.go | 4 +- ipam/model_ipamsvc_update_global_response.go | 4 +- .../model_ipamsvc_update_ha_group_response.go | 4 +- ...ipamsvc_update_hardware_filter_response.go | 4 +- ipam/model_ipamsvc_update_host_response.go | 4 +- .../model_ipamsvc_update_ip_space_response.go | 4 +- ...model_ipamsvc_update_ipam_host_response.go | 4 +- ...del_ipamsvc_update_option_code_response.go | 4 +- ...l_ipamsvc_update_option_filter_response.go | 4 +- ...el_ipamsvc_update_option_group_response.go | 4 +- ...el_ipamsvc_update_option_space_response.go | 4 +- ipam/model_ipamsvc_update_range_response.go | 4 +- ipam/model_ipamsvc_update_server_response.go | 4 +- ipam/model_ipamsvc_update_subnet_response.go | 4 +- ipam/model_ipamsvc_utilization.go | 4 +- ipam/model_ipamsvc_utilization_threshold.go | 47 +- ipam/model_ipamsvc_utilization_v6.go | 12 +- ipam/utils.go | 2 +- keys/.openapi-generator/VERSION | 2 +- keys/README.md | 24 +- keys/api_generate_tsig.go | 34 +- keys/api_kerberos.go | 209 ++++--- keys/api_tsig.go | 245 ++++---- keys/api_upload.go | 54 +- keys/client.go | 14 +- keys/docs/GenerateTsigAPI.md | 30 +- keys/docs/KerberosAPI.md | 164 ++--- keys/docs/TsigAPI.md | 164 ++--- keys/docs/UploadAPI.md | 30 +- keys/model_ddiupload_response.go | 6 +- keys/model_kerberos_key.go | 6 +- keys/model_kerberos_keys.go | 6 +- keys/model_keys_create_tsig_key_response.go | 6 +- keys/model_keys_generate_tsig_response.go | 6 +- keys/model_keys_generate_tsig_result.go | 6 +- keys/model_keys_list_kerberos_key_response.go | 6 +- keys/model_keys_list_tsig_key_response.go | 6 +- keys/model_keys_read_kerberos_key_response.go | 6 +- keys/model_keys_read_tsig_key_response.go | 6 +- keys/model_keys_tsig_key.go | 48 +- ...model_keys_update_kerberos_key_response.go | 6 +- keys/model_keys_update_tsig_key_response.go | 6 +- keys/model_protobuf_field_mask.go | 6 +- keys/model_upload_content_type.go | 5 +- keys/model_upload_request.go | 54 +- keys/utils.go | 4 +- 454 files changed, 12104 insertions(+), 9185 deletions(-) diff --git a/dns_config/.openapi-generator/VERSION b/dns_config/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/dns_config/.openapi-generator/VERSION +++ b/dns_config/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/dns_config/README.md b/dns_config/README.md index 9289f28..bbffe47 100644 --- a/dns_config/README.md +++ b/dns_config/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import dns_config "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_config.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), dns_config.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_config.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), dns_config.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_config.ContextOperationServerIndices` and `dns_config.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), dns_config.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -266,11 +266,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_config.ContextAPIKeys, + map[string]dns_config.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index c06e786..f9ed57d 100644 --- a/dns_config/api_acl.go +++ b/dns_config/api_acl.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type AclAPI interface { /* - AclCreate Create the ACL object. + AclCreate Create the ACL object. - Use this method to create an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to create an ACL object. +ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ AclCreate(ctx context.Context) ApiAclCreateRequest @@ -37,27 +38,27 @@ type AclAPI interface { // @return ConfigCreateACLResponse AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) /* - AclDelete Move the ACL object to Recyclebin. + AclDelete Move the ACL object to Recyclebin. - Use this method to move an ACL object to Recyclebin. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to move an ACL object to Recyclebin. +ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ AclDelete(ctx context.Context, id string) ApiAclDeleteRequest // AclDeleteExecute executes the request AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) /* - AclList List ACL objects. + AclList List ACL objects. - Use this method to list ACL objects. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to list ACL objects. +ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ AclList(ctx context.Context) ApiAclListRequest @@ -65,14 +66,14 @@ type AclAPI interface { // @return ConfigListACLResponse AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) /* - AclRead Read the ACL object. + AclRead Read the ACL object. - Use this method to read an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to read an ACL object. +ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ AclRead(ctx context.Context, id string) ApiAclReadRequest @@ -80,14 +81,14 @@ type AclAPI interface { // @return ConfigReadACLResponse AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) /* - AclUpdate Update the ACL object. + AclUpdate Update the ACL object. - Use this method to update an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to update an ACL object. +ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest @@ -100,9 +101,9 @@ type AclAPI interface { type AclAPIService internal.Service type ApiAclCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - body *ConfigACL + body *ConfigACL } func (r ApiAclCreateRequest) Body(body ConfigACL) ApiAclCreateRequest { @@ -120,25 +121,24 @@ AclCreate Create the ACL object. Use this method to create an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ func (a *AclAPIService) AclCreate(ctx context.Context) ApiAclCreateRequest { return ApiAclCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateACLResponse +// @return ConfigCreateACLResponse func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateACLResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclCreate") @@ -172,16 +172,16 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC } type ApiAclDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - id string + id string } func (r ApiAclDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ AclDelete Move the ACL object to Recyclebin. Use this method to move an ACL object to Recyclebin. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ func (a *AclAPIService) AclDelete(ctx context.Context, id string) ApiAclDeleteRequest { return ApiAclDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AclAPIService) AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclDelete") @@ -331,49 +331,49 @@ func (a *AclAPIService) AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, } type ApiAclListRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAclListRequest) Fields(fields string) ApiAclListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAclListRequest) Filter(filter string) ApiAclListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAclListRequest) Offset(offset int32) ApiAclListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAclListRequest) Limit(limit int32) ApiAclListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAclListRequest) PageToken(pageToken string) ApiAclListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAclListRequest) OrderBy(orderBy string) ApiAclListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ AclList List ACL objects. Use this method to list ACL objects. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ func (a *AclAPIService) AclList(ctx context.Context) ApiAclListRequest { return ApiAclListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListACLResponse +// @return ConfigListACLResponse func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListACLResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclList") @@ -519,13 +518,13 @@ func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLRespo } type ApiAclReadRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAclReadRequest) Fields(fields string) ApiAclReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ AclRead Read the ACL object. Use this method to read an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ func (a *AclAPIService) AclRead(ctx context.Context, id string) ApiAclReadRequest { return ApiAclReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadACLResponse +// @return ConfigReadACLResponse func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadACLResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclRead") @@ -641,10 +639,10 @@ func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLRespo } type ApiAclUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - id string - body *ConfigACL + id string + body *ConfigACL } func (r ApiAclUpdateRequest) Body(body ConfigACL) ApiAclUpdateRequest { @@ -662,27 +660,26 @@ AclUpdate Update the ACL object. Use this method to update an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ func (a *AclAPIService) AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest { return ApiAclUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateACLResponse +// @return ConfigUpdateACLResponse func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateACLResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclUpdate") @@ -717,16 +714,16 @@ func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_auth_nsg.go b/dns_config/api_auth_nsg.go index d2ed1ca..df8df8f 100644 --- a/dns_config/api_auth_nsg.go +++ b/dns_config/api_auth_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type AuthNsgAPI interface { /* - AuthNsgCreate Create the AuthNSG object. + AuthNsgCreate Create the AuthNSG object. - Use this method to create an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to create an AuthNSG object. +The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest @@ -37,27 +38,27 @@ type AuthNsgAPI interface { // @return ConfigCreateAuthNSGResponse AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) /* - AuthNsgDelete Move the AuthNSG object to Recyclebin. + AuthNsgDelete Move the AuthNSG object to Recyclebin. - Use this method to move an AuthNSG object to Recyclebin. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to move an AuthNSG object to Recyclebin. +The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest // AuthNsgDeleteExecute executes the request AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) /* - AuthNsgList List AuthNSG objects. + AuthNsgList List AuthNSG objects. - Use this method to list AuthNSG objects. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to list AuthNSG objects. +The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ AuthNsgList(ctx context.Context) ApiAuthNsgListRequest @@ -65,14 +66,14 @@ type AuthNsgAPI interface { // @return ConfigListAuthNSGResponse AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) /* - AuthNsgRead Read the AuthNSG object. + AuthNsgRead Read the AuthNSG object. - Use this method to read an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to read an AuthNSG object. +The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest @@ -80,14 +81,14 @@ type AuthNsgAPI interface { // @return ConfigReadAuthNSGResponse AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) /* - AuthNsgUpdate Update the AuthNSG object. + AuthNsgUpdate Update the AuthNSG object. - Use this method to update an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to update an AuthNSG object. +The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest @@ -100,9 +101,9 @@ type AuthNsgAPI interface { type AuthNsgAPIService internal.Service type ApiAuthNsgCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - body *ConfigAuthNSG + body *ConfigAuthNSG } func (r ApiAuthNsgCreateRequest) Body(body ConfigAuthNSG) ApiAuthNsgCreateRequest { @@ -120,25 +121,24 @@ AuthNsgCreate Create the AuthNSG object. Use this method to create an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ func (a *AuthNsgAPIService) AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest { return ApiAuthNsgCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateAuthNSGResponse +// @return ConfigCreateAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateAuthNSGResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgCreate") @@ -172,16 +172,16 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co } type ApiAuthNsgDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - id string + id string } func (r ApiAuthNsgDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ AuthNsgDelete Move the AuthNSG object to Recyclebin. Use this method to move an AuthNSG object to Recyclebin. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ func (a *AuthNsgAPIService) AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest { return ApiAuthNsgDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AuthNsgAPIService) AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgDelete") @@ -331,49 +331,49 @@ func (a *AuthNsgAPIService) AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*ht } type ApiAuthNsgListRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthNsgListRequest) Fields(fields string) ApiAuthNsgListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAuthNsgListRequest) Filter(filter string) ApiAuthNsgListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAuthNsgListRequest) Offset(offset int32) ApiAuthNsgListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAuthNsgListRequest) Limit(limit int32) ApiAuthNsgListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAuthNsgListRequest) PageToken(pageToken string) ApiAuthNsgListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAuthNsgListRequest) OrderBy(orderBy string) ApiAuthNsgListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ AuthNsgList List AuthNSG objects. Use this method to list AuthNSG objects. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ func (a *AuthNsgAPIService) AuthNsgList(ctx context.Context) ApiAuthNsgListRequest { return ApiAuthNsgListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListAuthNSGResponse +// @return ConfigListAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListAuthNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgList") @@ -519,13 +518,13 @@ func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*Config } type ApiAuthNsgReadRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthNsgReadRequest) Fields(fields string) ApiAuthNsgReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ AuthNsgRead Read the AuthNSG object. Use this method to read an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ func (a *AuthNsgAPIService) AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest { return ApiAuthNsgReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadAuthNSGResponse +// @return ConfigReadAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadAuthNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgRead") @@ -641,10 +639,10 @@ func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*Config } type ApiAuthNsgUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - id string - body *ConfigAuthNSG + id string + body *ConfigAuthNSG } func (r ApiAuthNsgUpdateRequest) Body(body ConfigAuthNSG) ApiAuthNsgUpdateRequest { @@ -662,27 +660,26 @@ AuthNsgUpdate Update the AuthNSG object. Use this method to update an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ func (a *AuthNsgAPIService) AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest { return ApiAuthNsgUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateAuthNSGResponse +// @return ConfigUpdateAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*ConfigUpdateAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateAuthNSGResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgUpdate") @@ -717,16 +714,16 @@ func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_auth_zone.go b/dns_config/api_auth_zone.go index c95502a..eb9bb7b 100644 --- a/dns_config/api_auth_zone.go +++ b/dns_config/api_auth_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type AuthZoneAPI interface { /* - AuthZoneCopy Copies the __AuthZone__ object. + AuthZoneCopy Copies the __AuthZone__ object. - Use this method to copy an __AuthZone__ object to a different __View__. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to copy an __AuthZone__ object to a different __View__. +This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest @@ -37,13 +38,13 @@ type AuthZoneAPI interface { // @return ConfigCopyAuthZoneResponse AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) /* - AuthZoneCreate Create the AuthZone object. + AuthZoneCreate Create the AuthZone object. - Use this method to create an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to create an AuthZone object. +This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest @@ -51,27 +52,27 @@ type AuthZoneAPI interface { // @return ConfigCreateAuthZoneResponse AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) /* - AuthZoneDelete Moves the AuthZone object to Recyclebin. + AuthZoneDelete Moves the AuthZone object to Recyclebin. - Use this method to move an AuthZone object to Recyclebin. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to move an AuthZone object to Recyclebin. +This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest // AuthZoneDeleteExecute executes the request AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) /* - AuthZoneList List AuthZone objects. + AuthZoneList List AuthZone objects. - Use this method to list AuthZone objects. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to list AuthZone objects. +This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ AuthZoneList(ctx context.Context) ApiAuthZoneListRequest @@ -79,14 +80,14 @@ type AuthZoneAPI interface { // @return ConfigListAuthZoneResponse AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) /* - AuthZoneRead Read the AuthZone object. + AuthZoneRead Read the AuthZone object. - Use this method to read an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to read an AuthZone object. +This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest @@ -94,14 +95,14 @@ type AuthZoneAPI interface { // @return ConfigReadAuthZoneResponse AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) /* - AuthZoneUpdate Update the AuthZone object. + AuthZoneUpdate Update the AuthZone object. - Use this method to update an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to update an AuthZone object. +This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest @@ -114,9 +115,9 @@ type AuthZoneAPI interface { type AuthZoneAPIService internal.Service type ApiAuthZoneCopyRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - body *ConfigCopyAuthZone + body *ConfigCopyAuthZone } func (r ApiAuthZoneCopyRequest) Body(body ConfigCopyAuthZone) ApiAuthZoneCopyRequest { @@ -134,25 +135,24 @@ AuthZoneCopy Copies the __AuthZone__ object. Use this method to copy an __AuthZone__ object to a different __View__. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ func (a *AuthZoneAPIService) AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest { return ApiAuthZoneCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCopyAuthZoneResponse +// @return ConfigCopyAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCopyAuthZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCopyAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneCopy") @@ -186,8 +186,8 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -233,10 +233,10 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con } type ApiAuthZoneCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - body *ConfigAuthZone - inherit *string + body *ConfigAuthZone + inherit *string } func (r ApiAuthZoneCreateRequest) Body(body ConfigAuthZone) ApiAuthZoneCreateRequest { @@ -260,25 +260,24 @@ AuthZoneCreate Create the AuthZone object. Use this method to create an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ func (a *AuthZoneAPIService) AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest { return ApiAuthZoneCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateAuthZoneResponse +// @return ConfigCreateAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateAuthZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneCreate") @@ -315,16 +314,16 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -370,9 +369,9 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( } type ApiAuthZoneDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - id string + id string } func (r ApiAuthZoneDeleteRequest) Execute() (*http.Response, error) { @@ -385,24 +384,24 @@ AuthZoneDelete Moves the AuthZone object to Recyclebin. Use this method to move an AuthZone object to Recyclebin. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ func (a *AuthZoneAPIService) AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest { return ApiAuthZoneDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AuthZoneAPIService) AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneDelete") @@ -474,50 +473,50 @@ func (a *AuthZoneAPIService) AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) ( } type ApiAuthZoneListRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthZoneListRequest) Fields(fields string) ApiAuthZoneListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAuthZoneListRequest) Filter(filter string) ApiAuthZoneListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAuthZoneListRequest) Offset(offset int32) ApiAuthZoneListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAuthZoneListRequest) Limit(limit int32) ApiAuthZoneListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAuthZoneListRequest) PageToken(pageToken string) ApiAuthZoneListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAuthZoneListRequest) OrderBy(orderBy string) ApiAuthZoneListRequest { r.orderBy = &orderBy return r @@ -551,25 +550,24 @@ AuthZoneList List AuthZone objects. Use this method to list AuthZone objects. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ func (a *AuthZoneAPIService) AuthZoneList(ctx context.Context) ApiAuthZoneListRequest { return ApiAuthZoneListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListAuthZoneResponse +// @return ConfigListAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListAuthZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneList") @@ -672,14 +670,14 @@ func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*Con } type ApiAuthZoneReadRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthZoneReadRequest) Fields(fields string) ApiAuthZoneReadRequest { r.fields = &fields return r @@ -701,27 +699,26 @@ AuthZoneRead Read the AuthZone object. Use this method to read an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ func (a *AuthZoneAPIService) AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest { return ApiAuthZoneReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadAuthZoneResponse +// @return ConfigReadAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadAuthZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneRead") @@ -804,11 +801,11 @@ func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*Con } type ApiAuthZoneUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - id string - body *ConfigAuthZone - inherit *string + id string + body *ConfigAuthZone + inherit *string } func (r ApiAuthZoneUpdateRequest) Body(body ConfigAuthZone) ApiAuthZoneUpdateRequest { @@ -832,27 +829,26 @@ AuthZoneUpdate Update the AuthZone object. Use this method to update an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ func (a *AuthZoneAPIService) AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest { return ApiAuthZoneUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateAuthZoneResponse +// @return ConfigUpdateAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) (*ConfigUpdateAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateAuthZoneResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneUpdate") @@ -890,16 +886,16 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_cache_flush.go b/dns_config/api_cache_flush.go index f3ca335..fddc796 100644 --- a/dns_config/api_cache_flush.go +++ b/dns_config/api_cache_flush.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,19 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type CacheFlushAPI interface { /* - CacheFlushCreate Create the Cache Flush object. + CacheFlushCreate Create the Cache Flush object. - Use this method to create a Cache Flush object. - The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. + Use this method to create a Cache Flush object. +The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest @@ -41,9 +42,9 @@ type CacheFlushAPI interface { type CacheFlushAPIService internal.Service type ApiCacheFlushCreateRequest struct { - ctx context.Context + ctx context.Context ApiService CacheFlushAPI - body *ConfigCacheFlush + body *ConfigCacheFlush } func (r ApiCacheFlushCreateRequest) Body(body ConfigCacheFlush) ApiCacheFlushCreateRequest { @@ -61,25 +62,24 @@ CacheFlushCreate Create the Cache Flush object. Use this method to create a Cache Flush object. The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ func (a *CacheFlushAPIService) CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest { return ApiCacheFlushCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CacheFlushAPIService.CacheFlushCreate") @@ -113,8 +113,8 @@ func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_convert_domain_name.go b/dns_config/api_convert_domain_name.go index cc1d7af..4c7de4c 100644 --- a/dns_config/api_convert_domain_name.go +++ b/dns_config/api_convert_domain_name.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ConvertDomainNameAPI interface { /* - ConvertDomainNameConvert Convert the object. + ConvertDomainNameConvert Convert the object. - Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). + Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param domainName Input domain name in either of IDN or punycode representations. - @return ApiConvertDomainNameConvertRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainName Input domain name in either of IDN or punycode representations. + @return ApiConvertDomainNameConvertRequest */ ConvertDomainNameConvert(ctx context.Context, domainName string) ApiConvertDomainNameConvertRequest @@ -42,7 +43,7 @@ type ConvertDomainNameAPI interface { type ConvertDomainNameAPIService internal.Service type ApiConvertDomainNameConvertRequest struct { - ctx context.Context + ctx context.Context ApiService ConvertDomainNameAPI domainName string } @@ -56,27 +57,26 @@ ConvertDomainNameConvert Convert the object. Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param domainName Input domain name in either of IDN or punycode representations. - @return ApiConvertDomainNameConvertRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainName Input domain name in either of IDN or punycode representations. + @return ApiConvertDomainNameConvertRequest */ func (a *ConvertDomainNameAPIService) ConvertDomainNameConvert(ctx context.Context, domainName string) ApiConvertDomainNameConvertRequest { return ApiConvertDomainNameConvertRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, domainName: domainName, } } // Execute executes the request -// -// @return ConfigConvertDomainNameResponse +// @return ConfigConvertDomainNameResponse func (a *ConvertDomainNameAPIService) ConvertDomainNameConvertExecute(r ApiConvertDomainNameConvertRequest) (*ConfigConvertDomainNameResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigConvertDomainNameResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigConvertDomainNameResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ConvertDomainNameAPIService.ConvertDomainNameConvert") diff --git a/dns_config/api_convert_rname.go b/dns_config/api_convert_rname.go index e15f007..a4ec468 100644 --- a/dns_config/api_convert_rname.go +++ b/dns_config/api_convert_rname.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ConvertRnameAPI interface { /* - ConvertRnameConvertRName Convert the object. + ConvertRnameConvertRName Convert the object. - Use this method to convert email address to the master file RNAME format. + Use this method to convert email address to the master file RNAME format. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param emailAddress Input email address. - @return ApiConvertRnameConvertRNameRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param emailAddress Input email address. + @return ApiConvertRnameConvertRNameRequest */ ConvertRnameConvertRName(ctx context.Context, emailAddress string) ApiConvertRnameConvertRNameRequest @@ -42,8 +43,8 @@ type ConvertRnameAPI interface { type ConvertRnameAPIService internal.Service type ApiConvertRnameConvertRNameRequest struct { - ctx context.Context - ApiService ConvertRnameAPI + ctx context.Context + ApiService ConvertRnameAPI emailAddress string } @@ -56,27 +57,26 @@ ConvertRnameConvertRName Convert the object. Use this method to convert email address to the master file RNAME format. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param emailAddress Input email address. - @return ApiConvertRnameConvertRNameRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param emailAddress Input email address. + @return ApiConvertRnameConvertRNameRequest */ func (a *ConvertRnameAPIService) ConvertRnameConvertRName(ctx context.Context, emailAddress string) ApiConvertRnameConvertRNameRequest { return ApiConvertRnameConvertRNameRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, emailAddress: emailAddress, } } // Execute executes the request -// -// @return ConfigConvertRNameResponse +// @return ConfigConvertRNameResponse func (a *ConvertRnameAPIService) ConvertRnameConvertRNameExecute(r ApiConvertRnameConvertRNameRequest) (*ConfigConvertRNameResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigConvertRNameResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigConvertRNameResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ConvertRnameAPIService.ConvertRnameConvertRName") diff --git a/dns_config/api_delegation.go b/dns_config/api_delegation.go index 1aae7b6..9523880 100644 --- a/dns_config/api_delegation.go +++ b/dns_config/api_delegation.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type DelegationAPI interface { /* - DelegationCreate Create the Delegation object. + DelegationCreate Create the Delegation object. - Use this method to create a Delegation object. - This object (_dns/delegation_) represents a zone delegation. + Use this method to create a Delegation object. +This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ DelegationCreate(ctx context.Context) ApiDelegationCreateRequest @@ -37,27 +38,27 @@ type DelegationAPI interface { // @return ConfigCreateDelegationResponse DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) /* - DelegationDelete Moves the Delegation object to Recyclebin. + DelegationDelete Moves the Delegation object to Recyclebin. - Use this method to move a Delegation object to Recyclebin. - This object (_dns/delegation_) represents a zone delegation. + Use this method to move a Delegation object to Recyclebin. +This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest // DelegationDeleteExecute executes the request DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) /* - DelegationList List Delegation objects. + DelegationList List Delegation objects. - Use this method to list Delegation objects. - This object (_dns/delegation_) represents a zone delegation. + Use this method to list Delegation objects. +This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ DelegationList(ctx context.Context) ApiDelegationListRequest @@ -65,14 +66,14 @@ type DelegationAPI interface { // @return ConfigListDelegationResponse DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) /* - DelegationRead Read the Delegation object. + DelegationRead Read the Delegation object. - Use this method to read a Delegation object. - This object (_dns/delegation)_ represents a zone delegation. + Use this method to read a Delegation object. +This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest @@ -80,14 +81,14 @@ type DelegationAPI interface { // @return ConfigReadDelegationResponse DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) /* - DelegationUpdate Update the Delegation object. + DelegationUpdate Update the Delegation object. - Use this method to update a Delegation object. - This object (_dns/delegation_) represents a zone delegation. + Use this method to update a Delegation object. +This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest @@ -100,9 +101,9 @@ type DelegationAPI interface { type DelegationAPIService internal.Service type ApiDelegationCreateRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - body *ConfigDelegation + body *ConfigDelegation } func (r ApiDelegationCreateRequest) Body(body ConfigDelegation) ApiDelegationCreateRequest { @@ -120,25 +121,24 @@ DelegationCreate Create the Delegation object. Use this method to create a Delegation object. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ func (a *DelegationAPIService) DelegationCreate(ctx context.Context) ApiDelegationCreateRequest { return ApiDelegationCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateDelegationResponse +// @return ConfigCreateDelegationResponse func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateDelegationResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationCreate") @@ -172,16 +172,16 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ } type ApiDelegationDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - id string + id string } func (r ApiDelegationDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ DelegationDelete Moves the Delegation object to Recyclebin. Use this method to move a Delegation object to Recyclebin. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ func (a *DelegationAPIService) DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest { return ApiDelegationDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *DelegationAPIService) DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationDelete") @@ -331,49 +331,49 @@ func (a *DelegationAPIService) DelegationDeleteExecute(r ApiDelegationDeleteRequ } type ApiDelegationListRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDelegationListRequest) Fields(fields string) ApiDelegationListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDelegationListRequest) Filter(filter string) ApiDelegationListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDelegationListRequest) Offset(offset int32) ApiDelegationListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDelegationListRequest) Limit(limit int32) ApiDelegationListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDelegationListRequest) PageToken(pageToken string) ApiDelegationListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDelegationListRequest) OrderBy(orderBy string) ApiDelegationListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ DelegationList List Delegation objects. Use this method to list Delegation objects. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ func (a *DelegationAPIService) DelegationList(ctx context.Context) ApiDelegationListRequest { return ApiDelegationListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListDelegationResponse +// @return ConfigListDelegationResponse func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListDelegationResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationList") @@ -519,13 +518,13 @@ func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) } type ApiDelegationReadRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDelegationReadRequest) Fields(fields string) ApiDelegationReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ DelegationRead Read the Delegation object. Use this method to read a Delegation object. This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ func (a *DelegationAPIService) DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest { return ApiDelegationReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadDelegationResponse +// @return ConfigReadDelegationResponse func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadDelegationResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationRead") @@ -641,10 +639,10 @@ func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) } type ApiDelegationUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - id string - body *ConfigDelegation + id string + body *ConfigDelegation } func (r ApiDelegationUpdateRequest) Body(body ConfigDelegation) ApiDelegationUpdateRequest { @@ -662,27 +660,26 @@ DelegationUpdate Update the Delegation object. Use this method to update a Delegation object. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ func (a *DelegationAPIService) DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest { return ApiDelegationUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateDelegationResponse +// @return ConfigUpdateDelegationResponse func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequest) (*ConfigUpdateDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateDelegationResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationUpdate") @@ -717,16 +714,16 @@ func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_forward_nsg.go b/dns_config/api_forward_nsg.go index 8d33d4b..7fa7bbe 100644 --- a/dns_config/api_forward_nsg.go +++ b/dns_config/api_forward_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ForwardNsgAPI interface { /* - ForwardNsgCreate Create the ForwardNSG object. + ForwardNsgCreate Create the ForwardNSG object. - Use this method to create a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to create a ForwardNSG object. +The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest @@ -37,27 +38,27 @@ type ForwardNsgAPI interface { // @return ConfigCreateForwardNSGResponse ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) /* - ForwardNsgDelete Move the ForwardNSG object to Recyclebin. + ForwardNsgDelete Move the ForwardNSG object to Recyclebin. - Use this method to move a ForwardNSG object to Recyclebin. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to move a ForwardNSG object to Recyclebin. +The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest // ForwardNsgDeleteExecute executes the request ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) /* - ForwardNsgList List ForwardNSG objects. + ForwardNsgList List ForwardNSG objects. - Use this method to list ForwardNSG objects. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to list ForwardNSG objects. +The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest @@ -65,14 +66,14 @@ type ForwardNsgAPI interface { // @return ConfigListForwardNSGResponse ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) /* - ForwardNsgRead Read the ForwardNSG object. + ForwardNsgRead Read the ForwardNSG object. - Use this method to read a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to read a ForwardNSG object. +The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest @@ -80,14 +81,14 @@ type ForwardNsgAPI interface { // @return ConfigReadForwardNSGResponse ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) /* - ForwardNsgUpdate Update the ForwardNSG object. + ForwardNsgUpdate Update the ForwardNSG object. - Use this method to update a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to update a ForwardNSG object. +The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest @@ -100,9 +101,9 @@ type ForwardNsgAPI interface { type ForwardNsgAPIService internal.Service type ApiForwardNsgCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - body *ConfigForwardNSG + body *ConfigForwardNSG } func (r ApiForwardNsgCreateRequest) Body(body ConfigForwardNSG) ApiForwardNsgCreateRequest { @@ -120,25 +121,24 @@ ForwardNsgCreate Create the ForwardNSG object. Use this method to create a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ func (a *ForwardNsgAPIService) ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest { return ApiForwardNsgCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateForwardNSGResponse +// @return ConfigCreateForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateForwardNSGResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgCreate") @@ -172,16 +172,16 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ } type ApiForwardNsgDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - id string + id string } func (r ApiForwardNsgDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ ForwardNsgDelete Move the ForwardNSG object to Recyclebin. Use this method to move a ForwardNSG object to Recyclebin. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ func (a *ForwardNsgAPIService) ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest { return ApiForwardNsgDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ForwardNsgAPIService) ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgDelete") @@ -331,49 +331,49 @@ func (a *ForwardNsgAPIService) ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequ } type ApiForwardNsgListRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardNsgListRequest) Fields(fields string) ApiForwardNsgListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiForwardNsgListRequest) Filter(filter string) ApiForwardNsgListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiForwardNsgListRequest) Offset(offset int32) ApiForwardNsgListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiForwardNsgListRequest) Limit(limit int32) ApiForwardNsgListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiForwardNsgListRequest) PageToken(pageToken string) ApiForwardNsgListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiForwardNsgListRequest) OrderBy(orderBy string) ApiForwardNsgListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ ForwardNsgList List ForwardNSG objects. Use this method to list ForwardNSG objects. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ func (a *ForwardNsgAPIService) ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest { return ApiForwardNsgListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListForwardNSGResponse +// @return ConfigListForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListForwardNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgList") @@ -519,13 +518,13 @@ func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) } type ApiForwardNsgReadRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardNsgReadRequest) Fields(fields string) ApiForwardNsgReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ ForwardNsgRead Read the ForwardNSG object. Use this method to read a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ func (a *ForwardNsgAPIService) ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest { return ApiForwardNsgReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadForwardNSGResponse +// @return ConfigReadForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadForwardNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgRead") @@ -641,10 +639,10 @@ func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) } type ApiForwardNsgUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - id string - body *ConfigForwardNSG + id string + body *ConfigForwardNSG } func (r ApiForwardNsgUpdateRequest) Body(body ConfigForwardNSG) ApiForwardNsgUpdateRequest { @@ -662,27 +660,26 @@ ForwardNsgUpdate Update the ForwardNSG object. Use this method to update a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ func (a *ForwardNsgAPIService) ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest { return ApiForwardNsgUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateForwardNSGResponse +// @return ConfigUpdateForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequest) (*ConfigUpdateForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateForwardNSGResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgUpdate") @@ -717,16 +714,16 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_forward_zone.go b/dns_config/api_forward_zone.go index 762417b..ba142f5 100644 --- a/dns_config/api_forward_zone.go +++ b/dns_config/api_forward_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ForwardZoneAPI interface { /* - ForwardZoneCopy Copies the __ForwardZone__ object. + ForwardZoneCopy Copies the __ForwardZone__ object. - Use this method to copy an __ForwardZone__ object to a different __View__. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to copy an __ForwardZone__ object to a different __View__. +This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest @@ -37,13 +38,13 @@ type ForwardZoneAPI interface { // @return ConfigCopyForwardZoneResponse ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) /* - ForwardZoneCreate Create the ForwardZone object. + ForwardZoneCreate Create the ForwardZone object. - Use this method to create a ForwardZone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to create a ForwardZone object. +This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest @@ -51,27 +52,27 @@ type ForwardZoneAPI interface { // @return ConfigCreateForwardZoneResponse ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) /* - ForwardZoneDelete Move the Forward Zone object to Recyclebin. + ForwardZoneDelete Move the Forward Zone object to Recyclebin. - Use this method to move a Forward Zone object to Recyclebin. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to move a Forward Zone object to Recyclebin. +This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest // ForwardZoneDeleteExecute executes the request ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) /* - ForwardZoneList List Forward Zone objects. + ForwardZoneList List Forward Zone objects. - Use this method to list Forward Zone objects. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to list Forward Zone objects. +This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest @@ -79,14 +80,14 @@ type ForwardZoneAPI interface { // @return ConfigListForwardZoneResponse ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) /* - ForwardZoneRead Read the Forward Zone object. + ForwardZoneRead Read the Forward Zone object. - Use this method to read a Forward Zone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to read a Forward Zone object. +This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest @@ -94,14 +95,14 @@ type ForwardZoneAPI interface { // @return ConfigReadForwardZoneResponse ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) /* - ForwardZoneUpdate Update the Forward Zone object. + ForwardZoneUpdate Update the Forward Zone object. - Use this method to update a Forward Zone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to update a Forward Zone object. +This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest @@ -114,9 +115,9 @@ type ForwardZoneAPI interface { type ForwardZoneAPIService internal.Service type ApiForwardZoneCopyRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - body *ConfigCopyForwardZone + body *ConfigCopyForwardZone } func (r ApiForwardZoneCopyRequest) Body(body ConfigCopyForwardZone) ApiForwardZoneCopyRequest { @@ -134,25 +135,24 @@ ForwardZoneCopy Copies the __ForwardZone__ object. Use this method to copy an __ForwardZone__ object to a different __View__. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ func (a *ForwardZoneAPIService) ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest { return ApiForwardZoneCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCopyForwardZoneResponse +// @return ConfigCopyForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCopyForwardZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCopyForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneCopy") @@ -186,8 +186,8 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -233,9 +233,9 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque } type ApiForwardZoneCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - body *ConfigForwardZone + body *ConfigForwardZone } func (r ApiForwardZoneCreateRequest) Body(body ConfigForwardZone) ApiForwardZoneCreateRequest { @@ -253,25 +253,24 @@ ForwardZoneCreate Create the ForwardZone object. Use this method to create a ForwardZone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ func (a *ForwardZoneAPIService) ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest { return ApiForwardZoneCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateForwardZoneResponse +// @return ConfigCreateForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateForwardZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneCreate") @@ -305,16 +304,16 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -360,9 +359,9 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR } type ApiForwardZoneDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - id string + id string } func (r ApiForwardZoneDeleteRequest) Execute() (*http.Response, error) { @@ -375,24 +374,24 @@ ForwardZoneDelete Move the Forward Zone object to Recyclebin. Use this method to move a Forward Zone object to Recyclebin. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ func (a *ForwardZoneAPIService) ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest { return ApiForwardZoneDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ForwardZoneAPIService) ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneDelete") @@ -464,49 +463,49 @@ func (a *ForwardZoneAPIService) ForwardZoneDeleteExecute(r ApiForwardZoneDeleteR } type ApiForwardZoneListRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardZoneListRequest) Fields(fields string) ApiForwardZoneListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiForwardZoneListRequest) Filter(filter string) ApiForwardZoneListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiForwardZoneListRequest) Offset(offset int32) ApiForwardZoneListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiForwardZoneListRequest) Limit(limit int32) ApiForwardZoneListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiForwardZoneListRequest) PageToken(pageToken string) ApiForwardZoneListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiForwardZoneListRequest) OrderBy(orderBy string) ApiForwardZoneListRequest { r.orderBy = &orderBy return r @@ -534,25 +533,24 @@ ForwardZoneList List Forward Zone objects. Use this method to list Forward Zone objects. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ func (a *ForwardZoneAPIService) ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest { return ApiForwardZoneListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListForwardZoneResponse +// @return ConfigListForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListForwardZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneList") @@ -652,13 +650,13 @@ func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListReque } type ApiForwardZoneReadRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardZoneReadRequest) Fields(fields string) ApiForwardZoneReadRequest { r.fields = &fields return r @@ -674,27 +672,26 @@ ForwardZoneRead Read the Forward Zone object. Use this method to read a Forward Zone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ func (a *ForwardZoneAPIService) ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest { return ApiForwardZoneReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadForwardZoneResponse +// @return ConfigReadForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadForwardZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneRead") @@ -774,10 +771,10 @@ func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadReque } type ApiForwardZoneUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - id string - body *ConfigForwardZone + id string + body *ConfigForwardZone } func (r ApiForwardZoneUpdateRequest) Body(body ConfigForwardZone) ApiForwardZoneUpdateRequest { @@ -795,27 +792,26 @@ ForwardZoneUpdate Update the Forward Zone object. Use this method to update a Forward Zone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ func (a *ForwardZoneAPIService) ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest { return ApiForwardZoneUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateForwardZoneResponse +// @return ConfigUpdateForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateRequest) (*ConfigUpdateForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateForwardZoneResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneUpdate") @@ -850,16 +846,16 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_global.go b/dns_config/api_global.go index 736b322..d9dcd14 100644 --- a/dns_config/api_global.go +++ b/dns_config/api_global.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type GlobalAPI interface { /* - GlobalRead Read the Global configuration object. + GlobalRead Read the Global configuration object. - Use this method to read the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. +Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest @@ -37,14 +38,14 @@ type GlobalAPI interface { // @return ConfigReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) /* - GlobalRead2 Read the Global configuration object. + GlobalRead2 Read the Global configuration object. - Use this method to read the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. +Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request @@ -52,13 +53,13 @@ type GlobalAPI interface { // @return ConfigReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) /* - GlobalUpdate Update the Global configuration object. + GlobalUpdate Update the Global configuration object. - Use this method to update the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. +Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest @@ -66,14 +67,14 @@ type GlobalAPI interface { // @return ConfigUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) /* - GlobalUpdate2 Update the Global configuration object. + GlobalUpdate2 Update the Global configuration object. - Use this method to update the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. +Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request @@ -86,12 +87,12 @@ type GlobalAPI interface { type GlobalAPIService internal.Service type ApiGlobalReadRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - fields *string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalReadRequest) Fields(fields string) ApiGlobalReadRequest { r.fields = &fields return r @@ -107,25 +108,24 @@ GlobalRead Read the Global configuration object. Use this method to read the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest { return ApiGlobalReadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigReadGlobalResponse +// @return ConfigReadGlobalResponse func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead") @@ -204,13 +204,13 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigRea } type ApiGlobalRead2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalRead2Request) Fields(fields string) ApiGlobalRead2Request { r.fields = &fields return r @@ -226,27 +226,26 @@ GlobalRead2 Read the Global configuration object. Use this method to read the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request { return ApiGlobalRead2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadGlobalResponse +// @return ConfigReadGlobalResponse func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead2") @@ -326,9 +325,9 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigR } type ApiGlobalUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - body *ConfigGlobal + body *ConfigGlobal } func (r ApiGlobalUpdateRequest) Body(body ConfigGlobal) ApiGlobalUpdateRequest { @@ -346,25 +345,24 @@ GlobalUpdate Update the Global configuration object. Use this method to update the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest { return ApiGlobalUpdateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigUpdateGlobalResponse +// @return ConfigUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate") @@ -398,8 +396,8 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -445,10 +443,10 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi } type ApiGlobalUpdate2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - body *ConfigGlobal + id string + body *ConfigGlobal } func (r ApiGlobalUpdate2Request) Body(body ConfigGlobal) ApiGlobalUpdate2Request { @@ -466,27 +464,26 @@ GlobalUpdate2 Update the Global configuration object. Use this method to update the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request { return ApiGlobalUpdate2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateGlobalResponse +// @return ConfigUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*ConfigUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate2") @@ -521,8 +518,8 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Con if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_host.go b/dns_config/api_host.go index fbef892..c458362 100644 --- a/dns_config/api_host.go +++ b/dns_config/api_host.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type HostAPI interface { /* - HostList List DNS Host objects. + HostList List DNS Host objects. - Use this method to list DNS Host objects. - A DNS Host object associates DNS configuration with hosts. + Use this method to list DNS Host objects. +A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ HostList(ctx context.Context) ApiHostListRequest @@ -37,14 +38,14 @@ type HostAPI interface { // @return ConfigListHostResponse HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) /* - HostRead Read the DNS Host object. + HostRead Read the DNS Host object. - Use this method to read a DNS Host object. - A DNS Host object associates DNS configuration with hosts. + Use this method to read a DNS Host object. +A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ HostRead(ctx context.Context, id string) ApiHostReadRequest @@ -52,14 +53,14 @@ type HostAPI interface { // @return ConfigReadHostResponse HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) /* - HostUpdate Update the DNS Host object. + HostUpdate Update the DNS Host object. - Use this method to update a DNS Host object. - A DNS Host object associates DNS configuration with hosts. + Use this method to update a DNS Host object. +A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest @@ -72,50 +73,50 @@ type HostAPI interface { type HostAPIService internal.Service type ApiHostListRequest struct { - ctx context.Context + ctx context.Context ApiService HostAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostListRequest) Fields(fields string) ApiHostListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHostListRequest) Filter(filter string) ApiHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHostListRequest) Offset(offset int32) ApiHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHostListRequest) Limit(limit int32) ApiHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHostListRequest) PageToken(pageToken string) ApiHostListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHostListRequest) OrderBy(orderBy string) ApiHostListRequest { r.orderBy = &orderBy return r @@ -149,25 +150,24 @@ HostList List DNS Host objects. Use this method to list DNS Host objects. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ func (a *HostAPIService) HostList(ctx context.Context) ApiHostListRequest { return ApiHostListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListHostResponse +// @return ConfigListHostResponse func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostAPIService.HostList") @@ -270,14 +270,14 @@ func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostR } type ApiHostReadRequest struct { - ctx context.Context + ctx context.Context ApiService HostAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostReadRequest) Fields(fields string) ApiHostReadRequest { r.fields = &fields return r @@ -299,27 +299,26 @@ HostRead Read the DNS Host object. Use this method to read a DNS Host object. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ func (a *HostAPIService) HostRead(ctx context.Context, id string) ApiHostReadRequest { return ApiHostReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadHostResponse +// @return ConfigReadHostResponse func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostAPIService.HostRead") @@ -402,11 +401,11 @@ func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostR } type ApiHostUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HostAPI - id string - body *ConfigHost - inherit *string + id string + body *ConfigHost + inherit *string } func (r ApiHostUpdateRequest) Body(body ConfigHost) ApiHostUpdateRequest { @@ -430,27 +429,26 @@ HostUpdate Update the DNS Host object. Use this method to update a DNS Host object. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ func (a *HostAPIService) HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest { return ApiHostUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateHostResponse +// @return ConfigUpdateHostResponse func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateHostResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostAPIService.HostUpdate") @@ -488,16 +486,16 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_lbdn.go b/dns_config/api_lbdn.go index 33c2318..56ff81a 100644 --- a/dns_config/api_lbdn.go +++ b/dns_config/api_lbdn.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,17 +18,18 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type LbdnAPI interface { /* - LbdnCreate Create the __LBDN__ object. + LbdnCreate Create the __LBDN__ object. - Use this method to create a __LBDN__ object. + Use this method to create a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnCreateRequest */ LbdnCreate(ctx context.Context) ApiLbdnCreateRequest @@ -36,25 +37,25 @@ type LbdnAPI interface { // @return ConfigCreateLBDNResponse LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) /* - LbdnDelete Delete the __LBDN__ object. + LbdnDelete Delete the __LBDN__ object. - Use this method to delete a __LBDN__ object. + Use this method to delete a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnDeleteRequest */ LbdnDelete(ctx context.Context, id string) ApiLbdnDeleteRequest // LbdnDeleteExecute executes the request LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Response, error) /* - LbdnList List __LBDN__ objects. + LbdnList List __LBDN__ objects. - Use this method to list __LBDN__ objects. + Use this method to list __LBDN__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnListRequest */ LbdnList(ctx context.Context) ApiLbdnListRequest @@ -62,13 +63,13 @@ type LbdnAPI interface { // @return ConfigListLBDNResponse LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) /* - LbdnRead Read the __LBDN__ object. + LbdnRead Read the __LBDN__ object. - Use this method to read a __LBDN__ object. + Use this method to read a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnReadRequest */ LbdnRead(ctx context.Context, id string) ApiLbdnReadRequest @@ -76,13 +77,13 @@ type LbdnAPI interface { // @return ConfigReadLBDNResponse LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) /* - LbdnUpdate Update the __LBDN__ object. + LbdnUpdate Update the __LBDN__ object. - Use this method to update a __LBDN__ object. + Use this method to update a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnUpdateRequest */ LbdnUpdate(ctx context.Context, id string) ApiLbdnUpdateRequest @@ -95,9 +96,9 @@ type LbdnAPI interface { type LbdnAPIService internal.Service type ApiLbdnCreateRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - body *ConfigLBDN + body *ConfigLBDN } func (r ApiLbdnCreateRequest) Body(body ConfigLBDN) ApiLbdnCreateRequest { @@ -114,25 +115,24 @@ LbdnCreate Create the __LBDN__ object. Use this method to create a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnCreateRequest */ func (a *LbdnAPIService) LbdnCreate(ctx context.Context) ApiLbdnCreateRequest { return ApiLbdnCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateLBDNResponse +// @return ConfigCreateLBDNResponse func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateLBDNResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnCreate") @@ -166,16 +166,16 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -221,9 +221,9 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat } type ApiLbdnDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - id string + id string } func (r ApiLbdnDeleteRequest) Execute() (*http.Response, error) { @@ -235,24 +235,24 @@ LbdnDelete Delete the __LBDN__ object. Use this method to delete a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnDeleteRequest */ func (a *LbdnAPIService) LbdnDelete(ctx context.Context, id string) ApiLbdnDeleteRequest { return ApiLbdnDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *LbdnAPIService) LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnDelete") @@ -324,49 +324,49 @@ func (a *LbdnAPIService) LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Respon } type ApiLbdnListRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiLbdnListRequest) Fields(fields string) ApiLbdnListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiLbdnListRequest) Filter(filter string) ApiLbdnListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiLbdnListRequest) Offset(offset int32) ApiLbdnListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiLbdnListRequest) Limit(limit int32) ApiLbdnListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiLbdnListRequest) PageToken(pageToken string) ApiLbdnListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiLbdnListRequest) OrderBy(orderBy string) ApiLbdnListRequest { r.orderBy = &orderBy return r @@ -393,25 +393,24 @@ LbdnList List __LBDN__ objects. Use this method to list __LBDN__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnListRequest */ func (a *LbdnAPIService) LbdnList(ctx context.Context) ApiLbdnListRequest { return ApiLbdnListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListLBDNResponse +// @return ConfigListLBDNResponse func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListLBDNResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnList") @@ -511,13 +510,13 @@ func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNR } type ApiLbdnReadRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiLbdnReadRequest) Fields(fields string) ApiLbdnReadRequest { r.fields = &fields return r @@ -532,27 +531,26 @@ LbdnRead Read the __LBDN__ object. Use this method to read a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnReadRequest */ func (a *LbdnAPIService) LbdnRead(ctx context.Context, id string) ApiLbdnReadRequest { return ApiLbdnReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadLBDNResponse +// @return ConfigReadLBDNResponse func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadLBDNResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnRead") @@ -632,10 +630,10 @@ func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNR } type ApiLbdnUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - id string - body *ConfigLBDN + id string + body *ConfigLBDN } func (r ApiLbdnUpdateRequest) Body(body ConfigLBDN) ApiLbdnUpdateRequest { @@ -652,27 +650,26 @@ LbdnUpdate Update the __LBDN__ object. Use this method to update a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnUpdateRequest */ func (a *LbdnAPIService) LbdnUpdate(ctx context.Context, id string) ApiLbdnUpdateRequest { return ApiLbdnUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateLBDNResponse +// @return ConfigUpdateLBDNResponse func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdateLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateLBDNResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnUpdate") @@ -707,16 +704,16 @@ func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_server.go b/dns_config/api_server.go index f759fa5..10af03f 100644 --- a/dns_config/api_server.go +++ b/dns_config/api_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ServerAPI interface { /* - ServerCreate Create the Server object. + ServerCreate Create the Server object. - Use this method to create a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a Server object. +A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest @@ -37,27 +38,27 @@ type ServerAPI interface { // @return ConfigCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) /* - ServerDelete Move the Server object to Recyclebin. + ServerDelete Move the Server object to Recyclebin. - Use this method to move a Server object to Recyclebin. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a Server object to Recyclebin. +A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) /* - ServerList List Server objects. + ServerList List Server objects. - Use this method to list Server objects. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to list Server objects. +A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest @@ -65,14 +66,14 @@ type ServerAPI interface { // @return ConfigListServerResponse ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) /* - ServerRead Read the Server object. + ServerRead Read the Server object. - Use this method to read a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to read a Server object. +A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest @@ -80,14 +81,14 @@ type ServerAPI interface { // @return ConfigReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) /* - ServerUpdate Update the Server object. + ServerUpdate Update the Server object. - Use this method to update a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a Server object. +A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest @@ -100,10 +101,10 @@ type ServerAPI interface { type ServerAPIService internal.Service type ApiServerCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - body *ConfigServer - inherit *string + body *ConfigServer + inherit *string } func (r ApiServerCreateRequest) Body(body ConfigServer) ApiServerCreateRequest { @@ -127,25 +128,24 @@ ServerCreate Create the Server object. Use this method to create a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequest { return ApiServerCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateServerResponse +// @return ConfigCreateServerResponse func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateServerResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerCreate") @@ -182,16 +182,16 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -237,9 +237,9 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi } type ApiServerDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string + id string } func (r ApiServerDeleteRequest) Execute() (*http.Response, error) { @@ -252,24 +252,24 @@ ServerDelete Move the Server object to Recyclebin. Use this method to move a Server object to Recyclebin. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ func (a *ServerAPIService) ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest { return ApiServerDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerDelete") @@ -341,50 +341,50 @@ func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http. } type ApiServerListRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerListRequest) Fields(fields string) ApiServerListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServerListRequest) Filter(filter string) ApiServerListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServerListRequest) Offset(offset int32) ApiServerListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServerListRequest) Limit(limit int32) ApiServerListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServerListRequest) PageToken(pageToken string) ApiServerListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServerListRequest) OrderBy(orderBy string) ApiServerListRequest { r.orderBy = &orderBy return r @@ -418,25 +418,24 @@ ServerList List Server objects. Use this method to list Server objects. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest { return ApiServerListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListServerResponse +// @return ConfigListServerResponse func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerList") @@ -539,14 +538,14 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigLis } type ApiServerReadRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerReadRequest) Fields(fields string) ApiServerReadRequest { r.fields = &fields return r @@ -568,27 +567,26 @@ ServerRead Read the Server object. Use this method to read a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerReadRequest { return ApiServerReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadServerResponse +// @return ConfigReadServerResponse func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerRead") @@ -671,11 +669,11 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigRea } type ApiServerUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - body *ConfigServer - inherit *string + id string + body *ConfigServer + inherit *string } func (r ApiServerUpdateRequest) Body(body ConfigServer) ApiServerUpdateRequest { @@ -699,27 +697,26 @@ ServerUpdate Update the Server object. Use this method to update a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest { return ApiServerUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateServerResponse +// @return ConfigUpdateServerResponse func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*ConfigUpdateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateServerResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerUpdate") @@ -757,16 +754,16 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_view.go b/dns_config/api_view.go index 5bd8d32..c501003 100644 --- a/dns_config/api_view.go +++ b/dns_config/api_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ViewAPI interface { /* - ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. + ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. - Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. - The __AuthZone__ object represents an authoritative zone. - The __ForwardZone__ object represents a forwarding zone. + Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. +The __AuthZone__ object represents an authoritative zone. +The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest @@ -38,13 +39,13 @@ type ViewAPI interface { // @return ConfigBulkCopyResponse ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) /* - ViewCreate Create the View object. + ViewCreate Create the View object. - Use this method to create a View object. - Named collection of DNS View settings. + Use this method to create a View object. +Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ ViewCreate(ctx context.Context) ApiViewCreateRequest @@ -52,27 +53,27 @@ type ViewAPI interface { // @return ConfigCreateViewResponse ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) /* - ViewDelete Move the View object to Recyclebin. + ViewDelete Move the View object to Recyclebin. - Use this method to move a View object to Recyclebin. - Named collection of DNS View settings. + Use this method to move a View object to Recyclebin. +Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest // ViewDeleteExecute executes the request ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) /* - ViewList List View objects. + ViewList List View objects. - Use this method to list View objects. - Named collection of DNS View settings. + Use this method to list View objects. +Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ ViewList(ctx context.Context) ApiViewListRequest @@ -80,14 +81,14 @@ type ViewAPI interface { // @return ConfigListViewResponse ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) /* - ViewRead Read the View object. + ViewRead Read the View object. - Use this method to read a View object. - Named collection of DNS View settings. + Use this method to read a View object. +Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ ViewRead(ctx context.Context, id string) ApiViewReadRequest @@ -95,14 +96,14 @@ type ViewAPI interface { // @return ConfigReadViewResponse ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) /* - ViewUpdate Update the View object. + ViewUpdate Update the View object. - Use this method to update a View object. - Named collection of DNS View settings. + Use this method to update a View object. +Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest @@ -115,9 +116,9 @@ type ViewAPI interface { type ViewAPIService internal.Service type ApiViewBulkCopyRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - body *ConfigBulkCopyView + body *ConfigBulkCopyView } func (r ApiViewBulkCopyRequest) Body(body ConfigBulkCopyView) ApiViewBulkCopyRequest { @@ -136,25 +137,24 @@ Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one _ The __AuthZone__ object represents an authoritative zone. The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ func (a *ViewAPIService) ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest { return ApiViewBulkCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigBulkCopyResponse +// @return ConfigBulkCopyResponse func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigBulkCopyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigBulkCopyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewBulkCopy") @@ -188,8 +188,8 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -235,10 +235,10 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB } type ApiViewCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - body *ConfigView - inherit *string + body *ConfigView + inherit *string } func (r ApiViewCreateRequest) Body(body ConfigView) ApiViewCreateRequest { @@ -262,25 +262,24 @@ ViewCreate Create the View object. Use this method to create a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ func (a *ViewAPIService) ViewCreate(ctx context.Context) ApiViewCreateRequest { return ApiViewCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigCreateViewResponse +// @return ConfigCreateViewResponse func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateViewResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewCreate") @@ -317,16 +316,16 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -372,9 +371,9 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat } type ApiViewDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - id string + id string } func (r ApiViewDeleteRequest) Execute() (*http.Response, error) { @@ -387,24 +386,24 @@ ViewDelete Move the View object to Recyclebin. Use this method to move a View object to Recyclebin. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ func (a *ViewAPIService) ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest { return ApiViewDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ViewAPIService) ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewDelete") @@ -476,50 +475,50 @@ func (a *ViewAPIService) ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Respon } type ApiViewListRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiViewListRequest) Fields(fields string) ApiViewListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiViewListRequest) Filter(filter string) ApiViewListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiViewListRequest) Offset(offset int32) ApiViewListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiViewListRequest) Limit(limit int32) ApiViewListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiViewListRequest) PageToken(pageToken string) ApiViewListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiViewListRequest) OrderBy(orderBy string) ApiViewListRequest { r.orderBy = &orderBy return r @@ -553,25 +552,24 @@ ViewList List View objects. Use this method to list View objects. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ func (a *ViewAPIService) ViewList(ctx context.Context) ApiViewListRequest { return ApiViewListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return ConfigListViewResponse +// @return ConfigListViewResponse func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListViewResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewList") @@ -674,14 +672,14 @@ func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewR } type ApiViewReadRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiViewReadRequest) Fields(fields string) ApiViewReadRequest { r.fields = &fields return r @@ -703,27 +701,26 @@ ViewRead Read the View object. Use this method to read a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ func (a *ViewAPIService) ViewRead(ctx context.Context, id string) ApiViewReadRequest { return ApiViewReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigReadViewResponse +// @return ConfigReadViewResponse func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadViewResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewRead") @@ -806,11 +803,11 @@ func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewR } type ApiViewUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - id string - body *ConfigView - inherit *string + id string + body *ConfigView + inherit *string } func (r ApiViewUpdateRequest) Body(body ConfigView) ApiViewUpdateRequest { @@ -834,27 +831,26 @@ ViewUpdate Update the View object. Use this method to update a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ func (a *ViewAPIService) ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest { return ApiViewUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return ConfigUpdateViewResponse +// @return ConfigUpdateViewResponse func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdateViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateViewResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewUpdate") @@ -892,16 +888,16 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/client.go b/dns_config/client.go index 95b6d87..2df6699 100644 --- a/dns_config/client.go +++ b/dns_config/client.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package dns_config import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,30 +19,30 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DNS Configuration API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - AclAPI AclAPI - AuthNsgAPI AuthNsgAPI - AuthZoneAPI AuthZoneAPI - CacheFlushAPI CacheFlushAPI + AclAPI AclAPI + AuthNsgAPI AuthNsgAPI + AuthZoneAPI AuthZoneAPI + CacheFlushAPI CacheFlushAPI ConvertDomainNameAPI ConvertDomainNameAPI - ConvertRnameAPI ConvertRnameAPI - DelegationAPI DelegationAPI - ForwardNsgAPI ForwardNsgAPI - ForwardZoneAPI ForwardZoneAPI - GlobalAPI GlobalAPI - HostAPI HostAPI - LbdnAPI LbdnAPI - ServerAPI ServerAPI - ViewAPI ViewAPI + ConvertRnameAPI ConvertRnameAPI + DelegationAPI DelegationAPI + ForwardNsgAPI ForwardNsgAPI + ForwardZoneAPI ForwardZoneAPI + GlobalAPI GlobalAPI + HostAPI HostAPI + LbdnAPI LbdnAPI + ServerAPI ServerAPI + ViewAPI ViewAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.AclAPI = (*AclAPIService)(&c.Common) diff --git a/dns_config/docs/AclAPI.md b/dns_config/docs/AclAPI.md index cb8cd18..2186694 100644 --- a/dns_config/docs/AclAPI.md +++ b/dns_config/docs/AclAPI.md @@ -26,24 +26,24 @@ Create the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclCreate`: ConfigCreateACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclCreate`: %v\n", resp) + body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclCreate`: ConfigCreateACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the ACL object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List ACL objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclList`: ConfigListACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclList`: ConfigListACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclRead`: ConfigReadACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclRead`: ConfigReadACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclUpdate`: ConfigUpdateACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclUpdate`: ConfigUpdateACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/AuthNsgAPI.md b/dns_config/docs/AuthNsgAPI.md index c121ebd..57a9e46 100644 --- a/dns_config/docs/AuthNsgAPI.md +++ b/dns_config/docs/AuthNsgAPI.md @@ -26,24 +26,24 @@ Create the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgCreate`: ConfigCreateAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgCreate`: %v\n", resp) + body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgCreate`: ConfigCreateAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the AuthNSG object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List AuthNSG objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgList`: ConfigListAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgList`: ConfigListAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgRead`: ConfigReadAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgRead`: ConfigReadAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgUpdate`: ConfigUpdateAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgUpdate`: ConfigUpdateAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/AuthZoneAPI.md b/dns_config/docs/AuthZoneAPI.md index 041d137..3191123 100644 --- a/dns_config/docs/AuthZoneAPI.md +++ b/dns_config/docs/AuthZoneAPI.md @@ -27,24 +27,24 @@ Copies the __AuthZone__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCopyAuthZone("TargetView_example") // ConfigCopyAuthZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneCopy`: ConfigCopyAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCopy`: %v\n", resp) + body := *openapiclient.NewConfigCopyAuthZone("TargetView_example") // ConfigCopyAuthZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneCopy`: ConfigCopyAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCopy`: %v\n", resp) } ``` @@ -93,25 +93,25 @@ Create the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneCreate`: ConfigCreateAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCreate`: %v\n", resp) + body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneCreate`: ConfigCreateAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCreate`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Moves the AuthZone object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,32 +229,32 @@ List AuthZone objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneList`: ConfigListAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneList`: ConfigListAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneList`: %v\n", resp) } ``` @@ -311,26 +311,26 @@ Read the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneRead`: ConfigReadAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneRead`: ConfigReadAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneRead`: %v\n", resp) } ``` @@ -385,26 +385,26 @@ Update the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneUpdate`: ConfigUpdateAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneUpdate`: ConfigUpdateAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/CacheFlushAPI.md b/dns_config/docs/CacheFlushAPI.md index 7bc0fa2..9354a5f 100644 --- a/dns_config/docs/CacheFlushAPI.md +++ b/dns_config/docs/CacheFlushAPI.md @@ -22,24 +22,24 @@ Create the Cache Flush object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCacheFlush() // ConfigCacheFlush | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CacheFlushAPI.CacheFlushCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CacheFlushCreate`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `CacheFlushAPI.CacheFlushCreate`: %v\n", resp) + body := *openapiclient.NewConfigCacheFlush() // ConfigCacheFlush | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CacheFlushAPI.CacheFlushCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CacheFlushCreate`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `CacheFlushAPI.CacheFlushCreate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ConvertDomainNameAPI.md b/dns_config/docs/ConvertDomainNameAPI.md index 9843f03..cb6e7c9 100644 --- a/dns_config/docs/ConvertDomainNameAPI.md +++ b/dns_config/docs/ConvertDomainNameAPI.md @@ -22,24 +22,24 @@ Convert the object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - domainName := "domainName_example" // string | Input domain name in either of IDN or punycode representations. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConvertDomainNameAPI.ConvertDomainNameConvert``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ConvertDomainNameConvert`: ConfigConvertDomainNameResponse - fmt.Fprintf(os.Stdout, "Response from `ConvertDomainNameAPI.ConvertDomainNameConvert`: %v\n", resp) + domainName := "domainName_example" // string | Input domain name in either of IDN or punycode representations. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConvertDomainNameAPI.ConvertDomainNameConvert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConvertDomainNameConvert`: ConfigConvertDomainNameResponse + fmt.Fprintf(os.Stdout, "Response from `ConvertDomainNameAPI.ConvertDomainNameConvert`: %v\n", resp) } ``` diff --git a/dns_config/docs/ConvertRnameAPI.md b/dns_config/docs/ConvertRnameAPI.md index a7f16be..226ce47 100644 --- a/dns_config/docs/ConvertRnameAPI.md +++ b/dns_config/docs/ConvertRnameAPI.md @@ -22,24 +22,24 @@ Convert the object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - emailAddress := "emailAddress_example" // string | Input email address. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConvertRnameAPI.ConvertRnameConvertRName``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ConvertRnameConvertRName`: ConfigConvertRNameResponse - fmt.Fprintf(os.Stdout, "Response from `ConvertRnameAPI.ConvertRnameConvertRName`: %v\n", resp) + emailAddress := "emailAddress_example" // string | Input email address. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConvertRnameAPI.ConvertRnameConvertRName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConvertRnameConvertRName`: ConfigConvertRNameResponse + fmt.Fprintf(os.Stdout, "Response from `ConvertRnameAPI.ConvertRnameConvertRName`: %v\n", resp) } ``` diff --git a/dns_config/docs/DelegationAPI.md b/dns_config/docs/DelegationAPI.md index 0139c9d..5921d77 100644 --- a/dns_config/docs/DelegationAPI.md +++ b/dns_config/docs/DelegationAPI.md @@ -26,24 +26,24 @@ Create the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigDelegation() // ConfigDelegation | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationCreate`: ConfigCreateDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationCreate`: %v\n", resp) + body := *openapiclient.NewConfigDelegation() // ConfigDelegation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationCreate`: ConfigCreateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Moves the Delegation object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List Delegation objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationList`: ConfigListDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationList`: ConfigListDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationRead`: ConfigReadDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationRead`: ConfigReadDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigDelegation() // ConfigDelegation | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationUpdate`: ConfigUpdateDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigDelegation() // ConfigDelegation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationUpdate`: ConfigUpdateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ForwardNsgAPI.md b/dns_config/docs/ForwardNsgAPI.md index ccf787f..a887b7e 100644 --- a/dns_config/docs/ForwardNsgAPI.md +++ b/dns_config/docs/ForwardNsgAPI.md @@ -26,24 +26,24 @@ Create the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgCreate`: ConfigCreateForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgCreate`: %v\n", resp) + body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgCreate`: ConfigCreateForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the ForwardNSG object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List ForwardNSG objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgList`: ConfigListForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgList`: ConfigListForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgRead`: ConfigReadForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgRead`: ConfigReadForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgUpdate`: ConfigUpdateForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgUpdate`: ConfigUpdateForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ForwardZoneAPI.md b/dns_config/docs/ForwardZoneAPI.md index ae7ff8b..746faaa 100644 --- a/dns_config/docs/ForwardZoneAPI.md +++ b/dns_config/docs/ForwardZoneAPI.md @@ -27,24 +27,24 @@ Copies the __ForwardZone__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCopyForwardZone("TargetView_example") // ConfigCopyForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneCopy`: ConfigCopyForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCopy`: %v\n", resp) + body := *openapiclient.NewConfigCopyForwardZone("TargetView_example") // ConfigCopyForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneCopy`: ConfigCopyForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCopy`: %v\n", resp) } ``` @@ -93,24 +93,24 @@ Create the ForwardZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneCreate`: ConfigCreateForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCreate`: %v\n", resp) + body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneCreate`: ConfigCreateForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCreate`: %v\n", resp) } ``` @@ -159,22 +159,22 @@ Move the Forward Zone object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -227,31 +227,31 @@ List Forward Zone objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneList`: ConfigListForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneList`: ConfigListForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneList`: %v\n", resp) } ``` @@ -307,25 +307,25 @@ Read the Forward Zone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneRead`: ConfigReadForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneRead`: ConfigReadForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneRead`: %v\n", resp) } ``` @@ -379,25 +379,25 @@ Update the Forward Zone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneUpdate`: ConfigUpdateForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneUpdate`: ConfigUpdateForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/GlobalAPI.md b/dns_config/docs/GlobalAPI.md index 6dd47b5..da7aac9 100644 --- a/dns_config/docs/GlobalAPI.md +++ b/dns_config/docs/GlobalAPI.md @@ -25,24 +25,24 @@ Read the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead`: ConfigReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead`: ConfigReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) } ``` @@ -91,25 +91,25 @@ Read the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead2`: ConfigReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead2`: ConfigReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) } ``` @@ -163,24 +163,24 @@ Update the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate`: ConfigUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) + body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate`: ConfigUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) } ``` @@ -229,25 +229,25 @@ Update the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate2`: ConfigUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate2`: ConfigUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) } ``` diff --git a/dns_config/docs/HostAPI.md b/dns_config/docs/HostAPI.md index c6433fa..897dc01 100644 --- a/dns_config/docs/HostAPI.md +++ b/dns_config/docs/HostAPI.md @@ -24,32 +24,32 @@ List DNS Host objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostList`: ConfigListHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostList`: ConfigListHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostList`: %v\n", resp) } ``` @@ -106,26 +106,26 @@ Read the DNS Host object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostRead`: ConfigReadHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostRead`: ConfigReadHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostRead`: %v\n", resp) } ``` @@ -180,26 +180,26 @@ Update the DNS Host object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigHost() // ConfigHost | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostUpdate`: ConfigUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigHost() // ConfigHost | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostUpdate`: ConfigUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/LbdnAPI.md b/dns_config/docs/LbdnAPI.md index e21786e..cd45642 100644 --- a/dns_config/docs/LbdnAPI.md +++ b/dns_config/docs/LbdnAPI.md @@ -26,24 +26,24 @@ Create the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnCreate`: ConfigCreateLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnCreate`: %v\n", resp) + body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnCreate`: ConfigCreateLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List __LBDN__ objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnList`: ConfigListLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnList`: ConfigListLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnRead`: ConfigReadLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnRead`: ConfigReadLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnUpdate`: ConfigUpdateLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnUpdate`: ConfigUpdateLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ServerAPI.md b/dns_config/docs/ServerAPI.md index 3413e39..4b8e307 100644 --- a/dns_config/docs/ServerAPI.md +++ b/dns_config/docs/ServerAPI.md @@ -26,25 +26,25 @@ Create the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerCreate`: ConfigCreateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) + body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerCreate`: ConfigCreateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the Server object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ List Server objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerList`: ConfigListServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerList`: ConfigListServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Read the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerRead`: ConfigReadServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerRead`: ConfigReadServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerUpdate`: ConfigUpdateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerUpdate`: ConfigUpdateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ViewAPI.md b/dns_config/docs/ViewAPI.md index 88cb110..c3106ba 100644 --- a/dns_config/docs/ViewAPI.md +++ b/dns_config/docs/ViewAPI.md @@ -27,24 +27,24 @@ Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigBulkCopyView([]string{"Resources_example"}, "Target_example") // ConfigBulkCopyView | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewBulkCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewBulkCopy`: ConfigBulkCopyResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewBulkCopy`: %v\n", resp) + body := *openapiclient.NewConfigBulkCopyView([]string{"Resources_example"}, "Target_example") // ConfigBulkCopyView | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewBulkCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewBulkCopy`: ConfigBulkCopyResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewBulkCopy`: %v\n", resp) } ``` @@ -93,25 +93,25 @@ Create the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigView("Name_example") // ConfigView | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewCreate`: ConfigCreateViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewCreate`: %v\n", resp) + body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewCreate`: ConfigCreateViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewCreate`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Move the View object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,32 +229,32 @@ List View objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewList`: ConfigListViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewList`: ConfigListViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewList`: %v\n", resp) } ``` @@ -311,26 +311,26 @@ Read the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewRead`: ConfigReadViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewRead`: ConfigReadViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewRead`: %v\n", resp) } ``` @@ -385,26 +385,26 @@ Update the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigView("Name_example") // ConfigView | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewUpdate`: ConfigUpdateViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewUpdate`: ConfigUpdateViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewUpdate`: %v\n", resp) } ``` diff --git a/dns_config/model_auth_zone_external_provider.go b/dns_config/model_auth_zone_external_provider.go index 1ba81d5..6c4d4de 100644 --- a/dns_config/model_auth_zone_external_provider.go +++ b/dns_config/model_auth_zone_external_provider.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *AuthZoneExternalProvider) SetType(v string) { } func (o AuthZoneExternalProvider) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableAuthZoneExternalProvider) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_acl.go b/dns_config/model_config_acl.go index 932e0ce..4b072bb 100644 --- a/dns_config/model_config_acl.go +++ b/dns_config/model_config_acl.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigACL type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type ConfigACL struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigACL ConfigACL + // NewConfigACL instantiates a new ConfigACL object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -202,7 +206,7 @@ func (o *ConfigACL) SetTags(v map[string]interface{}) { } func (o ConfigACL) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -227,6 +231,43 @@ func (o ConfigACL) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigACL) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigACL := _ConfigACL{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigACL) + + if err != nil { + return err + } + + *o = ConfigACL(varConfigACL) + + return err +} + type NullableConfigACL struct { value *ConfigACL isSet bool @@ -262,3 +303,5 @@ func (v *NullableConfigACL) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_acl_item.go b/dns_config/model_config_acl_item.go index 56a0482..c562e89 100644 --- a/dns_config/model_config_acl_item.go +++ b/dns_config/model_config_acl_item.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigACLItem type satisfies the MappedNullable interface at compile time @@ -26,10 +28,12 @@ type ConfigACLItem struct { // Optional. Data for _ip_ _element_. Must be empty if _element_ is not _ip_. Address *string `json:"address,omitempty"` // Type of element. Allowed values: * _any_, * _ip_, * _acl_, * _tsig_key_. - Element string `json:"element"` + Element string `json:"element"` TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` } +type _ConfigACLItem ConfigACLItem + // NewConfigACLItem instantiates a new ConfigACLItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -194,7 +198,7 @@ func (o *ConfigACLItem) SetTsigKey(v ConfigTSIGKey) { } func (o ConfigACLItem) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -217,6 +221,44 @@ func (o ConfigACLItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigACLItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + "element", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigACLItem := _ConfigACLItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigACLItem) + + if err != nil { + return err + } + + *o = ConfigACLItem(varConfigACLItem) + + return err +} + type NullableConfigACLItem struct { value *ConfigACLItem isSet bool @@ -252,3 +294,5 @@ func (v *NullableConfigACLItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_auth_nsg.go b/dns_config/model_config_auth_nsg.go index 86e2519..2fddf64 100644 --- a/dns_config/model_config_auth_nsg.go +++ b/dns_config/model_config_auth_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigAuthNSG type satisfies the MappedNullable interface at compile time @@ -37,6 +39,8 @@ type ConfigAuthNSG struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigAuthNSG ConfigAuthNSG + // NewConfigAuthNSG instantiates a new ConfigAuthNSG object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -304,7 +308,7 @@ func (o *ConfigAuthNSG) SetTags(v map[string]interface{}) { } func (o ConfigAuthNSG) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -338,6 +342,43 @@ func (o ConfigAuthNSG) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigAuthNSG) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigAuthNSG := _ConfigAuthNSG{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigAuthNSG) + + if err != nil { + return err + } + + *o = ConfigAuthNSG(varConfigAuthNSG) + + return err +} + type NullableConfigAuthNSG struct { value *ConfigAuthNSG isSet bool @@ -373,3 +414,5 @@ func (v *NullableConfigAuthNSG) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_auth_zone.go b/dns_config/model_config_auth_zone.go index 4aa8f3d..49c197a 100644 --- a/dns_config/model_config_auth_zone.go +++ b/dns_config/model_config_auth_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -40,7 +40,7 @@ type ConfigAuthZone struct { Id *string `json:"id,omitempty"` // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []Inheritance2AssignedHost `json:"inheritance_assigned_hosts,omitempty"` - InheritanceSources *ConfigAuthZoneInheritance `json:"inheritance_sources,omitempty"` + InheritanceSources *ConfigAuthZoneInheritance `json:"inheritance_sources,omitempty"` // On-create-only. SOA serial is allowed to be set when the authoritative zone is created. InitialSoaSerial *int64 `json:"initial_soa_serial,omitempty"` // Optional. BloxOne DDI hosts acting as internal secondaries. Order is not significant. @@ -74,7 +74,7 @@ type ConfigAuthZone struct { // The resource identifier. View *string `json:"view,omitempty"` // The list of an auth zone warnings. - Warnings []ConfigWarning `json:"warnings,omitempty"` + Warnings []ConfigWarning `json:"warnings,omitempty"` ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } @@ -1024,7 +1024,7 @@ func (o *ConfigAuthZone) SetZoneAuthority(v ConfigZoneAuthority) { } func (o ConfigAuthZone) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1158,3 +1158,5 @@ func (v *NullableConfigAuthZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_auth_zone_config.go b/dns_config/model_config_auth_zone_config.go index 59bcd04..97ccf6e 100644 --- a/dns_config/model_config_auth_zone_config.go +++ b/dns_config/model_config_auth_zone_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigAuthZoneConfig) SetNsgs(v []string) { } func (o ConfigAuthZoneConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableConfigAuthZoneConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_auth_zone_inheritance.go b/dns_config/model_config_auth_zone_inheritance.go index 5154ca8..3c18d71 100644 --- a/dns_config/model_config_auth_zone_inheritance.go +++ b/dns_config/model_config_auth_zone_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,13 +19,13 @@ var _ MappedNullable = &ConfigAuthZoneInheritance{} // ConfigAuthZoneInheritance struct for ConfigAuthZoneInheritance type ConfigAuthZoneInheritance struct { - GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` - Notify *Inheritance2InheritedBool `json:"notify,omitempty"` - QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` - TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` - UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` - UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` - ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` + GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` + Notify *Inheritance2InheritedBool `json:"notify,omitempty"` + QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` + TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` + UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` + UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` + ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` } // NewConfigAuthZoneInheritance instantiates a new ConfigAuthZoneInheritance object @@ -270,7 +270,7 @@ func (o *ConfigAuthZoneInheritance) SetZoneAuthority(v ConfigInheritedZoneAuthor } func (o ConfigAuthZoneInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -338,3 +338,5 @@ func (v *NullableConfigAuthZoneInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_bulk_copy_error.go b/dns_config/model_config_bulk_copy_error.go index d33825f..4e34f5a 100644 --- a/dns_config/model_config_bulk_copy_error.go +++ b/dns_config/model_config_bulk_copy_error.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigBulkCopyError) SetMessage(v string) { } func (o ConfigBulkCopyError) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableConfigBulkCopyError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_bulk_copy_response.go b/dns_config/model_config_bulk_copy_response.go index a0d1ee0..d7b6100 100644 --- a/dns_config/model_config_bulk_copy_response.go +++ b/dns_config/model_config_bulk_copy_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,8 +19,8 @@ var _ MappedNullable = &ConfigBulkCopyResponse{} // ConfigBulkCopyResponse struct for ConfigBulkCopyResponse type ConfigBulkCopyResponse struct { - Errors []ConfigBulkCopyError `json:"errors,omitempty"` - Results []ConfigCopyResponse `json:"results,omitempty"` + Errors []ConfigBulkCopyError `json:"errors,omitempty"` + Results []ConfigCopyResponse `json:"results,omitempty"` } // NewConfigBulkCopyResponse instantiates a new ConfigBulkCopyResponse object @@ -105,7 +105,7 @@ func (o *ConfigBulkCopyResponse) SetResults(v []ConfigCopyResponse) { } func (o ConfigBulkCopyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableConfigBulkCopyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_bulk_copy_view.go b/dns_config/model_config_bulk_copy_view.go index d8bbec7..214e688 100644 --- a/dns_config/model_config_bulk_copy_view.go +++ b/dns_config/model_config_bulk_copy_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigBulkCopyView type satisfies the MappedNullable interface at compile time @@ -19,12 +21,12 @@ var _ MappedNullable = &ConfigBulkCopyView{} // ConfigBulkCopyView struct for ConfigBulkCopyView type ConfigBulkCopyView struct { - AuthZoneConfig *ConfigAuthZoneConfig `json:"auth_zone_config,omitempty"` + AuthZoneConfig *ConfigAuthZoneConfig `json:"auth_zone_config,omitempty"` ForwardZoneConfig *ConfigForwardZoneConfig `json:"forward_zone_config,omitempty"` // Indicates whether child objects should be copied or not. Defaults to _false_. Reserved for future use. Recursive *bool `json:"recursive,omitempty"` // The resource identifier. - Resources []string `json:"resources"` + Resources []string `json:"resources"` SecondaryZoneConfig *ConfigAuthZoneConfig `json:"secondary_zone_config,omitempty"` // Indicates whether copying should skip object in case of error and continue with next, or abort copying in case of error. Defaults to _false_. SkipOnError *bool `json:"skip_on_error,omitempty"` @@ -32,6 +34,8 @@ type ConfigBulkCopyView struct { Target string `json:"target"` } +type _ConfigBulkCopyView ConfigBulkCopyView + // NewConfigBulkCopyView instantiates a new ConfigBulkCopyView object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -260,7 +264,7 @@ func (o *ConfigBulkCopyView) SetTarget(v string) { } func (o ConfigBulkCopyView) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -289,6 +293,44 @@ func (o ConfigBulkCopyView) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigBulkCopyView) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "resources", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigBulkCopyView := _ConfigBulkCopyView{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigBulkCopyView) + + if err != nil { + return err + } + + *o = ConfigBulkCopyView(varConfigBulkCopyView) + + return err +} + type NullableConfigBulkCopyView struct { value *ConfigBulkCopyView isSet bool @@ -324,3 +366,5 @@ func (v *NullableConfigBulkCopyView) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_cache_flush.go b/dns_config/model_config_cache_flush.go index 7a2d37f..3a4205a 100644 --- a/dns_config/model_config_cache_flush.go +++ b/dns_config/model_config_cache_flush.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -243,7 +243,7 @@ func (o *ConfigCacheFlush) SetViewName(v string) { } func (o ConfigCacheFlush) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,3 +308,5 @@ func (v *NullableConfigCacheFlush) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_convert_domain_name.go b/dns_config/model_config_convert_domain_name.go index 567cc33..a3dda8c 100644 --- a/dns_config/model_config_convert_domain_name.go +++ b/dns_config/model_config_convert_domain_name.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigConvertDomainName) SetPunycode(v string) { } func (o ConfigConvertDomainName) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableConfigConvertDomainName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_convert_domain_name_response.go b/dns_config/model_config_convert_domain_name_response.go index 57bdce8..586f5a1 100644 --- a/dns_config/model_config_convert_domain_name_response.go +++ b/dns_config/model_config_convert_domain_name_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigConvertDomainNameResponse) SetResult(v ConfigConvertDomainName) { } func (o ConfigConvertDomainNameResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigConvertDomainNameResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_convert_r_name_response.go b/dns_config/model_config_convert_r_name_response.go index 8e81294..85f475a 100644 --- a/dns_config/model_config_convert_r_name_response.go +++ b/dns_config/model_config_convert_r_name_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigConvertRNameResponse) SetRname(v string) { } func (o ConfigConvertRNameResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigConvertRNameResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_copy_auth_zone.go b/dns_config/model_config_copy_auth_zone.go index 7994869..fcf99dc 100644 --- a/dns_config/model_config_copy_auth_zone.go +++ b/dns_config/model_config_copy_auth_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigCopyAuthZone type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigCopyAuthZone struct { TargetView string `json:"target_view"` } +type _ConfigCopyAuthZone ConfigCopyAuthZone + // NewConfigCopyAuthZone instantiates a new ConfigCopyAuthZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -338,7 +342,7 @@ func (o *ConfigCopyAuthZone) SetTargetView(v string) { } func (o ConfigCopyAuthZone) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -375,6 +379,43 @@ func (o ConfigCopyAuthZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigCopyAuthZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigCopyAuthZone := _ConfigCopyAuthZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigCopyAuthZone) + + if err != nil { + return err + } + + *o = ConfigCopyAuthZone(varConfigCopyAuthZone) + + return err +} + type NullableConfigCopyAuthZone struct { value *ConfigCopyAuthZone isSet bool @@ -410,3 +451,5 @@ func (v *NullableConfigCopyAuthZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_copy_auth_zone_response.go b/dns_config/model_config_copy_auth_zone_response.go index 12714b7..ac3dc47 100644 --- a/dns_config/model_config_copy_auth_zone_response.go +++ b/dns_config/model_config_copy_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCopyAuthZoneResponse) SetResult(v ConfigCopyResponse) { } func (o ConfigCopyAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCopyAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_copy_forward_zone.go b/dns_config/model_config_copy_forward_zone.go index 98b8fb0..866cdf1 100644 --- a/dns_config/model_config_copy_forward_zone.go +++ b/dns_config/model_config_copy_forward_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigCopyForwardZone type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigCopyForwardZone struct { TargetView string `json:"target_view"` } +type _ConfigCopyForwardZone ConfigCopyForwardZone + // NewConfigCopyForwardZone instantiates a new ConfigCopyForwardZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -338,7 +342,7 @@ func (o *ConfigCopyForwardZone) SetTargetView(v string) { } func (o ConfigCopyForwardZone) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -375,6 +379,43 @@ func (o ConfigCopyForwardZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigCopyForwardZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigCopyForwardZone := _ConfigCopyForwardZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigCopyForwardZone) + + if err != nil { + return err + } + + *o = ConfigCopyForwardZone(varConfigCopyForwardZone) + + return err +} + type NullableConfigCopyForwardZone struct { value *ConfigCopyForwardZone isSet bool @@ -410,3 +451,5 @@ func (v *NullableConfigCopyForwardZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_copy_forward_zone_response.go b/dns_config/model_config_copy_forward_zone_response.go index cda894f..8269c0c 100644 --- a/dns_config/model_config_copy_forward_zone_response.go +++ b/dns_config/model_config_copy_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCopyForwardZoneResponse) SetResult(v ConfigCopyResponse) { } func (o ConfigCopyForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCopyForwardZoneResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_copy_response.go b/dns_config/model_config_copy_response.go index 97b19ba..3685b51 100644 --- a/dns_config/model_config_copy_response.go +++ b/dns_config/model_config_copy_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigCopyResponse) SetJobId(v string) { } func (o ConfigCopyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableConfigCopyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_acl_response.go b/dns_config/model_config_create_acl_response.go index 155a419..42f4984 100644 --- a/dns_config/model_config_create_acl_response.go +++ b/dns_config/model_config_create_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateACLResponse) SetResult(v ConfigACL) { } func (o ConfigCreateACLResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_auth_nsg_response.go b/dns_config/model_config_create_auth_nsg_response.go index 4e9a6ec..8768a90 100644 --- a/dns_config/model_config_create_auth_nsg_response.go +++ b/dns_config/model_config_create_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateAuthNSGResponse) SetResult(v ConfigAuthNSG) { } func (o ConfigCreateAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_auth_zone_response.go b/dns_config/model_config_create_auth_zone_response.go index 21a2ec5..988a9eb 100644 --- a/dns_config/model_config_create_auth_zone_response.go +++ b/dns_config/model_config_create_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateAuthZoneResponse) SetResult(v ConfigAuthZone) { } func (o ConfigCreateAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_delegation_response.go b/dns_config/model_config_create_delegation_response.go index a736bc6..b6af249 100644 --- a/dns_config/model_config_create_delegation_response.go +++ b/dns_config/model_config_create_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateDelegationResponse) SetResult(v ConfigDelegation) { } func (o ConfigCreateDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateDelegationResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_forward_nsg_response.go b/dns_config/model_config_create_forward_nsg_response.go index 79edea3..fa0c6e5 100644 --- a/dns_config/model_config_create_forward_nsg_response.go +++ b/dns_config/model_config_create_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateForwardNSGResponse) SetResult(v ConfigForwardNSG) { } func (o ConfigCreateForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateForwardNSGResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_forward_zone_response.go b/dns_config/model_config_create_forward_zone_response.go index e6e9b71..1aa6e9b 100644 --- a/dns_config/model_config_create_forward_zone_response.go +++ b/dns_config/model_config_create_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateForwardZoneResponse) SetResult(v ConfigForwardZone) { } func (o ConfigCreateForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateForwardZoneResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_lbdn_response.go b/dns_config/model_config_create_lbdn_response.go index 8759109..e90b528 100644 --- a/dns_config/model_config_create_lbdn_response.go +++ b/dns_config/model_config_create_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateLBDNResponse) SetResult(v ConfigLBDN) { } func (o ConfigCreateLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_server_response.go b/dns_config/model_config_create_server_response.go index c4e0082..97c8949 100644 --- a/dns_config/model_config_create_server_response.go +++ b/dns_config/model_config_create_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateServerResponse) SetResult(v ConfigServer) { } func (o ConfigCreateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_create_view_response.go b/dns_config/model_config_create_view_response.go index 5b1f213..60de033 100644 --- a/dns_config/model_config_create_view_response.go +++ b/dns_config/model_config_create_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateViewResponse) SetResult(v ConfigView) { } func (o ConfigCreateViewResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigCreateViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_custom_root_ns_block.go b/dns_config/model_config_custom_root_ns_block.go index 73074a8..2ba30c8 100644 --- a/dns_config/model_config_custom_root_ns_block.go +++ b/dns_config/model_config_custom_root_ns_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigCustomRootNSBlock) SetCustomRootNsEnabled(v bool) { } func (o ConfigCustomRootNSBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableConfigCustomRootNSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_delegation.go b/dns_config/model_config_delegation.go index ce8b1a1..3f8983b 100644 --- a/dns_config/model_config_delegation.go +++ b/dns_config/model_config_delegation.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -345,7 +345,7 @@ func (o *ConfigDelegation) SetView(v string) { } func (o ConfigDelegation) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -419,3 +419,5 @@ func (v *NullableConfigDelegation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_delegation_server.go b/dns_config/model_config_delegation_server.go index 32171bb..d918682 100644 --- a/dns_config/model_config_delegation_server.go +++ b/dns_config/model_config_delegation_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigDelegationServer type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigDelegationServer struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigDelegationServer ConfigDelegationServer + // NewConfigDelegationServer instantiates a new ConfigDelegationServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -134,7 +138,7 @@ func (o *ConfigDelegationServer) SetProtocolFqdn(v string) { } func (o ConfigDelegationServer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -153,6 +157,43 @@ func (o ConfigDelegationServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigDelegationServer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigDelegationServer := _ConfigDelegationServer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigDelegationServer) + + if err != nil { + return err + } + + *o = ConfigDelegationServer(varConfigDelegationServer) + + return err +} + type NullableConfigDelegationServer struct { value *ConfigDelegationServer isSet bool @@ -188,3 +229,5 @@ func (v *NullableConfigDelegationServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_display_view.go b/dns_config/model_config_display_view.go index 5c189ee..0f30047 100644 --- a/dns_config/model_config_display_view.go +++ b/dns_config/model_config_display_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigDisplayView) SetView(v string) { } func (o ConfigDisplayView) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableConfigDisplayView) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_dnssec_validation_block.go b/dns_config/model_config_dnssec_validation_block.go index 3447c2c..17b4d78 100644 --- a/dns_config/model_config_dnssec_validation_block.go +++ b/dns_config/model_config_dnssec_validation_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigDNSSECValidationBlock) SetDnssecValidateExpiry(v bool) { } func (o ConfigDNSSECValidationBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableConfigDNSSECValidationBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_dtc_config.go b/dns_config/model_config_dtc_config.go index f116a1a..a3e4f99 100644 --- a/dns_config/model_config_dtc_config.go +++ b/dns_config/model_config_dtc_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigDTCConfig) SetDefaultTtl(v int64) { } func (o ConfigDTCConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigDTCConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_dtc_policy.go b/dns_config/model_config_dtc_policy.go index 9956a2c..66ac85f 100644 --- a/dns_config/model_config_dtc_policy.go +++ b/dns_config/model_config_dtc_policy.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigDTCPolicy) SetPolicyId(v string) { } func (o ConfigDTCPolicy) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableConfigDTCPolicy) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_ecs_block.go b/dns_config/model_config_ecs_block.go index 00d06bd..7b42f20 100644 --- a/dns_config/model_config_ecs_block.go +++ b/dns_config/model_config_ecs_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -209,7 +209,7 @@ func (o *ConfigECSBlock) SetEcsZones(v []ConfigECSZone) { } func (o ConfigECSBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -271,3 +271,5 @@ func (v *NullableConfigECSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_ecs_zone.go b/dns_config/model_config_ecs_zone.go index ea54ad5..f6d1243 100644 --- a/dns_config/model_config_ecs_zone.go +++ b/dns_config/model_config_ecs_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigECSZone type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigECSZone struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigECSZone ConfigECSZone + // NewConfigECSZone instantiates a new ConfigECSZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -127,7 +131,7 @@ func (o *ConfigECSZone) SetProtocolFqdn(v string) { } func (o ConfigECSZone) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -144,6 +148,44 @@ func (o ConfigECSZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigECSZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigECSZone := _ConfigECSZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigECSZone) + + if err != nil { + return err + } + + *o = ConfigECSZone(varConfigECSZone) + + return err +} + type NullableConfigECSZone struct { value *ConfigECSZone isSet bool @@ -179,3 +221,5 @@ func (v *NullableConfigECSZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_external_primary.go b/dns_config/model_config_external_primary.go index a57a1c8..f1008f9 100644 --- a/dns_config/model_config_external_primary.go +++ b/dns_config/model_config_external_primary.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigExternalPrimary type satisfies the MappedNullable interface at compile time @@ -28,12 +30,14 @@ type ConfigExternalPrimary struct { // FQDN of nameserver in punycode. ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` // Optional. If enabled, secondaries will use the configured TSIG key when requesting a zone transfer from this primary. - TsigEnabled *bool `json:"tsig_enabled,omitempty"` - TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` + TsigEnabled *bool `json:"tsig_enabled,omitempty"` + TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` // Allowed values: * _nsg_, * _primary_. Type string `json:"type"` } +type _ConfigExternalPrimary ConfigExternalPrimary + // NewConfigExternalPrimary instantiates a new ConfigExternalPrimary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -269,7 +273,7 @@ func (o *ConfigExternalPrimary) SetType(v string) { } func (o ConfigExternalPrimary) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -300,6 +304,43 @@ func (o ConfigExternalPrimary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigExternalPrimary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigExternalPrimary := _ConfigExternalPrimary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigExternalPrimary) + + if err != nil { + return err + } + + *o = ConfigExternalPrimary(varConfigExternalPrimary) + + return err +} + type NullableConfigExternalPrimary struct { value *ConfigExternalPrimary isSet bool @@ -335,3 +376,5 @@ func (v *NullableConfigExternalPrimary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_external_secondary.go b/dns_config/model_config_external_secondary.go index df6480e..51a6b29 100644 --- a/dns_config/model_config_external_secondary.go +++ b/dns_config/model_config_external_secondary.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigExternalSecondary type satisfies the MappedNullable interface at compile time @@ -28,10 +30,12 @@ type ConfigExternalSecondary struct { // If enabled, the NS record and glue record will NOT be automatically generated according to secondaries nameserver assignment. Default: _false_ Stealth *bool `json:"stealth,omitempty"` // If enabled, secondaries will use the configured TSIG key when requesting a zone transfer. Default: _false_ - TsigEnabled *bool `json:"tsig_enabled,omitempty"` - TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` + TsigEnabled *bool `json:"tsig_enabled,omitempty"` + TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` } +type _ConfigExternalSecondary ConfigExternalSecondary + // NewConfigExternalSecondary instantiates a new ConfigExternalSecondary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -228,7 +232,7 @@ func (o *ConfigExternalSecondary) SetTsigKey(v ConfigTSIGKey) { } func (o ConfigExternalSecondary) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -254,6 +258,44 @@ func (o ConfigExternalSecondary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigExternalSecondary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigExternalSecondary := _ConfigExternalSecondary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigExternalSecondary) + + if err != nil { + return err + } + + *o = ConfigExternalSecondary(varConfigExternalSecondary) + + return err +} + type NullableConfigExternalSecondary struct { value *ConfigExternalSecondary isSet bool @@ -289,3 +331,5 @@ func (v *NullableConfigExternalSecondary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_forward_nsg.go b/dns_config/model_config_forward_nsg.go index 6c75052..4405a51 100644 --- a/dns_config/model_config_forward_nsg.go +++ b/dns_config/model_config_forward_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigForwardNSG type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigForwardNSG struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigForwardNSG ConfigForwardNSG + // NewConfigForwardNSG instantiates a new ConfigForwardNSG object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -338,7 +342,7 @@ func (o *ConfigForwardNSG) SetTags(v map[string]interface{}) { } func (o ConfigForwardNSG) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -375,6 +379,43 @@ func (o ConfigForwardNSG) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigForwardNSG) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigForwardNSG := _ConfigForwardNSG{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigForwardNSG) + + if err != nil { + return err + } + + *o = ConfigForwardNSG(varConfigForwardNSG) + + return err +} + type NullableConfigForwardNSG struct { value *ConfigForwardNSG isSet bool @@ -410,3 +451,5 @@ func (v *NullableConfigForwardNSG) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_forward_zone.go b/dns_config/model_config_forward_zone.go index 0858df6..0ac1c10 100644 --- a/dns_config/model_config_forward_zone.go +++ b/dns_config/model_config_forward_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -652,7 +652,7 @@ func (o *ConfigForwardZone) SetWarnings(v []ConfigWarning) { } func (o ConfigForwardZone) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -753,3 +753,5 @@ func (v *NullableConfigForwardZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_forward_zone_config.go b/dns_config/model_config_forward_zone_config.go index b98659d..3400151 100644 --- a/dns_config/model_config_forward_zone_config.go +++ b/dns_config/model_config_forward_zone_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigForwardZoneConfig) SetNsgs(v []string) { } func (o ConfigForwardZoneConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableConfigForwardZoneConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_forwarder.go b/dns_config/model_config_forwarder.go index f583e4a..055461f 100644 --- a/dns_config/model_config_forwarder.go +++ b/dns_config/model_config_forwarder.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigForwarder type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigForwarder struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigForwarder ConfigForwarder + // NewConfigForwarder instantiates a new ConfigForwarder object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -134,7 +138,7 @@ func (o *ConfigForwarder) SetProtocolFqdn(v string) { } func (o ConfigForwarder) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -153,6 +157,43 @@ func (o ConfigForwarder) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigForwarder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigForwarder := _ConfigForwarder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigForwarder) + + if err != nil { + return err + } + + *o = ConfigForwarder(varConfigForwarder) + + return err +} + type NullableConfigForwarder struct { value *ConfigForwarder isSet bool @@ -188,3 +229,5 @@ func (v *NullableConfigForwarder) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_forwarders_block.go b/dns_config/model_config_forwarders_block.go index 2e010b9..89dbc9b 100644 --- a/dns_config/model_config_forwarders_block.go +++ b/dns_config/model_config_forwarders_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigForwardersBlock) SetUseRootForwardersForLocalResolutionWithB1td(v } func (o ConfigForwardersBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableConfigForwardersBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_global.go b/dns_config/model_config_global.go index 76ca4ff..88ab4d8 100644 --- a/dns_config/model_config_global.go +++ b/dns_config/model_config_global.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigGlobal type satisfies the MappedNullable interface at compile time @@ -34,8 +36,8 @@ type ConfigGlobal struct { // Optional. DNSSEC trust anchors. Error if there are list items with duplicate (_zone_, _sep_, _algorithm_) combinations. Defaults to empty. DnssecTrustAnchors []ConfigTrustAnchor `json:"dnssec_trust_anchors,omitempty"` // Optional. _true_ to reject expired DNSSEC keys. Ignored if either _dnssec_enabled_ or _dnssec_enable_validation_ is _false_. Defaults to _true_. - DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` - DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` + DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` + DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` // Optional. _true_ to enable EDNS client subnet for recursive queries. Other _ecs_*_ fields are ignored if this field is not enabled. Defaults to _false_. EcsEnabled *bool `json:"ecs_enabled,omitempty"` // Optional. _true_ to enable ECS options in outbound queries. This functionality has additional overhead so it is disabled by default. Defaults to _false_. @@ -105,10 +107,12 @@ type ConfigGlobal struct { // Optional. Use default forwarders to resolve queries for subzones. Defaults to _true_. UseForwardersForSubzones *bool `json:"use_forwarders_for_subzones,omitempty"` // _use_root_forwarders_for_local_resolution_with_b1td_ allows DNS recursive queries sent to root forwarders for local resolution when deployed alongside BloxOne Thread Defense. Defaults to _false_. - UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` - ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` + UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` + ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } +type _ConfigGlobal ConfigGlobal + // NewConfigGlobal instantiates a new ConfigGlobal object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1560,7 +1564,7 @@ func (o *ConfigGlobal) SetZoneAuthority(v ConfigZoneAuthority) { } func (o ConfigGlobal) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1705,6 +1709,43 @@ func (o ConfigGlobal) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigGlobal) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigGlobal := _ConfigGlobal{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigGlobal) + + if err != nil { + return err + } + + *o = ConfigGlobal(varConfigGlobal) + + return err +} + type NullableConfigGlobal struct { value *ConfigGlobal isSet bool @@ -1740,3 +1781,5 @@ func (v *NullableConfigGlobal) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_host.go b/dns_config/model_config_host.go index ef3dcbf..c5349be 100644 --- a/dns_config/model_config_host.go +++ b/dns_config/model_config_host.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,7 +24,7 @@ type ConfigHost struct { // Host's primary IP Address. Address *string `json:"address,omitempty"` // Anycast address configured to the host. Order is not significant. - AnycastAddresses []string `json:"anycast_addresses,omitempty"` + AnycastAddresses []string `json:"anycast_addresses,omitempty"` AssociatedServer *ConfigHostAssociatedServer `json:"associated_server,omitempty"` // Host description. Comment *string `json:"comment,omitempty"` @@ -35,7 +35,7 @@ type ConfigHost struct { // DFP service indicates whether or not BloxOne DDI DNS and BloxOne TD DFP are both active on the host. If so, BloxOne DDI DNS will augment recursive queries and forward them to BloxOne TD DFP. Allowed values: * _unavailable_: BloxOne TD DFP application is not available, * _enabled_: BloxOne TD DFP application is available and enabled, * _disabled_: BloxOne TD DFP application is available but disabled. DfpService *string `json:"dfp_service,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigHostInheritance `json:"inheritance_sources,omitempty"` // Optional. _kerberos_keys_ contains a list of keys for GSS-TSIG signed dynamic updates. Defaults to empty. KerberosKeys []ConfigKerberosKey `json:"kerberos_keys,omitempty"` @@ -683,7 +683,7 @@ func (o *ConfigHost) SetType(v string) { } func (o ConfigHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -787,3 +787,5 @@ func (v *NullableConfigHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_host_associated_server.go b/dns_config/model_config_host_associated_server.go index c99631f..f3e97a1 100644 --- a/dns_config/model_config_host_associated_server.go +++ b/dns_config/model_config_host_associated_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigHostAssociatedServer) SetName(v string) { } func (o ConfigHostAssociatedServer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableConfigHostAssociatedServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_host_inheritance.go b/dns_config/model_config_host_inheritance.go index 9b3771c..92bde3a 100644 --- a/dns_config/model_config_host_inheritance.go +++ b/dns_config/model_config_host_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigHostInheritance) SetKerberosKeys(v ConfigInheritedKerberosKeys) { } func (o ConfigHostInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigHostInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_acl_items.go b/dns_config/model_config_inherited_acl_items.go index f3d07ec..08f2ddc 100644 --- a/dns_config/model_config_inherited_acl_items.go +++ b/dns_config/model_config_inherited_acl_items.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigInheritedACLItems) SetValue(v []ConfigACLItem) { } func (o ConfigInheritedACLItems) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableConfigInheritedACLItems) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_custom_root_ns_block.go b/dns_config/model_config_inherited_custom_root_ns_block.go index a2e4ef4..76cba91 100644 --- a/dns_config/model_config_inherited_custom_root_ns_block.go +++ b/dns_config/model_config_inherited_custom_root_ns_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedCustomRootNSBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigCustomRootNSBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigCustomRootNSBlock `json:"value,omitempty"` } // NewConfigInheritedCustomRootNSBlock instantiates a new ConfigInheritedCustomRootNSBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedCustomRootNSBlock) SetValue(v ConfigCustomRootNSBlock) { } func (o ConfigInheritedCustomRootNSBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableConfigInheritedCustomRootNSBlock) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_dnssec_validation_block.go b/dns_config/model_config_inherited_dnssec_validation_block.go index 957dc11..e6c9aee 100644 --- a/dns_config/model_config_inherited_dnssec_validation_block.go +++ b/dns_config/model_config_inherited_dnssec_validation_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedDNSSECValidationBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigDNSSECValidationBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigDNSSECValidationBlock `json:"value,omitempty"` } // NewConfigInheritedDNSSECValidationBlock instantiates a new ConfigInheritedDNSSECValidationBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedDNSSECValidationBlock) SetValue(v ConfigDNSSECValidation } func (o ConfigInheritedDNSSECValidationBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableConfigInheritedDNSSECValidationBlock) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_dtc_config.go b/dns_config/model_config_inherited_dtc_config.go index 6018d4d..32aac6d 100644 --- a/dns_config/model_config_inherited_dtc_config.go +++ b/dns_config/model_config_inherited_dtc_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigInheritedDtcConfig) SetDefaultTtl(v Inheritance2InheritedUInt32) } func (o ConfigInheritedDtcConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigInheritedDtcConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_ecs_block.go b/dns_config/model_config_inherited_ecs_block.go index 1a9dfb4..d8dd038 100644 --- a/dns_config/model_config_inherited_ecs_block.go +++ b/dns_config/model_config_inherited_ecs_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedECSBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigECSBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigECSBlock `json:"value,omitempty"` } // NewConfigInheritedECSBlock instantiates a new ConfigInheritedECSBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedECSBlock) SetValue(v ConfigECSBlock) { } func (o ConfigInheritedECSBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableConfigInheritedECSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_forwarders_block.go b/dns_config/model_config_inherited_forwarders_block.go index 93cb417..471441c 100644 --- a/dns_config/model_config_inherited_forwarders_block.go +++ b/dns_config/model_config_inherited_forwarders_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedForwardersBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigForwardersBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigForwardersBlock `json:"value,omitempty"` } // NewConfigInheritedForwardersBlock instantiates a new ConfigInheritedForwardersBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedForwardersBlock) SetValue(v ConfigForwardersBlock) { } func (o ConfigInheritedForwardersBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableConfigInheritedForwardersBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_kerberos_keys.go b/dns_config/model_config_inherited_kerberos_keys.go index b902b51..dfe1c36 100644 --- a/dns_config/model_config_inherited_kerberos_keys.go +++ b/dns_config/model_config_inherited_kerberos_keys.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigInheritedKerberosKeys) SetValue(v []ConfigKerberosKey) { } func (o ConfigInheritedKerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableConfigInheritedKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_sort_list_items.go b/dns_config/model_config_inherited_sort_list_items.go index 43d7e3f..a12a2b0 100644 --- a/dns_config/model_config_inherited_sort_list_items.go +++ b/dns_config/model_config_inherited_sort_list_items.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigInheritedSortListItems) SetValue(v []ConfigSortListItem) { } func (o ConfigInheritedSortListItems) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableConfigInheritedSortListItems) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_zone_authority.go b/dns_config/model_config_inherited_zone_authority.go index c4f0c63..e28a12b 100644 --- a/dns_config/model_config_inherited_zone_authority.go +++ b/dns_config/model_config_inherited_zone_authority.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,14 +19,14 @@ var _ MappedNullable = &ConfigInheritedZoneAuthority{} // ConfigInheritedZoneAuthority Inheritance configuration for a field of type _ZoneAuthority_. type ConfigInheritedZoneAuthority struct { - DefaultTtl *Inheritance2InheritedUInt32 `json:"default_ttl,omitempty"` - Expire *Inheritance2InheritedUInt32 `json:"expire,omitempty"` - MnameBlock *ConfigInheritedZoneAuthorityMNameBlock `json:"mname_block,omitempty"` - NegativeTtl *Inheritance2InheritedUInt32 `json:"negative_ttl,omitempty"` - ProtocolRname *Inheritance2InheritedString `json:"protocol_rname,omitempty"` - Refresh *Inheritance2InheritedUInt32 `json:"refresh,omitempty"` - Retry *Inheritance2InheritedUInt32 `json:"retry,omitempty"` - Rname *Inheritance2InheritedString `json:"rname,omitempty"` + DefaultTtl *Inheritance2InheritedUInt32 `json:"default_ttl,omitempty"` + Expire *Inheritance2InheritedUInt32 `json:"expire,omitempty"` + MnameBlock *ConfigInheritedZoneAuthorityMNameBlock `json:"mname_block,omitempty"` + NegativeTtl *Inheritance2InheritedUInt32 `json:"negative_ttl,omitempty"` + ProtocolRname *Inheritance2InheritedString `json:"protocol_rname,omitempty"` + Refresh *Inheritance2InheritedUInt32 `json:"refresh,omitempty"` + Retry *Inheritance2InheritedUInt32 `json:"retry,omitempty"` + Rname *Inheritance2InheritedString `json:"rname,omitempty"` } // NewConfigInheritedZoneAuthority instantiates a new ConfigInheritedZoneAuthority object @@ -303,7 +303,7 @@ func (o *ConfigInheritedZoneAuthority) SetRname(v Inheritance2InheritedString) { } func (o ConfigInheritedZoneAuthority) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -374,3 +374,5 @@ func (v *NullableConfigInheritedZoneAuthority) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_inherited_zone_authority_m_name_block.go b/dns_config/model_config_inherited_zone_authority_m_name_block.go index 1d1eb0f..e851b2c 100644 --- a/dns_config/model_config_inherited_zone_authority_m_name_block.go +++ b/dns_config/model_config_inherited_zone_authority_m_name_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedZoneAuthorityMNameBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigZoneAuthorityMNameBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigZoneAuthorityMNameBlock `json:"value,omitempty"` } // NewConfigInheritedZoneAuthorityMNameBlock instantiates a new ConfigInheritedZoneAuthorityMNameBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedZoneAuthorityMNameBlock) SetValue(v ConfigZoneAuthorityM } func (o ConfigInheritedZoneAuthorityMNameBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableConfigInheritedZoneAuthorityMNameBlock) UnmarshalJSON(src []byt v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_internal_secondary.go b/dns_config/model_config_internal_secondary.go index 0a83134..1afb00d 100644 --- a/dns_config/model_config_internal_secondary.go +++ b/dns_config/model_config_internal_secondary.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigInternalSecondary type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type ConfigInternalSecondary struct { Host string `json:"host"` } +type _ConfigInternalSecondary ConfigInternalSecondary + // NewConfigInternalSecondary instantiates a new ConfigInternalSecondary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -66,7 +70,7 @@ func (o *ConfigInternalSecondary) SetHost(v string) { } func (o ConfigInternalSecondary) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -79,6 +83,43 @@ func (o ConfigInternalSecondary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigInternalSecondary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "host", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigInternalSecondary := _ConfigInternalSecondary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigInternalSecondary) + + if err != nil { + return err + } + + *o = ConfigInternalSecondary(varConfigInternalSecondary) + + return err +} + type NullableConfigInternalSecondary struct { value *ConfigInternalSecondary isSet bool @@ -114,3 +155,5 @@ func (v *NullableConfigInternalSecondary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_kerberos_key.go b/dns_config/model_config_kerberos_key.go index a477694..e233897 100644 --- a/dns_config/model_config_kerberos_key.go +++ b/dns_config/model_config_kerberos_key.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigKerberosKey type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type ConfigKerberosKey struct { Version *int64 `json:"version,omitempty"` } +type _ConfigKerberosKey ConfigKerberosKey + // NewConfigKerberosKey instantiates a new ConfigKerberosKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -236,7 +240,7 @@ func (o *ConfigKerberosKey) SetVersion(v int64) { } func (o ConfigKerberosKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,6 +268,43 @@ func (o ConfigKerberosKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigKerberosKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigKerberosKey := _ConfigKerberosKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigKerberosKey) + + if err != nil { + return err + } + + *o = ConfigKerberosKey(varConfigKerberosKey) + + return err +} + type NullableConfigKerberosKey struct { value *ConfigKerberosKey isSet bool @@ -299,3 +340,5 @@ func (v *NullableConfigKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_lbdn.go b/dns_config/model_config_lbdn.go index a60ac09..7d7e26b 100644 --- a/dns_config/model_config_lbdn.go +++ b/dns_config/model_config_lbdn.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigLBDN type satisfies the MappedNullable interface at compile time @@ -22,10 +24,10 @@ type ConfigLBDN struct { // Optional. Comment for __LBDN__. Comment *string `json:"comment,omitempty"` // Optional. _true_ to disable object. A disabled object is effectively non-existent when generating configuration. - Disabled *bool `json:"disabled,omitempty"` + Disabled *bool `json:"disabled,omitempty"` DtcPolicy *ConfigDTCPolicy `json:"dtc_policy,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigTTLInheritance `json:"inheritance_sources,omitempty"` // Name of __LBDN__. Name string `json:"name"` @@ -39,6 +41,8 @@ type ConfigLBDN struct { View string `json:"view"` } +type _ConfigLBDN ConfigLBDN + // NewConfigLBDN instantiates a new ConfigLBDN object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -363,7 +367,7 @@ func (o *ConfigLBDN) SetView(v string) { } func (o ConfigLBDN) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -401,6 +405,44 @@ func (o ConfigLBDN) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigLBDN) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigLBDN := _ConfigLBDN{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigLBDN) + + if err != nil { + return err + } + + *o = ConfigLBDN(varConfigLBDN) + + return err +} + type NullableConfigLBDN struct { value *ConfigLBDN isSet bool @@ -436,3 +478,5 @@ func (v *NullableConfigLBDN) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_acl_response.go b/dns_config/model_config_list_acl_response.go index 130df31..35ea487 100644 --- a/dns_config/model_config_list_acl_response.go +++ b/dns_config/model_config_list_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListACLResponse) SetResults(v []ConfigACL) { } func (o ConfigListACLResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_auth_nsg_response.go b/dns_config/model_config_list_auth_nsg_response.go index f8629a3..f780c1d 100644 --- a/dns_config/model_config_list_auth_nsg_response.go +++ b/dns_config/model_config_list_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListAuthNSGResponse) SetResults(v []ConfigAuthNSG) { } func (o ConfigListAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_auth_zone_response.go b/dns_config/model_config_list_auth_zone_response.go index 32df2cd..c81b849 100644 --- a/dns_config/model_config_list_auth_zone_response.go +++ b/dns_config/model_config_list_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListAuthZoneResponse) SetResults(v []ConfigAuthZone) { } func (o ConfigListAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_delegation_response.go b/dns_config/model_config_list_delegation_response.go index 7627700..621be8e 100644 --- a/dns_config/model_config_list_delegation_response.go +++ b/dns_config/model_config_list_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListDelegationResponse) SetResults(v []ConfigDelegation) { } func (o ConfigListDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListDelegationResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_forward_nsg_response.go b/dns_config/model_config_list_forward_nsg_response.go index 349e995..c419240 100644 --- a/dns_config/model_config_list_forward_nsg_response.go +++ b/dns_config/model_config_list_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListForwardNSGResponse) SetResults(v []ConfigForwardNSG) { } func (o ConfigListForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListForwardNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_forward_zone_response.go b/dns_config/model_config_list_forward_zone_response.go index 763f0a5..244f7fa 100644 --- a/dns_config/model_config_list_forward_zone_response.go +++ b/dns_config/model_config_list_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListForwardZoneResponse) SetResults(v []ConfigForwardZone) { } func (o ConfigListForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListForwardZoneResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_host_response.go b/dns_config/model_config_list_host_response.go index 8992946..e6f424a 100644 --- a/dns_config/model_config_list_host_response.go +++ b/dns_config/model_config_list_host_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListHostResponse) SetResults(v []ConfigHost) { } func (o ConfigListHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_lbdn_response.go b/dns_config/model_config_list_lbdn_response.go index ea04f2f..e54de42 100644 --- a/dns_config/model_config_list_lbdn_response.go +++ b/dns_config/model_config_list_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListLBDNResponse) SetResults(v []ConfigLBDN) { } func (o ConfigListLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_server_response.go b/dns_config/model_config_list_server_response.go index 458c5c5..87f340f 100644 --- a/dns_config/model_config_list_server_response.go +++ b/dns_config/model_config_list_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListServerResponse) SetResults(v []ConfigServer) { } func (o ConfigListServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_list_view_response.go b/dns_config/model_config_list_view_response.go index c165dfb..68d85ad 100644 --- a/dns_config/model_config_list_view_response.go +++ b/dns_config/model_config_list_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListViewResponse) SetResults(v []ConfigView) { } func (o ConfigListViewResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableConfigListViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_acl_response.go b/dns_config/model_config_read_acl_response.go index d46fae3..3bfe6be 100644 --- a/dns_config/model_config_read_acl_response.go +++ b/dns_config/model_config_read_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadACLResponse) SetResult(v ConfigACL) { } func (o ConfigReadACLResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_auth_nsg_response.go b/dns_config/model_config_read_auth_nsg_response.go index 0fb4cf4..aa337f4 100644 --- a/dns_config/model_config_read_auth_nsg_response.go +++ b/dns_config/model_config_read_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadAuthNSGResponse) SetResult(v ConfigAuthNSG) { } func (o ConfigReadAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_auth_zone_response.go b/dns_config/model_config_read_auth_zone_response.go index e93b2fd..0e5fce4 100644 --- a/dns_config/model_config_read_auth_zone_response.go +++ b/dns_config/model_config_read_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadAuthZoneResponse) SetResult(v ConfigAuthZone) { } func (o ConfigReadAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_delegation_response.go b/dns_config/model_config_read_delegation_response.go index 27f7724..e570fa0 100644 --- a/dns_config/model_config_read_delegation_response.go +++ b/dns_config/model_config_read_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadDelegationResponse) SetResult(v ConfigDelegation) { } func (o ConfigReadDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadDelegationResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_forward_nsg_response.go b/dns_config/model_config_read_forward_nsg_response.go index 2e052cd..468d9f1 100644 --- a/dns_config/model_config_read_forward_nsg_response.go +++ b/dns_config/model_config_read_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadForwardNSGResponse) SetResult(v ConfigForwardNSG) { } func (o ConfigReadForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadForwardNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_forward_zone_response.go b/dns_config/model_config_read_forward_zone_response.go index 8f1f4ff..16aebf5 100644 --- a/dns_config/model_config_read_forward_zone_response.go +++ b/dns_config/model_config_read_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadForwardZoneResponse) SetResult(v ConfigForwardZone) { } func (o ConfigReadForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadForwardZoneResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_global_response.go b/dns_config/model_config_read_global_response.go index 207606b..5b816c6 100644 --- a/dns_config/model_config_read_global_response.go +++ b/dns_config/model_config_read_global_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadGlobalResponse) SetResult(v ConfigGlobal) { } func (o ConfigReadGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_host_response.go b/dns_config/model_config_read_host_response.go index 1ac52eb..7e6eeb4 100644 --- a/dns_config/model_config_read_host_response.go +++ b/dns_config/model_config_read_host_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadHostResponse) SetResult(v ConfigHost) { } func (o ConfigReadHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_lbdn_response.go b/dns_config/model_config_read_lbdn_response.go index e32076d..93fd7fc 100644 --- a/dns_config/model_config_read_lbdn_response.go +++ b/dns_config/model_config_read_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadLBDNResponse) SetResult(v ConfigLBDN) { } func (o ConfigReadLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_server_response.go b/dns_config/model_config_read_server_response.go index 99254a6..bb88f40 100644 --- a/dns_config/model_config_read_server_response.go +++ b/dns_config/model_config_read_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadServerResponse) SetResult(v ConfigServer) { } func (o ConfigReadServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_read_view_response.go b/dns_config/model_config_read_view_response.go index 35dd8dc..10ac6ab 100644 --- a/dns_config/model_config_read_view_response.go +++ b/dns_config/model_config_read_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadViewResponse) SetResult(v ConfigView) { } func (o ConfigReadViewResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigReadViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_root_ns.go b/dns_config/model_config_root_ns.go index 3420c41..b1cbdc7 100644 --- a/dns_config/model_config_root_ns.go +++ b/dns_config/model_config_root_ns.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigRootNS type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigRootNS struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigRootNS ConfigRootNS + // NewConfigRootNS instantiates a new ConfigRootNS object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -127,7 +131,7 @@ func (o *ConfigRootNS) SetProtocolFqdn(v string) { } func (o ConfigRootNS) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -144,6 +148,44 @@ func (o ConfigRootNS) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigRootNS) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigRootNS := _ConfigRootNS{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigRootNS) + + if err != nil { + return err + } + + *o = ConfigRootNS(varConfigRootNS) + + return err +} + type NullableConfigRootNS struct { value *ConfigRootNS isSet bool @@ -179,3 +221,5 @@ func (v *NullableConfigRootNS) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_server.go b/dns_config/model_config_server.go index d671625..a931281 100644 --- a/dns_config/model_config_server.go +++ b/dns_config/model_config_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,6 +13,8 @@ package dns_config import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the ConfigServer type satisfies the MappedNullable interface at compile time @@ -63,7 +65,7 @@ type ConfigServer struct { // _gss_tsig_enabled_ enables/disables GSS-TSIG signed dynamic updates. Defaults to _false_. GssTsigEnabled *bool `json:"gss_tsig_enabled,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigServerInheritance `json:"inheritance_sources,omitempty"` // _kerberos_keys_ contains a list of keys for GSS-TSIG signed dynamic updates. Defaults to empty. KerberosKeys []ConfigKerberosKey `json:"kerberos_keys,omitempty"` @@ -119,6 +121,8 @@ type ConfigServer struct { Views []ConfigDisplayView `json:"views,omitempty"` } +type _ConfigServer ConfigServer + // NewConfigServer instantiates a new ConfigServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1698,7 +1702,7 @@ func (o *ConfigServer) SetViews(v []ConfigDisplayView) { } func (o ConfigServer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1855,6 +1859,43 @@ func (o ConfigServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigServer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigServer := _ConfigServer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigServer) + + if err != nil { + return err + } + + *o = ConfigServer(varConfigServer) + + return err +} + type NullableConfigServer struct { value *ConfigServer isSet bool @@ -1890,3 +1931,5 @@ func (v *NullableConfigServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_server_inheritance.go b/dns_config/model_config_server_inheritance.go index f8e445f..93205d5 100644 --- a/dns_config/model_config_server_inheritance.go +++ b/dns_config/model_config_server_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,35 +19,35 @@ var _ MappedNullable = &ConfigServerInheritance{} // ConfigServerInheritance Inheritance configuration specifies how and which fields _Server_ object inherits from _Global_ parent. type ConfigServerInheritance struct { - AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` - CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` - DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` - EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` - FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` - FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` - ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` - GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` - KerberosKeys *ConfigInheritedKerberosKeys `json:"kerberos_keys,omitempty"` - LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` - LogQueryResponse *Inheritance2InheritedBool `json:"log_query_response,omitempty"` - MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` - MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` - MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` - MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` - Notify *Inheritance2InheritedBool `json:"notify,omitempty"` - QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` - QueryPort *Inheritance2InheritedUInt32 `json:"query_port,omitempty"` - RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` - RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` - RecursiveClients *Inheritance2InheritedUInt32 `json:"recursive_clients,omitempty"` - ResolverQueryTimeout *Inheritance2InheritedUInt32 `json:"resolver_query_timeout,omitempty"` - SecondaryAxfrQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_axfr_query_limit,omitempty"` - SecondarySoaQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_soa_query_limit,omitempty"` - SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` - SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` - TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` - UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` - UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` + AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` + CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` + DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` + EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` + FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` + FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` + ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` + GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` + KerberosKeys *ConfigInheritedKerberosKeys `json:"kerberos_keys,omitempty"` + LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` + LogQueryResponse *Inheritance2InheritedBool `json:"log_query_response,omitempty"` + MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` + MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` + MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` + MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` + Notify *Inheritance2InheritedBool `json:"notify,omitempty"` + QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` + QueryPort *Inheritance2InheritedUInt32 `json:"query_port,omitempty"` + RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` + RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` + RecursiveClients *Inheritance2InheritedUInt32 `json:"recursive_clients,omitempty"` + ResolverQueryTimeout *Inheritance2InheritedUInt32 `json:"resolver_query_timeout,omitempty"` + SecondaryAxfrQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_axfr_query_limit,omitempty"` + SecondarySoaQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_soa_query_limit,omitempty"` + SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` + SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` + TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` + UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` + UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` } // NewConfigServerInheritance instantiates a new ConfigServerInheritance object @@ -996,7 +996,7 @@ func (o *ConfigServerInheritance) SetUseForwardersForSubzones(v Inheritance2Inhe } func (o ConfigServerInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1130,3 +1130,5 @@ func (v *NullableConfigServerInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_sort_list_item.go b/dns_config/model_config_sort_list_item.go index 2fca3ca..3a37ffa 100644 --- a/dns_config/model_config_sort_list_item.go +++ b/dns_config/model_config_sort_list_item.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigSortListItem type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type ConfigSortListItem struct { Source *string `json:"source,omitempty"` } +type _ConfigSortListItem ConfigSortListItem + // NewConfigSortListItem instantiates a new ConfigSortListItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -168,7 +172,7 @@ func (o *ConfigSortListItem) SetSource(v string) { } func (o ConfigSortListItem) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -190,6 +194,43 @@ func (o ConfigSortListItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigSortListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "element", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigSortListItem := _ConfigSortListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigSortListItem) + + if err != nil { + return err + } + + *o = ConfigSortListItem(varConfigSortListItem) + + return err +} + type NullableConfigSortListItem struct { value *ConfigSortListItem isSet bool @@ -225,3 +266,5 @@ func (v *NullableConfigSortListItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_trust_anchor.go b/dns_config/model_config_trust_anchor.go index eb1d56b..cbdff08 100644 --- a/dns_config/model_config_trust_anchor.go +++ b/dns_config/model_config_trust_anchor.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package dns_config import ( "encoding/json" + "bytes" + "fmt" ) // checks if the ConfigTrustAnchor type satisfies the MappedNullable interface at compile time @@ -30,6 +32,8 @@ type ConfigTrustAnchor struct { Zone string `json:"zone"` } +type _ConfigTrustAnchor ConfigTrustAnchor + // NewConfigTrustAnchor instantiates a new ConfigTrustAnchor object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -187,7 +191,7 @@ func (o *ConfigTrustAnchor) SetZone(v string) { } func (o ConfigTrustAnchor) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -208,6 +212,45 @@ func (o ConfigTrustAnchor) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigTrustAnchor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "algorithm", + "public_key", + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigTrustAnchor := _ConfigTrustAnchor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigTrustAnchor) + + if err != nil { + return err + } + + *o = ConfigTrustAnchor(varConfigTrustAnchor) + + return err +} + type NullableConfigTrustAnchor struct { value *ConfigTrustAnchor isSet bool @@ -243,3 +286,5 @@ func (v *NullableConfigTrustAnchor) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_tsig_key.go b/dns_config/model_config_tsig_key.go index 503c738..6623cc2 100644 --- a/dns_config/model_config_tsig_key.go +++ b/dns_config/model_config_tsig_key.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -243,7 +243,7 @@ func (o *ConfigTSIGKey) SetSecret(v string) { } func (o ConfigTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,3 +308,5 @@ func (v *NullableConfigTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_ttl_inheritance.go b/dns_config/model_config_ttl_inheritance.go index 5eeef0b..11164ab 100644 --- a/dns_config/model_config_ttl_inheritance.go +++ b/dns_config/model_config_ttl_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigTTLInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o ConfigTTLInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigTTLInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_acl_response.go b/dns_config/model_config_update_acl_response.go index 3be6a0b..378fddd 100644 --- a/dns_config/model_config_update_acl_response.go +++ b/dns_config/model_config_update_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateACLResponse) SetResult(v ConfigACL) { } func (o ConfigUpdateACLResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_auth_nsg_response.go b/dns_config/model_config_update_auth_nsg_response.go index 8c5b968..97d8c14 100644 --- a/dns_config/model_config_update_auth_nsg_response.go +++ b/dns_config/model_config_update_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateAuthNSGResponse) SetResult(v ConfigAuthNSG) { } func (o ConfigUpdateAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_auth_zone_response.go b/dns_config/model_config_update_auth_zone_response.go index a537e46..8b63f17 100644 --- a/dns_config/model_config_update_auth_zone_response.go +++ b/dns_config/model_config_update_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateAuthZoneResponse) SetResult(v ConfigAuthZone) { } func (o ConfigUpdateAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_delegation_response.go b/dns_config/model_config_update_delegation_response.go index 2a1920a..0c949be 100644 --- a/dns_config/model_config_update_delegation_response.go +++ b/dns_config/model_config_update_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateDelegationResponse) SetResult(v ConfigDelegation) { } func (o ConfigUpdateDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateDelegationResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_forward_nsg_response.go b/dns_config/model_config_update_forward_nsg_response.go index 01ab8ab..56bf296 100644 --- a/dns_config/model_config_update_forward_nsg_response.go +++ b/dns_config/model_config_update_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateForwardNSGResponse) SetResult(v ConfigForwardNSG) { } func (o ConfigUpdateForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateForwardNSGResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_forward_zone_response.go b/dns_config/model_config_update_forward_zone_response.go index 669d072..66ebf84 100644 --- a/dns_config/model_config_update_forward_zone_response.go +++ b/dns_config/model_config_update_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateForwardZoneResponse) SetResult(v ConfigForwardZone) { } func (o ConfigUpdateForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateForwardZoneResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_global_response.go b/dns_config/model_config_update_global_response.go index 7745385..a079a14 100644 --- a/dns_config/model_config_update_global_response.go +++ b/dns_config/model_config_update_global_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateGlobalResponse) SetResult(v ConfigGlobal) { } func (o ConfigUpdateGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_host_response.go b/dns_config/model_config_update_host_response.go index 9515620..e1d6646 100644 --- a/dns_config/model_config_update_host_response.go +++ b/dns_config/model_config_update_host_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateHostResponse) SetResult(v ConfigHost) { } func (o ConfigUpdateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_lbdn_response.go b/dns_config/model_config_update_lbdn_response.go index 633c797..c486881 100644 --- a/dns_config/model_config_update_lbdn_response.go +++ b/dns_config/model_config_update_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateLBDNResponse) SetResult(v ConfigLBDN) { } func (o ConfigUpdateLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_server_response.go b/dns_config/model_config_update_server_response.go index 16e6a88..7474b9d 100644 --- a/dns_config/model_config_update_server_response.go +++ b/dns_config/model_config_update_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateServerResponse) SetResult(v ConfigServer) { } func (o ConfigUpdateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_update_view_response.go b/dns_config/model_config_update_view_response.go index a5356b5..6bcc7bd 100644 --- a/dns_config/model_config_update_view_response.go +++ b/dns_config/model_config_update_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateViewResponse) SetResult(v ConfigView) { } func (o ConfigUpdateViewResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableConfigUpdateViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_view.go b/dns_config/model_config_view.go index 5d21d3e..93618a6 100644 --- a/dns_config/model_config_view.go +++ b/dns_config/model_config_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,6 +13,8 @@ package dns_config import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the ConfigView type satisfies the MappedNullable interface at compile time @@ -41,8 +43,8 @@ type ConfigView struct { // Optional. DNSSEC trust anchors. Error if there are list items with duplicate (_zone_, _sep_, _algorithm_) combinations. Defaults to empty. DnssecTrustAnchors []ConfigTrustAnchor `json:"dnssec_trust_anchors,omitempty"` // Optional. _true_ to reject expired DNSSEC keys. Ignored if either _dnssec_enabled_ or _dnssec_enable_validation_ is _false_. Defaults to _true_. - DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` - DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` + DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` + DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` // Optional. _true_ to enable EDNS client subnet for recursive queries. Other _ecs_*_ fields are ignored if this field is not enabled. Defaults to _false-. EcsEnabled *bool `json:"ecs_enabled,omitempty"` // Optional. _true_ to enable ECS options in outbound queries. This functionality has additional overhead so it is disabled by default. Defaults to _false_. @@ -66,7 +68,7 @@ type ConfigView struct { // _gss_tsig_enabled_ enables/disables GSS-TSIG signed dynamic updates. Defaults to _false_. GssTsigEnabled *bool `json:"gss_tsig_enabled,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigViewInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpSpaces []string `json:"ip_spaces,omitempty"` @@ -111,10 +113,12 @@ type ConfigView struct { // Optional. Use default forwarders to resolve queries for subzones. Defaults to _true_. UseForwardersForSubzones *bool `json:"use_forwarders_for_subzones,omitempty"` // _use_root_forwarders_for_local_resolution_with_b1td_ allows DNS recursive queries sent to root forwarders for local resolution when deployed alongside BloxOne Thread Defense. Defaults to _false_. - UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` - ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` + UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` + ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } +type _ConfigView ConfigView + // NewConfigView instantiates a new ConfigView object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1662,7 +1666,7 @@ func (o *ConfigView) SetZoneAuthority(v ConfigZoneAuthority) { } func (o ConfigView) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1816,6 +1820,43 @@ func (o ConfigView) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigView) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigView := _ConfigView{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigView) + + if err != nil { + return err + } + + *o = ConfigView(varConfigView) + + return err +} + type NullableConfigView struct { value *ConfigView isSet bool @@ -1851,3 +1892,5 @@ func (v *NullableConfigView) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_view_inheritance.go b/dns_config/model_config_view_inheritance.go index 07bfb14..188122b 100644 --- a/dns_config/model_config_view_inheritance.go +++ b/dns_config/model_config_view_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,32 +19,32 @@ var _ MappedNullable = &ConfigViewInheritance{} // ConfigViewInheritance Inheritance configuration specifies how and which fields _View_ object inherits from [ _Global_, _Server_ ] parent. type ConfigViewInheritance struct { - AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` - CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` - DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` - DtcConfig *ConfigInheritedDtcConfig `json:"dtc_config,omitempty"` - EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` - EdnsUdpSize *Inheritance2InheritedUInt32 `json:"edns_udp_size,omitempty"` - FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` - FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` - ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` - GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` - LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` - MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` - MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` - MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` - MaxUdpSize *Inheritance2InheritedUInt32 `json:"max_udp_size,omitempty"` - MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` - Notify *Inheritance2InheritedBool `json:"notify,omitempty"` - QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` - RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` - RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` - SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` - SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` - TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` - UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` - UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` - ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` + AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` + CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` + DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` + DtcConfig *ConfigInheritedDtcConfig `json:"dtc_config,omitempty"` + EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` + EdnsUdpSize *Inheritance2InheritedUInt32 `json:"edns_udp_size,omitempty"` + FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` + FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` + ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` + GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` + LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` + MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` + MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` + MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` + MaxUdpSize *Inheritance2InheritedUInt32 `json:"max_udp_size,omitempty"` + MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` + Notify *Inheritance2InheritedBool `json:"notify,omitempty"` + QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` + RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` + RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` + SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` + SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` + TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` + UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` + UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` + ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` } // NewConfigViewInheritance instantiates a new ConfigViewInheritance object @@ -897,7 +897,7 @@ func (o *ConfigViewInheritance) SetZoneAuthority(v ConfigInheritedZoneAuthority) } func (o ConfigViewInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1022,3 +1022,5 @@ func (v *NullableConfigViewInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_warning.go b/dns_config/model_config_warning.go index 1f42dc7..65b8324 100644 --- a/dns_config/model_config_warning.go +++ b/dns_config/model_config_warning.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigWarning) SetName(v string) { } func (o ConfigWarning) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableConfigWarning) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_zone_authority.go b/dns_config/model_config_zone_authority.go index 49881ff..84accf1 100644 --- a/dns_config/model_config_zone_authority.go +++ b/dns_config/model_config_zone_authority.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -379,7 +379,7 @@ func (o *ConfigZoneAuthority) SetUseDefaultMname(v bool) { } func (o ConfigZoneAuthority) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -456,3 +456,5 @@ func (v *NullableConfigZoneAuthority) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_config_zone_authority_m_name_block.go b/dns_config/model_config_zone_authority_m_name_block.go index 5686183..9598885 100644 --- a/dns_config/model_config_zone_authority_m_name_block.go +++ b/dns_config/model_config_zone_authority_m_name_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigZoneAuthorityMNameBlock) SetUseDefaultMname(v bool) { } func (o ConfigZoneAuthorityMNameBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableConfigZoneAuthorityMNameBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_inheritance2_assigned_host.go b/dns_config/model_inheritance2_assigned_host.go index e7de2eb..caca775 100644 --- a/dns_config/model_inheritance2_assigned_host.go +++ b/dns_config/model_inheritance2_assigned_host.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *Inheritance2AssignedHost) SetOphid(v string) { } func (o Inheritance2AssignedHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableInheritance2AssignedHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_inheritance2_inherited_bool.go b/dns_config/model_inheritance2_inherited_bool.go index e32cc64..6028dbd 100644 --- a/dns_config/model_inheritance2_inherited_bool.go +++ b/dns_config/model_inheritance2_inherited_bool.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedBool) SetValue(v bool) { } func (o Inheritance2InheritedBool) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritance2InheritedBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_inheritance2_inherited_string.go b/dns_config/model_inheritance2_inherited_string.go index b0b72a1..59f48f4 100644 --- a/dns_config/model_inheritance2_inherited_string.go +++ b/dns_config/model_inheritance2_inherited_string.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedString) SetValue(v string) { } func (o Inheritance2InheritedString) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritance2InheritedString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/model_inheritance2_inherited_u_int32.go b/dns_config/model_inheritance2_inherited_u_int32.go index dcdb24e..84d89e9 100644 --- a/dns_config/model_inheritance2_inherited_u_int32.go +++ b/dns_config/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_config/utils.go b/dns_config/utils.go index a23d0eb..6a1c960 100644 --- a/dns_config/utils.go +++ b/dns_config/utils.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/dns_data/.openapi-generator/VERSION b/dns_data/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/dns_data/.openapi-generator/VERSION +++ b/dns_data/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/dns_data/README.md b/dns_data/README.md index c915354..e1d4afb 100644 --- a/dns_data/README.md +++ b/dns_data/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import dns_data "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_data.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_data.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_data.ContextOperationServerIndices` and `dns_data.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -115,11 +115,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_data.ContextAPIKeys, + map[string]dns_data.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_data/api_record.go b/dns_data/api_record.go index 3400bef..91c8712 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type RecordAPI interface { /* - RecordCreate Create the DNS resource record. + RecordCreate Create the DNS resource record. - Use this method to create a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to create a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ RecordCreate(ctx context.Context) ApiRecordCreateRequest @@ -37,27 +38,27 @@ type RecordAPI interface { // @return DataCreateRecordResponse RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) /* - RecordDelete Move the DNS resource record to recycle bin. + RecordDelete Move the DNS resource record to recycle bin. - Use this method to move a DNS __Record__ object to the recycle bin. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to move a DNS __Record__ object to the recycle bin. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest // RecordDeleteExecute executes the request RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) /* - RecordList Retrieve DNS resource records. + RecordList Retrieve DNS resource records. - Use this method to retrieve DNS __Record__ objects. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve DNS __Record__ objects. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ RecordList(ctx context.Context) ApiRecordListRequest @@ -65,14 +66,14 @@ type RecordAPI interface { // @return DataListRecordResponse RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) /* - RecordRead Retrieve the DNS resource record. + RecordRead Retrieve the DNS resource record. - Use this method to retrieve a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ RecordRead(ctx context.Context, id string) ApiRecordReadRequest @@ -80,14 +81,14 @@ type RecordAPI interface { // @return DataReadRecordResponse RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) /* - RecordSOASerialIncrement Increment serial number for the SOA record. + RecordSOASerialIncrement Increment serial number for the SOA record. - Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest @@ -95,14 +96,14 @@ type RecordAPI interface { // @return DataSOASerialIncrementResponse RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) /* - RecordUpdate Update the DNS resource record. + RecordUpdate Update the DNS resource record. - Use this method to update a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to update a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest @@ -115,10 +116,10 @@ type RecordAPI interface { type RecordAPIService internal.Service type ApiRecordCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - body *DataRecord - inherit *string + body *DataRecord + inherit *string } func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { @@ -142,25 +143,24 @@ RecordCreate Create the DNS resource record. Use this method to create a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequest { return ApiRecordCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DataCreateRecordResponse +// @return DataCreateRecordResponse func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataCreateRecordResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataCreateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordCreate") @@ -197,16 +197,16 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -252,9 +252,9 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC } type ApiRecordDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string + id string } func (r ApiRecordDeleteRequest) Execute() (*http.Response, error) { @@ -267,24 +267,24 @@ RecordDelete Move the DNS resource record to recycle bin. Use this method to move a DNS __Record__ object to the recycle bin. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ func (a *RecordAPIService) RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest { return ApiRecordDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordDelete") @@ -356,50 +356,50 @@ func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http. } type ApiRecordListRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordListRequest) Fields(fields string) ApiRecordListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRecordListRequest) Filter(filter string) ApiRecordListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRecordListRequest) Offset(offset int32) ApiRecordListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRecordListRequest) Limit(limit int32) ApiRecordListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRecordListRequest) PageToken(pageToken string) ApiRecordListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRecordListRequest) OrderBy(orderBy string) ApiRecordListRequest { r.orderBy = &orderBy return r @@ -433,25 +433,24 @@ RecordList Retrieve DNS resource records. Use this method to retrieve DNS __Record__ objects. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest { return ApiRecordListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DataListRecordResponse +// @return DataListRecordResponse func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataListRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataListRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordList") @@ -554,14 +553,14 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR } type ApiRecordReadRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordReadRequest) Fields(fields string) ApiRecordReadRequest { r.fields = &fields return r @@ -583,27 +582,26 @@ RecordRead Retrieve the DNS resource record. Use this method to retrieve a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordReadRequest { return ApiRecordReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataReadRecordResponse +// @return DataReadRecordResponse func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataReadRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataReadRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordRead") @@ -686,10 +684,10 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR } type ApiRecordSOASerialIncrementRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataSOASerialIncrementRequest + id string + body *DataSOASerialIncrementRequest } func (r ApiRecordSOASerialIncrementRequest) Body(body DataSOASerialIncrementRequest) ApiRecordSOASerialIncrementRequest { @@ -707,27 +705,26 @@ RecordSOASerialIncrement Increment serial number for the SOA record. Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest { return ApiRecordSOASerialIncrementRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataSOASerialIncrementResponse +// @return DataSOASerialIncrementResponse func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataSOASerialIncrementResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataSOASerialIncrementResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordSOASerialIncrement") @@ -762,8 +759,8 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -809,11 +806,11 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI } type ApiRecordUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataRecord - inherit *string + id string + body *DataRecord + inherit *string } func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { @@ -837,27 +834,26 @@ RecordUpdate Update the DNS resource record. Use this method to update a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest { return ApiRecordUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataUpdateRecordResponse +// @return DataUpdateRecordResponse func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataUpdateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataUpdateRecordResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataUpdateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordUpdate") @@ -895,16 +891,16 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_data/client.go b/dns_data/client.go index 5c1c0ee..086bb57 100644 --- a/dns_data/client.go +++ b/dns_data/client.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package dns_data import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,7 +19,7 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DNS Data API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services RecordAPI RecordAPI @@ -29,7 +29,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.RecordAPI = (*RecordAPIService)(&c.Common) diff --git a/dns_data/docs/RecordAPI.md b/dns_data/docs/RecordAPI.md index 9a09e0e..1b08a69 100644 --- a/dns_data/docs/RecordAPI.md +++ b/dns_data/docs/RecordAPI.md @@ -27,25 +27,25 @@ Create the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordCreate`: DataCreateRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordCreate`: %v\n", resp) + body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordCreate`: DataCreateRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordCreate`: %v\n", resp) } ``` @@ -95,22 +95,22 @@ Move the DNS resource record to recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -163,32 +163,32 @@ Retrieve DNS resource records. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordList`: DataListRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordList`: DataListRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordList`: %v\n", resp) } ``` @@ -245,26 +245,26 @@ Retrieve the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordRead`: DataReadRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordRead`: DataReadRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordRead`: %v\n", resp) } ``` @@ -319,25 +319,25 @@ Increment serial number for the SOA record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewDataSOASerialIncrementRequest() // DataSOASerialIncrementRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordSOASerialIncrement``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordSOASerialIncrement`: DataSOASerialIncrementResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordSOASerialIncrement`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewDataSOASerialIncrementRequest() // DataSOASerialIncrementRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordSOASerialIncrement``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordSOASerialIncrement`: DataSOASerialIncrementResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordSOASerialIncrement`: %v\n", resp) } ``` @@ -391,26 +391,26 @@ Update the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordUpdate`: DataUpdateRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordUpdate`: DataUpdateRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordUpdate`: %v\n", resp) } ``` diff --git a/dns_data/model_data_create_record_response.go b/dns_data/model_data_create_record_response.go index 870d899..2914142 100644 --- a/dns_data/model_data_create_record_response.go +++ b/dns_data/model_data_create_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataCreateRecordResponse) SetResult(v DataRecord) { } func (o DataCreateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataCreateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_list_record_response.go b/dns_data/model_data_list_record_response.go index e633b11..8ce789e 100644 --- a/dns_data/model_data_list_record_response.go +++ b/dns_data/model_data_list_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *DataListRecordResponse) SetResults(v []DataRecord) { } func (o DataListRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableDataListRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_read_record_response.go b/dns_data/model_data_read_record_response.go index 7541c04..57ccdab 100644 --- a/dns_data/model_data_read_record_response.go +++ b/dns_data/model_data_read_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataReadRecordResponse) SetResult(v DataRecord) { } func (o DataReadRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataReadRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_record.go b/dns_data/model_data_record.go index 35e1911..19ea0bd 100644 --- a/dns_data/model_data_record.go +++ b/dns_data/model_data_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,6 +13,8 @@ package dns_data import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the DataRecord type satisfies the MappedNullable interface at compile time @@ -41,7 +43,7 @@ type DataRecord struct { // The DNS protocol textual representation of the DNS resource record data. DnsRdata *string `json:"dns_rdata,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *DataRecordInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpamHost *string `json:"ipam_host,omitempty"` @@ -73,6 +75,8 @@ type DataRecord struct { Zone *string `json:"zone,omitempty"` } +type _DataRecord DataRecord + // NewDataRecord instantiates a new DataRecord object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -916,7 +920,7 @@ func (o *DataRecord) SetZone(v string) { } func (o DataRecord) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1004,6 +1008,43 @@ func (o DataRecord) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DataRecord) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rdata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataRecord := _DataRecord{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataRecord) + + if err != nil { + return err + } + + *o = DataRecord(varDataRecord) + + return err +} + type NullableDataRecord struct { value *DataRecord isSet bool @@ -1039,3 +1080,5 @@ func (v *NullableDataRecord) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_record_inheritance.go b/dns_data/model_data_record_inheritance.go index 55e5209..88f08ec 100644 --- a/dns_data/model_data_record_inheritance.go +++ b/dns_data/model_data_record_inheritance.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataRecordInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o DataRecordInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataRecordInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_soa_serial_increment_request.go b/dns_data/model_data_soa_serial_increment_request.go index ce4dabf..2ae5f8c 100644 --- a/dns_data/model_data_soa_serial_increment_request.go +++ b/dns_data/model_data_soa_serial_increment_request.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -140,7 +140,7 @@ func (o *DataSOASerialIncrementRequest) SetSerialIncrement(v int64) { } func (o DataSOASerialIncrementRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,3 +196,5 @@ func (v *NullableDataSOASerialIncrementRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_soa_serial_increment_response.go b/dns_data/model_data_soa_serial_increment_response.go index 352d117..cc83af7 100644 --- a/dns_data/model_data_soa_serial_increment_response.go +++ b/dns_data/model_data_soa_serial_increment_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataSOASerialIncrementResponse) SetResult(v DataRecord) { } func (o DataSOASerialIncrementResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataSOASerialIncrementResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_update_record_response.go b/dns_data/model_data_update_record_response.go index aca7ee5..ac6d08d 100644 --- a/dns_data/model_data_update_record_response.go +++ b/dns_data/model_data_update_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataUpdateRecordResponse) SetResult(v DataRecord) { } func (o DataUpdateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataUpdateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_inheritance2_inherited_u_int32.go b/dns_data/model_inheritance2_inherited_u_int32.go index c23f897..9d2885f 100644 --- a/dns_data/model_inheritance2_inherited_u_int32.go +++ b/dns_data/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_protobuf_field_mask.go b/dns_data/model_protobuf_field_mask.go index 17ded5d..21401df 100644 --- a/dns_data/model_protobuf_field_mask.go +++ b/dns_data/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/utils.go b/dns_data/utils.go index d20341f..3e34cc6 100644 --- a/dns_data/utils.go +++ b/dns_data/utils.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/infra_mgmt/.openapi-generator/VERSION b/infra_mgmt/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/infra_mgmt/.openapi-generator/VERSION +++ b/infra_mgmt/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/infra_mgmt/README.md b/infra_mgmt/README.md index 7a82978..337a231 100644 --- a/infra_mgmt/README.md +++ b/infra_mgmt/README.md @@ -62,20 +62,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import infra_mgmt "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -85,17 +85,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `infra_mgmt.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `infra_mgmt.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -107,9 +107,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `infra_mgmt.ContextOperationServerIndices` and `infra_mgmt.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), infra_mgmt.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -191,11 +191,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + infra_mgmt.ContextAPIKeys, + map[string]infra_mgmt.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/infra_mgmt/api_detail.go b/infra_mgmt/api_detail.go index 5f04bf8..dcedbf2 100644 --- a/infra_mgmt/api_detail.go +++ b/infra_mgmt/api_detail.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -17,15 +17,16 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type DetailAPI interface { /* - DetailHostsList List all the Hosts along with its associated Services (applications). + DetailHostsList List all the Hosts along with its associated Services (applications). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailHostsListRequest */ DetailHostsList(ctx context.Context) ApiDetailHostsListRequest @@ -33,10 +34,10 @@ type DetailAPI interface { // @return InfraListDetailHostsResponse DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) /* - DetailServicesList List all the Services (applications) along with its associated Hosts. + DetailServicesList List all the Services (applications) along with its associated Hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailServicesListRequest */ DetailServicesList(ctx context.Context) ApiDetailServicesListRequest @@ -49,49 +50,49 @@ type DetailAPI interface { type DetailAPIService internal.Service type ApiDetailHostsListRequest struct { - ctx context.Context + ctx context.Context ApiService DetailAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDetailHostsListRequest) Filter(filter string) ApiDetailHostsListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDetailHostsListRequest) OrderBy(orderBy string) ApiDetailHostsListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDetailHostsListRequest) Offset(offset int32) ApiDetailHostsListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDetailHostsListRequest) Limit(limit int32) ApiDetailHostsListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDetailHostsListRequest) PageToken(pageToken string) ApiDetailHostsListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDetailHostsListRequest) Fields(fields string) ApiDetailHostsListRequest { r.fields = &fields return r @@ -116,25 +117,24 @@ func (r ApiDetailHostsListRequest) Execute() (*InfraListDetailHostsResponse, *ht /* DetailHostsList List all the Hosts along with its associated Services (applications). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailHostsListRequest */ func (a *DetailAPIService) DetailHostsList(ctx context.Context) ApiDetailHostsListRequest { return ApiDetailHostsListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraListDetailHostsResponse +// @return InfraListDetailHostsResponse func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListDetailHostsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListDetailHostsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DetailAPIService.DetailHostsList") @@ -234,49 +234,49 @@ func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) ( } type ApiDetailServicesListRequest struct { - ctx context.Context + ctx context.Context ApiService DetailAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDetailServicesListRequest) Filter(filter string) ApiDetailServicesListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDetailServicesListRequest) OrderBy(orderBy string) ApiDetailServicesListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDetailServicesListRequest) Offset(offset int32) ApiDetailServicesListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDetailServicesListRequest) Limit(limit int32) ApiDetailServicesListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDetailServicesListRequest) PageToken(pageToken string) ApiDetailServicesListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDetailServicesListRequest) Fields(fields string) ApiDetailServicesListRequest { r.fields = &fields return r @@ -301,25 +301,24 @@ func (r ApiDetailServicesListRequest) Execute() (*InfraListDetailServicesRespons /* DetailServicesList List all the Services (applications) along with its associated Hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailServicesListRequest */ func (a *DetailAPIService) DetailServicesList(ctx context.Context) ApiDetailServicesListRequest { return ApiDetailServicesListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraListDetailServicesResponse +// @return InfraListDetailServicesResponse func (a *DetailAPIService) DetailServicesListExecute(r ApiDetailServicesListRequest) (*InfraListDetailServicesResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListDetailServicesResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListDetailServicesResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DetailAPIService.DetailServicesList") diff --git a/infra_mgmt/api_hosts.go b/infra_mgmt/api_hosts.go index 159f42a..9c763b5 100644 --- a/infra_mgmt/api_hosts.go +++ b/infra_mgmt/api_hosts.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type HostsAPI interface { /* - HostsAssignTags Assign tags for list of hosts. + HostsAssignTags Assign tags for list of hosts. - Validation: - - "ids" is required. - - "tags" is required. + Validation: +- "ids" is required. +- "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest @@ -38,13 +39,13 @@ type HostsAPI interface { // @return map[string]interface{} HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) /* - HostsCreate Create a Host resource. + HostsCreate Create a Host resource. - Validation: - - "display_name" is required and should be unique. + Validation: +- "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ HostsCreate(ctx context.Context) ApiHostsCreateRequest @@ -52,27 +53,27 @@ type HostsAPI interface { // @return InfraCreateHostResponse HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) /* - HostsDelete Delete a Host resource. + HostsDelete Delete a Host resource. - Validation: - - "id" is required. + Validation: +- "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest // HostsDeleteExecute executes the request HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Response, error) /* - HostsDisconnect Disconnect a Host by resource ID. + HostsDisconnect Disconnect a Host by resource ID. - The user can disconnect the host from the cloud (for example, if in case a host is compromised). + The user can disconnect the host from the cloud (for example, if in case a host is compromised). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDisconnectRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDisconnectRequest */ HostsDisconnect(ctx context.Context, id string) ApiHostsDisconnectRequest @@ -80,10 +81,10 @@ type HostsAPI interface { // @return map[string]interface{} HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) /* - HostsList List all the Host resources for an account. + HostsList List all the Host resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsListRequest */ HostsList(ctx context.Context) ApiHostsListRequest @@ -91,14 +92,14 @@ type HostsAPI interface { // @return InfraListHostResponse HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) /* - HostsRead Get a Host resource. + HostsRead Get a Host resource. - Validation: - - "id" is required. + Validation: +- "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ HostsRead(ctx context.Context, id string) ApiHostsReadRequest @@ -106,12 +107,12 @@ type HostsAPI interface { // @return InfraGetHostResponse HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) /* - HostsReplace Migrate a Host's configuration from one to another. + HostsReplace Migrate a Host's configuration from one to another. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fromResourceId An application specific resource identity of a resource - @param toResourceId An application specific resource identity of a resource - @return ApiHostsReplaceRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fromResourceId An application specific resource identity of a resource + @param toResourceId An application specific resource identity of a resource + @return ApiHostsReplaceRequest */ HostsReplace(ctx context.Context, fromResourceId string, toResourceId string) ApiHostsReplaceRequest @@ -119,14 +120,14 @@ type HostsAPI interface { // @return map[string]interface{} HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) /* - HostsUnassignTags Unassign tag for the list hosts. + HostsUnassignTags Unassign tag for the list hosts. - Validation: - - "ids" is required. - - "keys" is required. + Validation: +- "ids" is required. +- "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest @@ -134,16 +135,16 @@ type HostsAPI interface { // @return map[string]interface{} HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) /* - HostsUpdate Update a Host resource. + HostsUpdate Update a Host resource. - Validation: - - "id" is required. - - "display_name" is required and should be unique. - - "pool_id" is required. + Validation: +- "id" is required. +- "display_name" is required and should be unique. +- "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest @@ -156,9 +157,9 @@ type HostsAPI interface { type HostsAPIService internal.Service type ApiHostsAssignTagsRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - body *InfraAssignTagsRequest + body *InfraAssignTagsRequest } func (r ApiHostsAssignTagsRequest) Body(body InfraAssignTagsRequest) ApiHostsAssignTagsRequest { @@ -177,25 +178,24 @@ Validation: - "ids" is required. - "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ func (a *HostsAPIService) HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest { return ApiHostsAssignTagsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsAssignTags") @@ -229,16 +229,16 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -284,9 +284,9 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m } type ApiHostsCreateRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - body *InfraHost + body *InfraHost } func (r ApiHostsCreateRequest) Body(body InfraHost) ApiHostsCreateRequest { @@ -304,25 +304,24 @@ HostsCreate Create a Host resource. Validation: - "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ func (a *HostsAPIService) HostsCreate(ctx context.Context) ApiHostsCreateRequest { return ApiHostsCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraCreateHostResponse +// @return InfraCreateHostResponse func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraCreateHostResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraCreateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsCreate") @@ -356,16 +355,16 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -411,9 +410,9 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre } type ApiHostsDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string + id string } func (r ApiHostsDeleteRequest) Execute() (*http.Response, error) { @@ -426,24 +425,24 @@ HostsDelete Delete a Host resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ func (a *HostsAPIService) HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest { return ApiHostsDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *HostsAPIService) HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsDelete") @@ -515,10 +514,10 @@ func (a *HostsAPIService) HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Res } type ApiHostsDisconnectRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string - body *InfraDisconnectRequest + id string + body *InfraDisconnectRequest } func (r ApiHostsDisconnectRequest) Body(body InfraDisconnectRequest) ApiHostsDisconnectRequest { @@ -535,27 +534,26 @@ HostsDisconnect Disconnect a Host by resource ID. The user can disconnect the host from the cloud (for example, if in case a host is compromised). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDisconnectRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDisconnectRequest */ func (a *HostsAPIService) HostsDisconnect(ctx context.Context, id string) ApiHostsDisconnectRequest { return ApiHostsDisconnectRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsDisconnect") @@ -590,8 +588,8 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -637,49 +635,49 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m } type ApiHostsListRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHostsListRequest) Filter(filter string) ApiHostsListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHostsListRequest) OrderBy(orderBy string) ApiHostsListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHostsListRequest) Offset(offset int32) ApiHostsListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHostsListRequest) Limit(limit int32) ApiHostsListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHostsListRequest) PageToken(pageToken string) ApiHostsListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostsListRequest) Fields(fields string) ApiHostsListRequest { r.fields = &fields return r @@ -704,25 +702,24 @@ func (r ApiHostsListRequest) Execute() (*InfraListHostResponse, *http.Response, /* HostsList List all the Host resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsListRequest */ func (a *HostsAPIService) HostsList(ctx context.Context) ApiHostsListRequest { return ApiHostsListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraListHostResponse +// @return InfraListHostResponse func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsList") @@ -822,9 +819,9 @@ func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHos } type ApiHostsReadRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string + id string } func (r ApiHostsReadRequest) Execute() (*InfraGetHostResponse, *http.Response, error) { @@ -837,27 +834,26 @@ HostsRead Get a Host resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ func (a *HostsAPIService) HostsRead(ctx context.Context, id string) ApiHostsReadRequest { return ApiHostsReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return InfraGetHostResponse +// @return InfraGetHostResponse func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraGetHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraGetHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsRead") @@ -934,11 +930,11 @@ func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHost } type ApiHostsReplaceRequest struct { - ctx context.Context - ApiService HostsAPI + ctx context.Context + ApiService HostsAPI fromResourceId string - toResourceId string - body *InfraReplaceHostRequest + toResourceId string + body *InfraReplaceHostRequest } func (r ApiHostsReplaceRequest) Body(body InfraReplaceHostRequest) ApiHostsReplaceRequest { @@ -953,29 +949,28 @@ func (r ApiHostsReplaceRequest) Execute() (map[string]interface{}, *http.Respons /* HostsReplace Migrate a Host's configuration from one to another. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fromResourceId An application specific resource identity of a resource - @param toResourceId An application specific resource identity of a resource - @return ApiHostsReplaceRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fromResourceId An application specific resource identity of a resource + @param toResourceId An application specific resource identity of a resource + @return ApiHostsReplaceRequest */ func (a *HostsAPIService) HostsReplace(ctx context.Context, fromResourceId string, toResourceId string) ApiHostsReplaceRequest { return ApiHostsReplaceRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, fromResourceId: fromResourceId, - toResourceId: toResourceId, + toResourceId: toResourceId, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsReplace") @@ -1011,8 +1006,8 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -1058,9 +1053,9 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str } type ApiHostsUnassignTagsRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - body *InfraUnassignTagsRequest + body *InfraUnassignTagsRequest } func (r ApiHostsUnassignTagsRequest) Body(body InfraUnassignTagsRequest) ApiHostsUnassignTagsRequest { @@ -1079,25 +1074,24 @@ Validation: - "ids" is required. - "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ func (a *HostsAPIService) HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest { return ApiHostsUnassignTagsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsUnassignTags") @@ -1131,8 +1125,8 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -1178,10 +1172,10 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest } type ApiHostsUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string - body *InfraHost + id string + body *InfraHost } func (r ApiHostsUpdateRequest) Body(body InfraHost) ApiHostsUpdateRequest { @@ -1201,27 +1195,26 @@ Validation: - "display_name" is required and should be unique. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ func (a *HostsAPIService) HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest { return ApiHostsUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return InfraUpdateHostResponse +// @return InfraUpdateHostResponse func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpdateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraUpdateHostResponse + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraUpdateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsUpdate") @@ -1256,16 +1249,16 @@ func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpd if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_mgmt/api_services.go b/infra_mgmt/api_services.go index 0de1c2d..90e0b0b 100644 --- a/infra_mgmt/api_services.go +++ b/infra_mgmt/api_services.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -18,17 +18,18 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ServicesAPI interface { /* - ServicesApplications List applications (Service types) for a particular account. + ServicesApplications List applications (Service types) for a particular account. - Used in order to retrieve available applications (Service types) for a particular account. + Used in order to retrieve available applications (Service types) for a particular account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesApplicationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesApplicationsRequest */ ServicesApplications(ctx context.Context) ApiServicesApplicationsRequest @@ -36,15 +37,15 @@ type ServicesAPI interface { // @return InfraApplicationsResponse ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) /* - ServicesCreate Create a Service resource. + ServicesCreate Create a Service resource. - Validation: - - "name" is required and should be unique. - - "service_type" is required. - - "pool_id" is required. + Validation: +- "name" is required and should be unique. +- "service_type" is required. +- "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ ServicesCreate(ctx context.Context) ApiServicesCreateRequest @@ -52,24 +53,24 @@ type ServicesAPI interface { // @return InfraCreateServiceResponse ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) /* - ServicesDelete Delete a Service resource. + ServicesDelete Delete a Service resource. - Validation: - - "id" is required. + Validation: +- "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest // ServicesDeleteExecute executes the request ServicesDeleteExecute(r ApiServicesDeleteRequest) (*http.Response, error) /* - ServicesList List all the Service resources for an account. + ServicesList List all the Service resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesListRequest */ ServicesList(ctx context.Context) ApiServicesListRequest @@ -77,14 +78,14 @@ type ServicesAPI interface { // @return InfraListServiceResponse ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) /* - ServicesRead Read a Service resource. + ServicesRead Read a Service resource. - Validation: - - "id" is required. + Validation: +- "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ ServicesRead(ctx context.Context, id string) ApiServicesReadRequest @@ -92,17 +93,17 @@ type ServicesAPI interface { // @return InfraGetServiceResponse ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) /* - ServicesUpdate Update a Service resource. + ServicesUpdate Update a Service resource. - Validation: - - "id" is required. - - "name" is required and should be unique. - - "service_type" is required. - - "pool_id" is required. + Validation: +- "id" is required. +- "name" is required and should be unique. +- "service_type" is required. +- "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest @@ -115,9 +116,9 @@ type ServicesAPI interface { type ServicesAPIService internal.Service type ApiServicesApplicationsRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - accountId *string + accountId *string } // Account ID. @@ -135,25 +136,24 @@ ServicesApplications List applications (Service types) for a particular account. Used in order to retrieve available applications (Service types) for a particular account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesApplicationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesApplicationsRequest */ func (a *ServicesAPIService) ServicesApplications(ctx context.Context) ApiServicesApplicationsRequest { return ApiServicesApplicationsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraApplicationsResponse +// @return InfraApplicationsResponse func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraApplicationsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraApplicationsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesApplications") @@ -232,9 +232,9 @@ func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicatio } type ApiServicesCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - body *InfraService + body *InfraService } func (r ApiServicesCreateRequest) Body(body InfraService) ApiServicesCreateRequest { @@ -254,25 +254,24 @@ Validation: - "service_type" is required. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ func (a *ServicesAPIService) ServicesCreate(ctx context.Context) ApiServicesCreateRequest { return ApiServicesCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraCreateServiceResponse +// @return InfraCreateServiceResponse func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraCreateServiceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraCreateServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesCreate") @@ -306,16 +305,16 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -361,9 +360,9 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( } type ApiServicesDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - id string + id string } func (r ApiServicesDeleteRequest) Execute() (*http.Response, error) { @@ -376,24 +375,24 @@ ServicesDelete Delete a Service resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ func (a *ServicesAPIService) ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest { return ApiServicesDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ServicesAPIService) ServicesDeleteExecute(r ApiServicesDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesDelete") @@ -465,49 +464,49 @@ func (a *ServicesAPIService) ServicesDeleteExecute(r ApiServicesDeleteRequest) ( } type ApiServicesListRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServicesListRequest) Filter(filter string) ApiServicesListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServicesListRequest) OrderBy(orderBy string) ApiServicesListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServicesListRequest) Offset(offset int32) ApiServicesListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServicesListRequest) Limit(limit int32) ApiServicesListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServicesListRequest) PageToken(pageToken string) ApiServicesListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServicesListRequest) Fields(fields string) ApiServicesListRequest { r.fields = &fields return r @@ -532,25 +531,24 @@ func (r ApiServicesListRequest) Execute() (*InfraListServiceResponse, *http.Resp /* ServicesList List all the Service resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesListRequest */ func (a *ServicesAPIService) ServicesList(ctx context.Context) ApiServicesListRequest { return ApiServicesListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return InfraListServiceResponse +// @return InfraListServiceResponse func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListServiceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesList") @@ -650,9 +648,9 @@ func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*Inf } type ApiServicesReadRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - id string + id string } func (r ApiServicesReadRequest) Execute() (*InfraGetServiceResponse, *http.Response, error) { @@ -665,27 +663,26 @@ ServicesRead Read a Service resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ func (a *ServicesAPIService) ServicesRead(ctx context.Context, id string) ApiServicesReadRequest { return ApiServicesReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return InfraGetServiceResponse +// @return InfraGetServiceResponse func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraGetServiceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraGetServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesRead") @@ -762,10 +759,10 @@ func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*Inf } type ApiServicesUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - id string - body *InfraService + id string + body *InfraService } func (r ApiServicesUpdateRequest) Body(body InfraService) ApiServicesUpdateRequest { @@ -786,27 +783,26 @@ Validation: - "service_type" is required. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ func (a *ServicesAPIService) ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest { return ApiServicesUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return InfraUpdateServiceResponse +// @return InfraUpdateServiceResponse func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) (*InfraUpdateServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraUpdateServiceResponse + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraUpdateServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesUpdate") @@ -841,16 +837,16 @@ func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_mgmt/client.go b/infra_mgmt/client.go index 5f9de49..8b6562e 100644 --- a/infra_mgmt/client.go +++ b/infra_mgmt/client.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package infra_mgmt import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/infra/v1" @@ -19,11 +19,11 @@ var ServiceBasePath = "/api/infra/v1" // APIClient manages communication with the Infrastructure Management API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - DetailAPI DetailAPI - HostsAPI HostsAPI + DetailAPI DetailAPI + HostsAPI HostsAPI ServicesAPI ServicesAPI } @@ -31,7 +31,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.DetailAPI = (*DetailAPIService)(&c.Common) diff --git a/infra_mgmt/docs/DetailAPI.md b/infra_mgmt/docs/DetailAPI.md index a21feb9..bcba07e 100644 --- a/infra_mgmt/docs/DetailAPI.md +++ b/infra_mgmt/docs/DetailAPI.md @@ -21,31 +21,31 @@ List all the Hosts along with its associated Services (applications). package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DetailAPI.DetailHostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailHostsList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DetailHostsList`: InfraListDetailHostsResponse - fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailHostsList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DetailAPI.DetailHostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailHostsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailHostsList`: InfraListDetailHostsResponse + fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailHostsList`: %v\n", resp) } ``` @@ -99,31 +99,31 @@ List all the Services (applications) along with its associated Hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DetailAPI.DetailServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailServicesList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DetailServicesList`: InfraListDetailServicesResponse - fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailServicesList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DetailAPI.DetailServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailServicesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailServicesList`: InfraListDetailServicesResponse + fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailServicesList`: %v\n", resp) } ``` diff --git a/infra_mgmt/docs/HostsAPI.md b/infra_mgmt/docs/HostsAPI.md index 8dfb38b..a838200 100644 --- a/infra_mgmt/docs/HostsAPI.md +++ b/infra_mgmt/docs/HostsAPI.md @@ -30,24 +30,24 @@ Assign tags for list of hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraAssignTagsRequest() // InfraAssignTagsRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsAssignTags(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsAssignTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsAssignTags`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsAssignTags`: %v\n", resp) + body := *openapiclient.NewInfraAssignTagsRequest() // InfraAssignTagsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsAssignTags(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsAssignTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsAssignTags`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsAssignTags`: %v\n", resp) } ``` @@ -96,24 +96,24 @@ Create a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsCreate`: InfraCreateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsCreate`: %v\n", resp) + body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsCreate`: InfraCreateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsCreate`: %v\n", resp) } ``` @@ -162,22 +162,22 @@ Delete a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.HostsAPI.HostsDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.HostsAPI.HostsDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -230,25 +230,25 @@ Disconnect a Host by resource ID. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraDisconnectRequest() // InfraDisconnectRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsDisconnect(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDisconnect``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsDisconnect`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsDisconnect`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraDisconnectRequest() // InfraDisconnectRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsDisconnect(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDisconnect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsDisconnect`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsDisconnect`: %v\n", resp) } ``` @@ -300,31 +300,31 @@ List all the Host resources for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsList`: InfraListHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsList`: InfraListHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsList`: %v\n", resp) } ``` @@ -380,24 +380,24 @@ Get a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsRead(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsRead`: InfraGetHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsRead`: InfraGetHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsRead`: %v\n", resp) } ``` @@ -448,26 +448,26 @@ Migrate a Host's configuration from one to another. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fromResourceId := "fromResourceId_example" // string | An application specific resource identity of a resource - toResourceId := "toResourceId_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraReplaceHostRequest() // InfraReplaceHostRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsReplace(context.Background(), fromResourceId, toResourceId).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsReplace``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsReplace`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsReplace`: %v\n", resp) + fromResourceId := "fromResourceId_example" // string | An application specific resource identity of a resource + toResourceId := "toResourceId_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraReplaceHostRequest() // InfraReplaceHostRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsReplace(context.Background(), fromResourceId, toResourceId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsReplace``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsReplace`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsReplace`: %v\n", resp) } ``` @@ -523,24 +523,24 @@ Unassign tag for the list hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraUnassignTagsRequest() // InfraUnassignTagsRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsUnassignTags(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUnassignTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsUnassignTags`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUnassignTags`: %v\n", resp) + body := *openapiclient.NewInfraUnassignTagsRequest() // InfraUnassignTagsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsUnassignTags(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUnassignTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsUnassignTags`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUnassignTags`: %v\n", resp) } ``` @@ -589,25 +589,25 @@ Update a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsUpdate`: InfraUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsUpdate`: InfraUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUpdate`: %v\n", resp) } ``` diff --git a/infra_mgmt/docs/ServicesAPI.md b/infra_mgmt/docs/ServicesAPI.md index 34fbbc9..a8d1020 100644 --- a/infra_mgmt/docs/ServicesAPI.md +++ b/infra_mgmt/docs/ServicesAPI.md @@ -27,24 +27,24 @@ List applications (Service types) for a particular account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - accountId := "accountId_example" // string | Account ID. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesApplications(context.Background()).AccountId(accountId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesApplications``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesApplications`: InfraApplicationsResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesApplications`: %v\n", resp) + accountId := "accountId_example" // string | Account ID. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesApplications(context.Background()).AccountId(accountId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesApplications``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesApplications`: InfraApplicationsResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesApplications`: %v\n", resp) } ``` @@ -93,24 +93,24 @@ Create a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesCreate`: InfraCreateServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesCreate`: %v\n", resp) + body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesCreate`: InfraCreateServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesCreate`: %v\n", resp) } ``` @@ -159,22 +159,22 @@ Delete a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServicesAPI.ServicesDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServicesAPI.ServicesDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -225,31 +225,31 @@ List all the Service resources for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesList`: InfraListServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesList`: InfraListServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesList`: %v\n", resp) } ``` @@ -305,24 +305,24 @@ Read a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesRead(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesRead`: InfraGetServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesRead`: InfraGetServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesRead`: %v\n", resp) } ``` @@ -375,25 +375,25 @@ Update a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesUpdate`: InfraUpdateServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesUpdate`: InfraUpdateServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesUpdate`: %v\n", resp) } ``` diff --git a/infra_mgmt/model_api_page_info.go b/infra_mgmt/model_api_page_info.go index b038f4a..8c12daf 100644 --- a/infra_mgmt/model_api_page_info.go +++ b/infra_mgmt/model_api_page_info.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -141,7 +141,7 @@ func (o *ApiPageInfo) SetSize(v int32) { } func (o ApiPageInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableApiPageInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_applications.go b/infra_mgmt/model_infra_applications.go index fb39675..48c7086 100644 --- a/infra_mgmt/model_infra_applications.go +++ b/infra_mgmt/model_infra_applications.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraApplications) SetApplications(v []string) { } func (o InfraApplications) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraApplications) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_applications_response.go b/infra_mgmt/model_infra_applications_response.go index 9dd9f32..302b407 100644 --- a/infra_mgmt/model_infra_applications_response.go +++ b/infra_mgmt/model_infra_applications_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraApplicationsResponse) SetResults(v InfraApplications) { } func (o InfraApplicationsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraApplicationsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_assign_tags_request.go b/infra_mgmt/model_infra_assign_tags_request.go index ee77638..2f3a060 100644 --- a/infra_mgmt/model_infra_assign_tags_request.go +++ b/infra_mgmt/model_infra_assign_tags_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -20,9 +20,9 @@ var _ MappedNullable = &InfraAssignTagsRequest{} // InfraAssignTagsRequest struct for InfraAssignTagsRequest type InfraAssignTagsRequest struct { // The resource identifier. - Ids []string `json:"ids,omitempty"` - Override *bool `json:"override,omitempty"` - Tags map[string]interface{} `json:"tags,omitempty"` + Ids []string `json:"ids,omitempty"` + Override *bool `json:"override,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` } // NewInfraAssignTagsRequest instantiates a new InfraAssignTagsRequest object @@ -139,7 +139,7 @@ func (o *InfraAssignTagsRequest) SetTags(v map[string]interface{}) { } func (o InfraAssignTagsRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -195,3 +195,5 @@ func (v *NullableInfraAssignTagsRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_create_host_response.go b/infra_mgmt/model_infra_create_host_response.go index aae5b74..bb51565 100644 --- a/infra_mgmt/model_infra_create_host_response.go +++ b/infra_mgmt/model_infra_create_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraCreateHostResponse) SetResult(v InfraHost) { } func (o InfraCreateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraCreateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_create_service_response.go b/infra_mgmt/model_infra_create_service_response.go index 5d12e15..0da0945 100644 --- a/infra_mgmt/model_infra_create_service_response.go +++ b/infra_mgmt/model_infra_create_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraCreateServiceResponse) SetResult(v InfraService) { } func (o InfraCreateServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraCreateServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_detail_host.go b/infra_mgmt/model_infra_detail_host.go index 23c91b7..f39d0e5 100644 --- a/infra_mgmt/model_infra_detail_host.go +++ b/infra_mgmt/model_infra_detail_host.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -23,8 +23,8 @@ type InfraDetailHost struct { // Composite Status of this Host (`online`, `degraded`, `error`, `offline`, `pending`, `awaiting approval`). CompositeStatus *string `json:"composite_status,omitempty"` // The list of Host-specific configurations for each Service deployed on this Host. - Configs []InfraDetailHostServiceConfig `json:"configs,omitempty"` - ConnectivityMonitor map[string]interface{} `json:"connectivity_monitor,omitempty"` + Configs []InfraDetailHostServiceConfig `json:"configs,omitempty"` + ConnectivityMonitor map[string]interface{} `json:"connectivity_monitor,omitempty"` // The timestamp of creation of Host. CreatedAt *time.Time `json:"created_at,omitempty"` // The description of the Host. @@ -33,7 +33,7 @@ type InfraDetailHost struct { DisplayName *string `json:"display_name,omitempty"` // The sub-type of a specific Host type. Example: For Host type BloxOne Appliance, sub-type could be \"B105\" or \"VEP1425\" HostSubtype *string `json:"host_subtype,omitempty"` - HostType *string `json:"host_type,omitempty"` + HostType *string `json:"host_type,omitempty"` // The version of the Host platform services. HostVersion *string `json:"host_version,omitempty"` // The resource identifier. @@ -43,16 +43,16 @@ type InfraDetailHost struct { // The IP Space of the Host. IpSpace *string `json:"ip_space,omitempty"` // The legacy Host object identifier. - LegacyId *string `json:"legacy_id,omitempty"` + LegacyId *string `json:"legacy_id,omitempty"` Location *InfraDetailLocation `json:"location,omitempty"` // The MAC address of the Host. - MacAddress *string `json:"mac_address,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` MaintenanceMode *string `json:"maintenance_mode,omitempty"` // The NAT IP address of the Host. NatIp *string `json:"nat_ip,omitempty"` // The unique On-Prem Host ID generated by the On-Prem device and assigned to the Host once it is registered and logged into the Infoblox Cloud. - Ophid *string `json:"ophid,omitempty"` - Pool *InfraPoolInfo `json:"pool,omitempty"` + Ophid *string `json:"ophid,omitempty"` + Pool *InfraPoolInfo `json:"pool,omitempty"` // The unique serial number of the Host. SerialNumber *string `json:"serial_number,omitempty"` // The list of Services deployed on this Host. @@ -885,7 +885,7 @@ func (o *InfraDetailHost) SetUpdatedAt(v time.Time) { } func (o InfraDetailHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1007,3 +1007,5 @@ func (v *NullableInfraDetailHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_detail_host_service_config.go b/infra_mgmt/model_infra_detail_host_service_config.go index a6ad087..f8f038b 100644 --- a/infra_mgmt/model_infra_detail_host_service_config.go +++ b/infra_mgmt/model_infra_detail_host_service_config.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -27,8 +27,8 @@ type InfraDetailHostServiceConfig struct { // The name of the Service. ServiceName *string `json:"service_name,omitempty"` // The type of the Service deployed on the Host (`dns`, `cdc`, etc.). - ServiceType *string `json:"service_type,omitempty"` - Status *InfraShortServiceStatus `json:"status,omitempty"` + ServiceType *string `json:"service_type,omitempty"` + Status *InfraShortServiceStatus `json:"status,omitempty"` // The timestamp of the latest upgrade of the Host-specific Service configuration. UpgradedAt *time.Time `json:"upgraded_at,omitempty"` } @@ -243,7 +243,7 @@ func (o *InfraDetailHostServiceConfig) SetUpgradedAt(v time.Time) { } func (o InfraDetailHostServiceConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,3 +308,5 @@ func (v *NullableInfraDetailHostServiceConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_detail_location.go b/infra_mgmt/model_infra_detail_location.go index 91dbcea..083ff6a 100644 --- a/infra_mgmt/model_infra_detail_location.go +++ b/infra_mgmt/model_infra_detail_location.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -209,7 +209,7 @@ func (o *InfraDetailLocation) SetMetadata(v map[string]interface{}) { } func (o InfraDetailLocation) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -271,3 +271,5 @@ func (v *NullableInfraDetailLocation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_detail_service.go b/infra_mgmt/model_infra_detail_service.go index 95bdf23..6f020d5 100644 --- a/infra_mgmt/model_infra_detail_service.go +++ b/infra_mgmt/model_infra_detail_service.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -39,10 +39,10 @@ type InfraDetailService struct { // The resource identifier. Id *string `json:"id,omitempty"` // List of interfaces on which this Service can operate. - InterfaceLabels []string `json:"interface_labels,omitempty"` - Location *InfraDetailLocation `json:"location,omitempty"` + InterfaceLabels []string `json:"interface_labels,omitempty"` + Location *InfraDetailLocation `json:"location,omitempty"` // The name of the Service. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` Pool *InfraPoolInfo `json:"pool,omitempty"` // The type of the Service deployed on the Host (`dns`, `cdc`, etc.). ServiceType *string `json:"service_type,omitempty"` @@ -582,7 +582,7 @@ func (o *InfraDetailService) SetUpdatedAt(v time.Time) { } func (o InfraDetailService) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -677,3 +677,5 @@ func (v *NullableInfraDetailService) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_detail_service_host.go b/infra_mgmt/model_infra_detail_service_host.go index 8edd987..067ef4b 100644 --- a/infra_mgmt/model_infra_detail_service_host.go +++ b/infra_mgmt/model_infra_detail_service_host.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -20,8 +20,8 @@ var _ MappedNullable = &InfraDetailServiceHost{} // InfraDetailServiceHost struct for InfraDetailServiceHost type InfraDetailServiceHost struct { // Composite Status of the Host (`online`, `degraded`, `error`, `offline`, `pending`, `awaiting approval`). - CompositeStatus *string `json:"composite_status,omitempty"` - Config *InfraDetailServiceHostConfig `json:"config,omitempty"` + CompositeStatus *string `json:"composite_status,omitempty"` + Config *InfraDetailServiceHostConfig `json:"config,omitempty"` // The name of the Host (unique). DisplayName *string `json:"display_name,omitempty"` // The resource identifier. @@ -29,7 +29,7 @@ type InfraDetailServiceHost struct { // The IP address of the Host. IpAddress *string `json:"ip_address,omitempty"` // The legacy Host object identifier. - LegacyId *string `json:"legacy_id,omitempty"` + LegacyId *string `json:"legacy_id,omitempty"` MaintenanceMode *string `json:"maintenance_mode,omitempty"` // The unique On-Prem Host ID generated by the On-Prem device and assigned to the Host once it is registered and logged into the Infoblox Cloud. Ophid *string `json:"ophid,omitempty"` @@ -309,7 +309,7 @@ func (o *InfraDetailServiceHost) SetOphid(v string) { } func (o InfraDetailServiceHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -380,3 +380,5 @@ func (v *NullableInfraDetailServiceHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_detail_service_host_config.go b/infra_mgmt/model_infra_detail_service_host_config.go index 45212f5..1a6089f 100644 --- a/infra_mgmt/model_infra_detail_service_host_config.go +++ b/infra_mgmt/model_infra_detail_service_host_config.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -21,9 +21,9 @@ var _ MappedNullable = &InfraDetailServiceHostConfig{} // InfraDetailServiceHostConfig struct for InfraDetailServiceHostConfig type InfraDetailServiceHostConfig struct { // The current version of the Service deployed on the Host. - CurrentVersion *string `json:"current_version,omitempty"` - Status *InfraShortServiceStatus `json:"status,omitempty"` - UpgradedAt *time.Time `json:"upgraded_at,omitempty"` + CurrentVersion *string `json:"current_version,omitempty"` + Status *InfraShortServiceStatus `json:"status,omitempty"` + UpgradedAt *time.Time `json:"upgraded_at,omitempty"` } // NewInfraDetailServiceHostConfig instantiates a new InfraDetailServiceHostConfig object @@ -140,7 +140,7 @@ func (o *InfraDetailServiceHostConfig) SetUpgradedAt(v time.Time) { } func (o InfraDetailServiceHostConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,3 +196,5 @@ func (v *NullableInfraDetailServiceHostConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_disconnect_request.go b/infra_mgmt/model_infra_disconnect_request.go index 17e96df..ba267fa 100644 --- a/infra_mgmt/model_infra_disconnect_request.go +++ b/infra_mgmt/model_infra_disconnect_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -73,7 +73,7 @@ func (o *InfraDisconnectRequest) SetId(v string) { } func (o InfraDisconnectRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableInfraDisconnectRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_get_host_response.go b/infra_mgmt/model_infra_get_host_response.go index 82afb21..59d2ef4 100644 --- a/infra_mgmt/model_infra_get_host_response.go +++ b/infra_mgmt/model_infra_get_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraGetHostResponse) SetResult(v InfraHost) { } func (o InfraGetHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraGetHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_get_service_response.go b/infra_mgmt/model_infra_get_service_response.go index 9b40323..7eab350 100644 --- a/infra_mgmt/model_infra_get_service_response.go +++ b/infra_mgmt/model_infra_get_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraGetServiceResponse) SetResult(v InfraService) { } func (o InfraGetServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraGetServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_host.go b/infra_mgmt/model_infra_host.go index 511d8d7..4987fdc 100644 --- a/infra_mgmt/model_infra_host.go +++ b/infra_mgmt/model_infra_host.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -13,6 +13,8 @@ package infra_mgmt import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the InfraHost type satisfies the MappedNullable interface at compile time @@ -49,7 +51,7 @@ type InfraHost struct { // The resource identifier. LocationId *string `json:"location_id,omitempty"` // The MAC address of the Host. - MacAddress *string `json:"mac_address,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` MaintenanceMode *string `json:"maintenance_mode,omitempty"` // The NAT IP address of the Host. NatIp *string `json:"nat_ip,omitempty"` @@ -69,6 +71,8 @@ type InfraHost struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _InfraHost InfraHost + // NewInfraHost instantiates a new InfraHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -848,7 +852,7 @@ func (o *InfraHost) SetUpdatedAt(v time.Time) { } func (o InfraHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -930,6 +934,43 @@ func (o InfraHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *InfraHost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "display_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInfraHost := _InfraHost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInfraHost) + + if err != nil { + return err + } + + *o = InfraHost(varInfraHost) + + return err +} + type NullableInfraHost struct { value *InfraHost isSet bool @@ -965,3 +1006,5 @@ func (v *NullableInfraHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_list_detail_hosts_response.go b/infra_mgmt/model_infra_list_detail_hosts_response.go index 02a3af8..c02d914 100644 --- a/infra_mgmt/model_infra_list_detail_hosts_response.go +++ b/infra_mgmt/model_infra_list_detail_hosts_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,7 +19,7 @@ var _ MappedNullable = &InfraListDetailHostsResponse{} // InfraListDetailHostsResponse struct for InfraListDetailHostsResponse type InfraListDetailHostsResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []InfraDetailHost `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *InfraListDetailHostsResponse) SetResults(v []InfraDetailHost) { } func (o InfraListDetailHostsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableInfraListDetailHostsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_list_detail_services_response.go b/infra_mgmt/model_infra_list_detail_services_response.go index 47a1b49..8d5052a 100644 --- a/infra_mgmt/model_infra_list_detail_services_response.go +++ b/infra_mgmt/model_infra_list_detail_services_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,7 +19,7 @@ var _ MappedNullable = &InfraListDetailServicesResponse{} // InfraListDetailServicesResponse struct for InfraListDetailServicesResponse type InfraListDetailServicesResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []InfraDetailService `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *InfraListDetailServicesResponse) SetResults(v []InfraDetailService) { } func (o InfraListDetailServicesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableInfraListDetailServicesResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_list_host_response.go b/infra_mgmt/model_infra_list_host_response.go index c7d23c3..b33f8ba 100644 --- a/infra_mgmt/model_infra_list_host_response.go +++ b/infra_mgmt/model_infra_list_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,8 +19,8 @@ var _ MappedNullable = &InfraListHostResponse{} // InfraListHostResponse struct for InfraListHostResponse type InfraListHostResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` - Results []InfraHost `json:"results,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` + Results []InfraHost `json:"results,omitempty"` } // NewInfraListHostResponse instantiates a new InfraListHostResponse object @@ -105,7 +105,7 @@ func (o *InfraListHostResponse) SetResults(v []InfraHost) { } func (o InfraListHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableInfraListHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_list_service_response.go b/infra_mgmt/model_infra_list_service_response.go index 5368ffb..cd671e5 100644 --- a/infra_mgmt/model_infra_list_service_response.go +++ b/infra_mgmt/model_infra_list_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,7 +19,7 @@ var _ MappedNullable = &InfraListServiceResponse{} // InfraListServiceResponse struct for InfraListServiceResponse type InfraListServiceResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []InfraService `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *InfraListServiceResponse) SetResults(v []InfraService) { } func (o InfraListServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableInfraListServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_pool_info.go b/infra_mgmt/model_infra_pool_info.go index f0d1c12..7b5158e 100644 --- a/infra_mgmt/model_infra_pool_info.go +++ b/infra_mgmt/model_infra_pool_info.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -141,7 +141,7 @@ func (o *InfraPoolInfo) SetPoolName(v string) { } func (o InfraPoolInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableInfraPoolInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_replace_host_request.go b/infra_mgmt/model_infra_replace_host_request.go index 14fd61a..9d3a6da 100644 --- a/infra_mgmt/model_infra_replace_host_request.go +++ b/infra_mgmt/model_infra_replace_host_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -107,7 +107,7 @@ func (o *InfraReplaceHostRequest) SetTo(v string) { } func (o InfraReplaceHostRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableInfraReplaceHostRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_service.go b/infra_mgmt/model_infra_service.go index 2ae3169..5b0c180 100644 --- a/infra_mgmt/model_infra_service.go +++ b/infra_mgmt/model_infra_service.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -13,6 +13,8 @@ package infra_mgmt import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the InfraService type satisfies the MappedNullable interface at compile time @@ -46,6 +48,8 @@ type InfraService struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _InfraService InfraService + // NewInfraService instantiates a new InfraService object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -427,7 +431,7 @@ func (o *InfraService) SetUpdatedAt(v time.Time) { } func (o InfraService) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -469,6 +473,45 @@ func (o InfraService) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *InfraService) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pool_id", + "service_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInfraService := _InfraService{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInfraService) + + if err != nil { + return err + } + + *o = InfraService(varInfraService) + + return err +} + type NullableInfraService struct { value *InfraService isSet bool @@ -504,3 +547,5 @@ func (v *NullableInfraService) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_service_host_config.go b/infra_mgmt/model_infra_service_host_config.go index 7478916..b183662 100644 --- a/infra_mgmt/model_infra_service_host_config.go +++ b/infra_mgmt/model_infra_service_host_config.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -278,7 +278,7 @@ func (o *InfraServiceHostConfig) SetUpgradedAt(v time.Time) { } func (o InfraServiceHostConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -346,3 +346,5 @@ func (v *NullableInfraServiceHostConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_short_service_status.go b/infra_mgmt/model_infra_short_service_status.go index 058694e..cba90c9 100644 --- a/infra_mgmt/model_infra_short_service_status.go +++ b/infra_mgmt/model_infra_short_service_status.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -142,7 +142,7 @@ func (o *InfraShortServiceStatus) SetUpdatedAt(v time.Time) { } func (o InfraShortServiceStatus) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -198,3 +198,5 @@ func (v *NullableInfraShortServiceStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_unassign_tags_request.go b/infra_mgmt/model_infra_unassign_tags_request.go index 06d4f97..441a032 100644 --- a/infra_mgmt/model_infra_unassign_tags_request.go +++ b/infra_mgmt/model_infra_unassign_tags_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -20,7 +20,7 @@ var _ MappedNullable = &InfraUnassignTagsRequest{} // InfraUnassignTagsRequest struct for InfraUnassignTagsRequest type InfraUnassignTagsRequest struct { // The resource identifier. - Ids []string `json:"ids,omitempty"` + Ids []string `json:"ids,omitempty"` Keys []string `json:"keys,omitempty"` } @@ -106,7 +106,7 @@ func (o *InfraUnassignTagsRequest) SetKeys(v []string) { } func (o InfraUnassignTagsRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,3 +159,5 @@ func (v *NullableInfraUnassignTagsRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_update_host_response.go b/infra_mgmt/model_infra_update_host_response.go index c672f41..9098325 100644 --- a/infra_mgmt/model_infra_update_host_response.go +++ b/infra_mgmt/model_infra_update_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraUpdateHostResponse) SetResult(v InfraHost) { } func (o InfraUpdateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraUpdateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/model_infra_update_service_response.go b/infra_mgmt/model_infra_update_service_response.go index 8022ecb..7d5bfe2 100644 --- a/infra_mgmt/model_infra_update_service_response.go +++ b/infra_mgmt/model_infra_update_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraUpdateServiceResponse) SetResult(v InfraService) { } func (o InfraUpdateServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableInfraUpdateServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_mgmt/utils.go b/infra_mgmt/utils.go index 582297a..d25ee9d 100644 --- a/infra_mgmt/utils.go +++ b/infra_mgmt/utils.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/infra_provision/.openapi-generator/VERSION b/infra_provision/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/infra_provision/.openapi-generator/VERSION +++ b/infra_provision/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/infra_provision/README.md b/infra_provision/README.md index 725d160..11598b5 100644 --- a/infra_provision/README.md +++ b/infra_provision/README.md @@ -13,20 +13,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import infra_provision "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -36,17 +36,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `infra_provision.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), infra_provision.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `infra_provision.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), infra_provision.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -58,9 +58,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `infra_provision.ContextOperationServerIndices` and `infra_provision.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), infra_provision.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -124,11 +124,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + infra_provision.ContextAPIKeys, + map[string]infra_provision.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/infra_provision/api_ui_join_token.go b/infra_provision/api_ui_join_token.go index 7b25b49..756686a 100644 --- a/infra_provision/api_ui_join_token.go +++ b/infra_provision/api_ui_join_token.go @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type UIJoinTokenAPI interface { /* - UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. + UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. - Validation: - - "name" is required and should be unique. - - "description" is optioanl. + Validation: +- "name" is required and should be unique. +- "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest @@ -38,33 +39,33 @@ type UIJoinTokenAPI interface { // @return HostactivationCreateJoinTokenResponse UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) /* - UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. + UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenDeleteRequest */ UIJoinTokenDelete(ctx context.Context, id string) ApiUIJoinTokenDeleteRequest // UIJoinTokenDeleteExecute executes the request UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteRequest) (*http.Response, error) /* - UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. + UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenDeleteSetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenDeleteSetRequest */ UIJoinTokenDeleteSet(ctx context.Context) ApiUIJoinTokenDeleteSetRequest // UIJoinTokenDeleteSetExecute executes the request UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDeleteSetRequest) (*http.Response, error) /* - UIJoinTokenList User can list the join tokens for an account. + UIJoinTokenList User can list the join tokens for an account. - Both active and revoked join tokens are listed by default. + Both active and revoked join tokens are listed by default. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenListRequest */ UIJoinTokenList(ctx context.Context) ApiUIJoinTokenListRequest @@ -72,11 +73,11 @@ type UIJoinTokenAPI interface { // @return HostactivationListJoinTokenResponse UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) /* - UIJoinTokenRead User can get the join token providing its resource id in the parameter. + UIJoinTokenRead User can get the join token providing its resource id in the parameter. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenReadRequest */ UIJoinTokenRead(ctx context.Context, id string) ApiUIJoinTokenReadRequest @@ -84,15 +85,15 @@ type UIJoinTokenAPI interface { // @return HostactivationReadJoinTokenResponse UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) /* - UIJoinTokenUpdate User can modify the tags or expiration time of a join token. + UIJoinTokenUpdate User can modify the tags or expiration time of a join token. - Validation: Following fields is needed. Provide what needs to be - - "expires_at" - - "tags" + Validation: Following fields is needed. Provide what needs to be +- "expires_at" +- "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest @@ -105,9 +106,9 @@ type UIJoinTokenAPI interface { type UIJoinTokenAPIService internal.Service type ApiUIJoinTokenCreateRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - body *HostactivationJoinToken + body *HostactivationJoinToken } func (r ApiUIJoinTokenCreateRequest) Body(body HostactivationJoinToken) ApiUIJoinTokenCreateRequest { @@ -126,25 +127,24 @@ Validation: - "name" is required and should be unique. - "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest { return ApiUIJoinTokenCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return HostactivationCreateJoinTokenResponse +// @return HostactivationCreateJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationCreateJoinTokenResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationCreateJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenCreate") @@ -178,16 +178,16 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -233,9 +233,9 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR } type ApiUIJoinTokenDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - id string + id string } func (r ApiUIJoinTokenDeleteRequest) Execute() (*http.Response, error) { @@ -245,24 +245,24 @@ func (r ApiUIJoinTokenDeleteRequest) Execute() (*http.Response, error) { /* UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenDeleteRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenDelete(ctx context.Context, id string) ApiUIJoinTokenDeleteRequest { return ApiUIJoinTokenDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *UIJoinTokenAPIService) UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenDelete") @@ -334,9 +334,9 @@ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteR } type ApiUIJoinTokenDeleteSetRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - body *HostactivationDeleteJoinTokensRequest + body *HostactivationDeleteJoinTokensRequest } func (r ApiUIJoinTokenDeleteSetRequest) Body(body HostactivationDeleteJoinTokensRequest) ApiUIJoinTokenDeleteSetRequest { @@ -351,22 +351,22 @@ func (r ApiUIJoinTokenDeleteSetRequest) Execute() (*http.Response, error) { /* UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenDeleteSetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenDeleteSetRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSet(ctx context.Context) ApiUIJoinTokenDeleteSetRequest { return ApiUIJoinTokenDeleteSetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDeleteSetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenDeleteSet") @@ -400,8 +400,8 @@ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDele if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -442,42 +442,42 @@ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDele } type ApiUIJoinTokenListRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiUIJoinTokenListRequest) Filter(filter string) ApiUIJoinTokenListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiUIJoinTokenListRequest) OrderBy(orderBy string) ApiUIJoinTokenListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiUIJoinTokenListRequest) Offset(offset int32) ApiUIJoinTokenListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiUIJoinTokenListRequest) Limit(limit int32) ApiUIJoinTokenListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiUIJoinTokenListRequest) PageToken(pageToken string) ApiUIJoinTokenListRequest { r.pageToken = &pageToken return r @@ -504,25 +504,24 @@ UIJoinTokenList User can list the join tokens for an account. Both active and revoked join tokens are listed by default. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenListRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenList(ctx context.Context) ApiUIJoinTokenListRequest { return ApiUIJoinTokenListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return HostactivationListJoinTokenResponse +// @return HostactivationListJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationListJoinTokenResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationListJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenList") @@ -619,13 +618,13 @@ func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListReque } type ApiUIJoinTokenReadRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiUIJoinTokenReadRequest) Fields(fields string) ApiUIJoinTokenReadRequest { r.fields = &fields return r @@ -638,27 +637,26 @@ func (r ApiUIJoinTokenReadRequest) Execute() (*HostactivationReadJoinTokenRespon /* UIJoinTokenRead User can get the join token providing its resource id in the parameter. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenReadRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenRead(ctx context.Context, id string) ApiUIJoinTokenReadRequest { return ApiUIJoinTokenReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return HostactivationReadJoinTokenResponse +// @return HostactivationReadJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationReadJoinTokenResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationReadJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenRead") @@ -738,10 +736,10 @@ func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadReque } type ApiUIJoinTokenUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - id string - body *HostactivationJoinToken + id string + body *HostactivationJoinToken } func (r ApiUIJoinTokenUpdateRequest) Body(body HostactivationJoinToken) ApiUIJoinTokenUpdateRequest { @@ -760,27 +758,26 @@ Validation: Following fields is needed. Provide what needs to be - "expires_at" - "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest { return ApiUIJoinTokenUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return HostactivationUpdateJoinTokenResponse +// @return HostactivationUpdateJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateRequest) (*HostactivationUpdateJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationUpdateJoinTokenResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationUpdateJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenUpdate") @@ -815,16 +812,16 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_provision/api_uicsr.go b/infra_provision/api_uicsr.go index 70c6546..3c2e967 100644 --- a/infra_provision/api_uicsr.go +++ b/infra_provision/api_uicsr.go @@ -18,16 +18,17 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type UICSRAPI interface { /* - UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. + UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRApproveRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRApproveRequest */ UICSRApprove(ctx context.Context, activationCode string) ApiUICSRApproveRequest @@ -35,11 +36,11 @@ type UICSRAPI interface { // @return map[string]interface{} UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) /* - UICSRDeny Marks the certificate signing request as denied. + UICSRDeny Marks the certificate signing request as denied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRDenyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRDenyRequest */ UICSRDeny(ctx context.Context, activationCode string) ApiUICSRDenyRequest @@ -47,10 +48,10 @@ type UICSRAPI interface { // @return map[string]interface{} UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) /* - UICSRList User can list the certificate signing requests for an account. + UICSRList User can list the certificate signing requests for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUICSRListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUICSRListRequest */ UICSRList(ctx context.Context) ApiUICSRListRequest @@ -58,16 +59,16 @@ type UICSRAPI interface { // @return HostactivationListCSRsResponse UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) /* - UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). - Validation: - - one of "cert_serial" or "ophid" should be provided - - "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). +Validation: +- one of "cert_serial" or "ophid" should be provided +- "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest @@ -75,16 +76,16 @@ type UICSRAPI interface { // @return map[string]interface{} UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) /* - UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). - Validation: - - one of "cert_serial" or "ophid" should be provided - - "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). +Validation: +- one of "cert_serial" or "ophid" should be provided +- "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request @@ -97,10 +98,10 @@ type UICSRAPI interface { type UICSRAPIService internal.Service type ApiUICSRApproveRequest struct { - ctx context.Context - ApiService UICSRAPI + ctx context.Context + ApiService UICSRAPI activationCode string - body *HostactivationApproveCSRRequest + body *HostactivationApproveCSRRequest } func (r ApiUICSRApproveRequest) Body(body HostactivationApproveCSRRequest) ApiUICSRApproveRequest { @@ -115,27 +116,26 @@ func (r ApiUICSRApproveRequest) Execute() (map[string]interface{}, *http.Respons /* UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRApproveRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRApproveRequest */ func (a *UICSRAPIService) UICSRApprove(ctx context.Context, activationCode string) ApiUICSRApproveRequest { return ApiUICSRApproveRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, activationCode: activationCode, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRApprove") @@ -170,8 +170,8 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -217,10 +217,10 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str } type ApiUICSRDenyRequest struct { - ctx context.Context - ApiService UICSRAPI + ctx context.Context + ApiService UICSRAPI activationCode string - body *HostactivationDenyCSRRequest + body *HostactivationDenyCSRRequest } func (r ApiUICSRDenyRequest) Body(body HostactivationDenyCSRRequest) ApiUICSRDenyRequest { @@ -235,27 +235,26 @@ func (r ApiUICSRDenyRequest) Execute() (map[string]interface{}, *http.Response, /* UICSRDeny Marks the certificate signing request as denied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRDenyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRDenyRequest */ func (a *UICSRAPIService) UICSRDeny(ctx context.Context, activationCode string) ApiUICSRDenyRequest { return ApiUICSRDenyRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, activationCode: activationCode, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRDeny") @@ -290,8 +289,8 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -337,42 +336,42 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in } type ApiUICSRListRequest struct { - ctx context.Context + ctx context.Context ApiService UICSRAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiUICSRListRequest) Filter(filter string) ApiUICSRListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiUICSRListRequest) OrderBy(orderBy string) ApiUICSRListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiUICSRListRequest) Offset(offset int32) ApiUICSRListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiUICSRListRequest) Limit(limit int32) ApiUICSRListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiUICSRListRequest) PageToken(pageToken string) ApiUICSRListRequest { r.pageToken = &pageToken return r @@ -397,25 +396,24 @@ func (r ApiUICSRListRequest) Execute() (*HostactivationListCSRsResponse, *http.R /* UICSRList User can list the certificate signing requests for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUICSRListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUICSRListRequest */ func (a *UICSRAPIService) UICSRList(ctx context.Context) ApiUICSRListRequest { return ApiUICSRListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return HostactivationListCSRsResponse +// @return HostactivationListCSRsResponse func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationListCSRsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationListCSRsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRList") @@ -512,10 +510,10 @@ func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*Hostactivati } type ApiUICSRRevokeRequest struct { - ctx context.Context + ctx context.Context ApiService UICSRAPI certSerial string - body *HostactivationRevokeCertRequest + body *HostactivationRevokeCertRequest } func (r ApiUICSRRevokeRequest) Body(body HostactivationRevokeCertRequest) ApiUICSRRevokeRequest { @@ -535,27 +533,26 @@ Validation: - one of "cert_serial" or "ophid" should be provided - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ func (a *UICSRAPIService) UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest { return ApiUICSRRevokeRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, certSerial: certSerial, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRRevoke") @@ -590,8 +587,8 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -637,10 +634,10 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin } type ApiUICSRRevoke2Request struct { - ctx context.Context + ctx context.Context ApiService UICSRAPI - ophid string - body *HostactivationRevokeCertRequest + ophid string + body *HostactivationRevokeCertRequest } func (r ApiUICSRRevoke2Request) Body(body HostactivationRevokeCertRequest) ApiUICSRRevoke2Request { @@ -660,27 +657,26 @@ Validation: - one of "cert_serial" or "ophid" should be provided - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ func (a *UICSRAPIService) UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request { return ApiUICSRRevoke2Request{ ApiService: a, - ctx: ctx, - ophid: ophid, + ctx: ctx, + ophid: ophid, } } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRRevoke2") @@ -715,8 +711,8 @@ func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[str if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_provision/client.go b/infra_provision/client.go index fe18f4d..fc02639 100644 --- a/infra_provision/client.go +++ b/infra_provision/client.go @@ -11,7 +11,7 @@ API version: v1 package infra_provision import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/host-activation/v1" @@ -19,10 +19,10 @@ var ServiceBasePath = "/host-activation/v1" // APIClient manages communication with the Host Activation Service API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - UICSRAPI UICSRAPI + UICSRAPI UICSRAPI UIJoinTokenAPI UIJoinTokenAPI } @@ -30,7 +30,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.UICSRAPI = (*UICSRAPIService)(&c.Common) diff --git a/infra_provision/docs/UICSRAPI.md b/infra_provision/docs/UICSRAPI.md index 2b70330..53e6ea7 100644 --- a/infra_provision/docs/UICSRAPI.md +++ b/infra_provision/docs/UICSRAPI.md @@ -24,25 +24,25 @@ Marks the certificate signing request as approved. The host activation service w package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR - body := *openapiclient.NewHostactivationApproveCSRRequest() // HostactivationApproveCSRRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRApprove(context.Background(), activationCode).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRApprove``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRApprove`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRApprove`: %v\n", resp) + activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR + body := *openapiclient.NewHostactivationApproveCSRRequest() // HostactivationApproveCSRRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRApprove(context.Background(), activationCode).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRApprove``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRApprove`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRApprove`: %v\n", resp) } ``` @@ -94,25 +94,25 @@ Marks the certificate signing request as denied. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR - body := *openapiclient.NewHostactivationDenyCSRRequest() // HostactivationDenyCSRRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRDeny(context.Background(), activationCode).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRDeny``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRDeny`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRDeny`: %v\n", resp) + activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR + body := *openapiclient.NewHostactivationDenyCSRRequest() // HostactivationDenyCSRRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRDeny(context.Background(), activationCode).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRDeny``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRDeny`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRDeny`: %v\n", resp) } ``` @@ -164,30 +164,30 @@ User can list the certificate signing requests for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRList`: HostactivationListCSRsResponse - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRList`: HostactivationListCSRsResponse + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRList`: %v\n", resp) } ``` @@ -242,25 +242,25 @@ Invalidates a certificate by adding it to a certificate revocation list. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - certSerial := "certSerial_example" // string | x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRRevoke(context.Background(), certSerial).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRRevoke`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke`: %v\n", resp) + certSerial := "certSerial_example" // string | x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRRevoke(context.Background(), certSerial).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRRevoke`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke`: %v\n", resp) } ``` @@ -314,25 +314,25 @@ Invalidates a certificate by adding it to a certificate revocation list. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - ophid := "ophid_example" // string | On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRRevoke2(context.Background(), ophid).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRRevoke2`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke2`: %v\n", resp) + ophid := "ophid_example" // string | On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRRevoke2(context.Background(), ophid).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRRevoke2`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke2`: %v\n", resp) } ``` diff --git a/infra_provision/docs/UIJoinTokenAPI.md b/infra_provision/docs/UIJoinTokenAPI.md index 54a6829..ef314fb 100644 --- a/infra_provision/docs/UIJoinTokenAPI.md +++ b/infra_provision/docs/UIJoinTokenAPI.md @@ -27,24 +27,24 @@ User can create a join token. Join token is random character string which is use package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenCreate`: HostactivationCreateJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenCreate`: %v\n", resp) + body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenCreate`: HostactivationCreateJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenCreate`: %v\n", resp) } ``` @@ -91,22 +91,22 @@ User can revoke the join token. Once revoked, it can not be used further. The jo package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -157,22 +157,22 @@ User can revoke a list of join tokens. Once revoked, join tokens can not be used package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewHostactivationDeleteJoinTokensRequest() // HostactivationDeleteJoinTokensRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDeleteSet(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDeleteSet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + body := *openapiclient.NewHostactivationDeleteJoinTokensRequest() // HostactivationDeleteJoinTokensRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDeleteSet(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDeleteSet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -221,30 +221,30 @@ User can list the join tokens for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenList`: HostactivationListJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenList`: HostactivationListJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenList`: %v\n", resp) } ``` @@ -297,25 +297,25 @@ User can get the join token providing its resource id in the parameter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenRead`: HostactivationReadJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenRead`: HostactivationReadJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenRead`: %v\n", resp) } ``` @@ -369,25 +369,25 @@ User can modify the tags or expiration time of a join token. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenUpdate`: HostactivationUpdateJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenUpdate`: HostactivationUpdateJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenUpdate`: %v\n", resp) } ``` diff --git a/infra_provision/model_api_page_info.go b/infra_provision/model_api_page_info.go index b7306aa..e36b961 100644 --- a/infra_provision/model_api_page_info.go +++ b/infra_provision/model_api_page_info.go @@ -141,7 +141,7 @@ func (o *ApiPageInfo) SetSize(v int32) { } func (o ApiPageInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableApiPageInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_approve_csr_request.go b/infra_provision/model_hostactivation_approve_csr_request.go index 738087d..04bbf97 100644 --- a/infra_provision/model_hostactivation_approve_csr_request.go +++ b/infra_provision/model_hostactivation_approve_csr_request.go @@ -72,7 +72,7 @@ func (o *HostactivationApproveCSRRequest) SetActivationCode(v string) { } func (o HostactivationApproveCSRRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableHostactivationApproveCSRRequest) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_create_join_token_response.go b/infra_provision/model_hostactivation_create_join_token_response.go index 928a3a4..2f9e110 100644 --- a/infra_provision/model_hostactivation_create_join_token_response.go +++ b/infra_provision/model_hostactivation_create_join_token_response.go @@ -19,8 +19,8 @@ var _ MappedNullable = &HostactivationCreateJoinTokenResponse{} // HostactivationCreateJoinTokenResponse struct for HostactivationCreateJoinTokenResponse type HostactivationCreateJoinTokenResponse struct { - JoinToken *string `json:"join_token,omitempty"` - Result *HostactivationJoinToken `json:"result,omitempty"` + JoinToken *string `json:"join_token,omitempty"` + Result *HostactivationJoinToken `json:"result,omitempty"` } // NewHostactivationCreateJoinTokenResponse instantiates a new HostactivationCreateJoinTokenResponse object @@ -105,7 +105,7 @@ func (o *HostactivationCreateJoinTokenResponse) SetResult(v HostactivationJoinTo } func (o HostactivationCreateJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableHostactivationCreateJoinTokenResponse) UnmarshalJSON(src []byte v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_csr.go b/infra_provision/model_hostactivation_csr.go index e0dfc54..1bf4d09 100644 --- a/infra_provision/model_hostactivation_csr.go +++ b/infra_provision/model_hostactivation_csr.go @@ -20,19 +20,19 @@ var _ MappedNullable = &HostactivationCSR{} // HostactivationCSR Represents a certificate signing request from an on-prem host. type HostactivationCSR struct { - ActivationCode *string `json:"activation_code,omitempty"` - ClientIp *TypesInetValue `json:"client_ip,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Csr *string `json:"csr,omitempty"` - HostSerial *string `json:"host_serial,omitempty"` + ActivationCode *string `json:"activation_code,omitempty"` + ClientIp *TypesInetValue `json:"client_ip,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Csr *string `json:"csr,omitempty"` + HostSerial *string `json:"host_serial,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` JoinToken *HostactivationJoinToken `json:"join_token,omitempty"` - Ophid *string `json:"ophid,omitempty"` - Signature *string `json:"signature,omitempty"` - SrcIp *TypesInetValue `json:"src_ip,omitempty"` - State *HostactivationCSRState `json:"state,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + Ophid *string `json:"ophid,omitempty"` + Signature *string `json:"signature,omitempty"` + SrcIp *TypesInetValue `json:"src_ip,omitempty"` + State *HostactivationCSRState `json:"state,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` } // NewHostactivationCSR instantiates a new HostactivationCSR object @@ -441,7 +441,7 @@ func (o *HostactivationCSR) SetUpdatedAt(v time.Time) { } func (o HostactivationCSR) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -524,3 +524,5 @@ func (v *NullableHostactivationCSR) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_csr_state.go b/infra_provision/model_hostactivation_csr_state.go index d658147..379e99c 100644 --- a/infra_provision/model_hostactivation_csr_state.go +++ b/infra_provision/model_hostactivation_csr_state.go @@ -20,12 +20,12 @@ type HostactivationCSRState string // List of hostactivationCSRState const ( - HOSTACTIVATIONCSRSTATE_UNKNOWN HostactivationCSRState = "UNKNOWN" - HOSTACTIVATIONCSRSTATE_NEW HostactivationCSRState = "NEW" + HOSTACTIVATIONCSRSTATE_UNKNOWN HostactivationCSRState = "UNKNOWN" + HOSTACTIVATIONCSRSTATE_NEW HostactivationCSRState = "NEW" HOSTACTIVATIONCSRSTATE_VERIFIED HostactivationCSRState = "VERIFIED" - HOSTACTIVATIONCSRSTATE_DENIED HostactivationCSRState = "DENIED" - HOSTACTIVATIONCSRSTATE_TIMEOUT HostactivationCSRState = "TIMEOUT" - HOSTACTIVATIONCSRSTATE_RENEWED HostactivationCSRState = "RENEWED" + HOSTACTIVATIONCSRSTATE_DENIED HostactivationCSRState = "DENIED" + HOSTACTIVATIONCSRSTATE_TIMEOUT HostactivationCSRState = "TIMEOUT" + HOSTACTIVATIONCSRSTATE_RENEWED HostactivationCSRState = "RENEWED" ) // All allowed values of HostactivationCSRState enum @@ -116,3 +116,4 @@ func (v *NullableHostactivationCSRState) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + diff --git a/infra_provision/model_hostactivation_delete_join_tokens_request.go b/infra_provision/model_hostactivation_delete_join_tokens_request.go index 939207d..d100a35 100644 --- a/infra_provision/model_hostactivation_delete_join_tokens_request.go +++ b/infra_provision/model_hostactivation_delete_join_tokens_request.go @@ -73,7 +73,7 @@ func (o *HostactivationDeleteJoinTokensRequest) SetIds(v []string) { } func (o HostactivationDeleteJoinTokensRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableHostactivationDeleteJoinTokensRequest) UnmarshalJSON(src []byte v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_deny_csr_request.go b/infra_provision/model_hostactivation_deny_csr_request.go index b826ac3..a61da7a 100644 --- a/infra_provision/model_hostactivation_deny_csr_request.go +++ b/infra_provision/model_hostactivation_deny_csr_request.go @@ -72,7 +72,7 @@ func (o *HostactivationDenyCSRRequest) SetActivationCode(v string) { } func (o HostactivationDenyCSRRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableHostactivationDenyCSRRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_join_token.go b/infra_provision/model_hostactivation_join_token.go index d4ff235..e7cfa7e 100644 --- a/infra_provision/model_hostactivation_join_token.go +++ b/infra_provision/model_hostactivation_join_token.go @@ -13,6 +13,8 @@ package infra_provision import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the HostactivationJoinToken type satisfies the MappedNullable interface at compile time @@ -20,20 +22,22 @@ var _ MappedNullable = &HostactivationJoinToken{} // HostactivationJoinToken struct for HostactivationJoinToken type HostactivationJoinToken struct { - DeletedAt *time.Time `json:"deleted_at,omitempty"` - Description *string `json:"description,omitempty"` - ExpiresAt *time.Time `json:"expires_at,omitempty"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + Description *string `json:"description,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` - LastUsedAt *time.Time `json:"last_used_at,omitempty"` - Name string `json:"name"` - Status *JoinTokenJoinTokenStatus `json:"status,omitempty"` - Tags map[string]interface{} `json:"tags,omitempty"` + Id *string `json:"id,omitempty"` + LastUsedAt *time.Time `json:"last_used_at,omitempty"` + Name string `json:"name"` + Status *JoinTokenJoinTokenStatus `json:"status,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` // first half of the token. - TokenId *string `json:"token_id,omitempty"` - UseCounter *int64 `json:"use_counter,omitempty"` + TokenId *string `json:"token_id,omitempty"` + UseCounter *int64 `json:"use_counter,omitempty"` } +type _HostactivationJoinToken HostactivationJoinToken + // NewHostactivationJoinToken instantiates a new HostactivationJoinToken object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -369,7 +373,7 @@ func (o *HostactivationJoinToken) SetUseCounter(v int64) { } func (o HostactivationJoinToken) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -409,6 +413,43 @@ func (o HostactivationJoinToken) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *HostactivationJoinToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHostactivationJoinToken := _HostactivationJoinToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHostactivationJoinToken) + + if err != nil { + return err + } + + *o = HostactivationJoinToken(varHostactivationJoinToken) + + return err +} + type NullableHostactivationJoinToken struct { value *HostactivationJoinToken isSet bool @@ -444,3 +485,5 @@ func (v *NullableHostactivationJoinToken) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_list_csrs_response.go b/infra_provision/model_hostactivation_list_csrs_response.go index 6c76eeb..581aa50 100644 --- a/infra_provision/model_hostactivation_list_csrs_response.go +++ b/infra_provision/model_hostactivation_list_csrs_response.go @@ -19,7 +19,7 @@ var _ MappedNullable = &HostactivationListCSRsResponse{} // HostactivationListCSRsResponse struct for HostactivationListCSRsResponse type HostactivationListCSRsResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []HostactivationCSR `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *HostactivationListCSRsResponse) SetResults(v []HostactivationCSR) { } func (o HostactivationListCSRsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableHostactivationListCSRsResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_list_join_token_response.go b/infra_provision/model_hostactivation_list_join_token_response.go index 3770180..ac1bd69 100644 --- a/infra_provision/model_hostactivation_list_join_token_response.go +++ b/infra_provision/model_hostactivation_list_join_token_response.go @@ -19,7 +19,7 @@ var _ MappedNullable = &HostactivationListJoinTokenResponse{} // HostactivationListJoinTokenResponse struct for HostactivationListJoinTokenResponse type HostactivationListJoinTokenResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []HostactivationJoinToken `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *HostactivationListJoinTokenResponse) SetResults(v []HostactivationJoinT } func (o HostactivationListJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableHostactivationListJoinTokenResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_read_join_token_response.go b/infra_provision/model_hostactivation_read_join_token_response.go index ad58d58..cb93ba3 100644 --- a/infra_provision/model_hostactivation_read_join_token_response.go +++ b/infra_provision/model_hostactivation_read_join_token_response.go @@ -72,7 +72,7 @@ func (o *HostactivationReadJoinTokenResponse) SetResult(v HostactivationJoinToke } func (o HostactivationReadJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableHostactivationReadJoinTokenResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_revoke_cert_request.go b/infra_provision/model_hostactivation_revoke_cert_request.go index f3ef47a..d73935f 100644 --- a/infra_provision/model_hostactivation_revoke_cert_request.go +++ b/infra_provision/model_hostactivation_revoke_cert_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &HostactivationRevokeCertRequest{} type HostactivationRevokeCertRequest struct { CertSerial *string `json:"cert_serial,omitempty"` // On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - Ophid *string `json:"ophid,omitempty"` + Ophid *string `json:"ophid,omitempty"` RevokeReason *string `json:"revoke_reason,omitempty"` } @@ -139,7 +139,7 @@ func (o *HostactivationRevokeCertRequest) SetRevokeReason(v string) { } func (o HostactivationRevokeCertRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -195,3 +195,5 @@ func (v *NullableHostactivationRevokeCertRequest) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_hostactivation_update_join_token_response.go b/infra_provision/model_hostactivation_update_join_token_response.go index b103f2f..08864f4 100644 --- a/infra_provision/model_hostactivation_update_join_token_response.go +++ b/infra_provision/model_hostactivation_update_join_token_response.go @@ -72,7 +72,7 @@ func (o *HostactivationUpdateJoinTokenResponse) SetResult(v HostactivationJoinTo } func (o HostactivationUpdateJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableHostactivationUpdateJoinTokenResponse) UnmarshalJSON(src []byte v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_join_token_join_token_status.go b/infra_provision/model_join_token_join_token_status.go index 80eb50a..7396c7d 100644 --- a/infra_provision/model_join_token_join_token_status.go +++ b/infra_provision/model_join_token_join_token_status.go @@ -21,7 +21,7 @@ type JoinTokenJoinTokenStatus string // List of JoinTokenJoinTokenStatus const ( JOINTOKENJOINTOKENSTATUS_UNKNOWN JoinTokenJoinTokenStatus = "UNKNOWN" - JOINTOKENJOINTOKENSTATUS_ACTIVE JoinTokenJoinTokenStatus = "ACTIVE" + JOINTOKENJOINTOKENSTATUS_ACTIVE JoinTokenJoinTokenStatus = "ACTIVE" JOINTOKENJOINTOKENSTATUS_EXPIRED JoinTokenJoinTokenStatus = "EXPIRED" JOINTOKENJOINTOKENSTATUS_REVOKED JoinTokenJoinTokenStatus = "REVOKED" ) @@ -112,3 +112,4 @@ func (v *NullableJoinTokenJoinTokenStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + diff --git a/infra_provision/model_types_inet_value.go b/infra_provision/model_types_inet_value.go index ffe6812..e08622c 100644 --- a/infra_provision/model_types_inet_value.go +++ b/infra_provision/model_types_inet_value.go @@ -72,7 +72,7 @@ func (o *TypesInetValue) SetValue(v string) { } func (o TypesInetValue) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableTypesInetValue) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/model_types_json_value.go b/infra_provision/model_types_json_value.go index 5a09701..75229b1 100644 --- a/infra_provision/model_types_json_value.go +++ b/infra_provision/model_types_json_value.go @@ -72,7 +72,7 @@ func (o *TypesJSONValue) SetValue(v string) { } func (o TypesJSONValue) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableTypesJSONValue) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/infra_provision/utils.go b/infra_provision/utils.go index 07e76f3..eeec3ff 100644 --- a/infra_provision/utils.go +++ b/infra_provision/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/ipam/.openapi-generator/VERSION b/ipam/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/ipam/.openapi-generator/VERSION +++ b/ipam/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/ipam/README.md b/ipam/README.md index 1bc0c10..562ac4c 100644 --- a/ipam/README.md +++ b/ipam/README.md @@ -13,20 +13,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import ipam "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -36,17 +36,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `ipam.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), ipam.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `ipam.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), ipam.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -58,9 +58,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `ipam.ContextOperationServerIndices` and `ipam.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), ipam.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -359,11 +359,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + ipam.ContextAPIKeys, + map[string]ipam.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/ipam/api_address.go b/ipam/api_address.go index c8e8fc7..38e890b 100644 --- a/ipam/api_address.go +++ b/ipam/api_address.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type AddressAPI interface { /* - AddressCreate Create the IP address. + AddressCreate Create the IP address. - Use this method to create an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to create an __Address__ object. +The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ AddressCreate(ctx context.Context) ApiAddressCreateRequest @@ -37,27 +38,27 @@ type AddressAPI interface { // @return IpamsvcCreateAddressResponse AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) /* - AddressDelete Move the IP address to the recycle bin. + AddressDelete Move the IP address to the recycle bin. - Use this method to move an __Address__ object to the recycle bin. - The __Address__ object represents any single IP address within a given IP space. + Use this method to move an __Address__ object to the recycle bin. +The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest // AddressDeleteExecute executes the request AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) /* - AddressList Retrieve IP addresses. + AddressList Retrieve IP addresses. - Use this method to retrieve __Address__ objects. - The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve __Address__ objects. +The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ AddressList(ctx context.Context) ApiAddressListRequest @@ -65,14 +66,14 @@ type AddressAPI interface { // @return IpamsvcListAddressResponse AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) /* - AddressRead Retrieve the IP address. + AddressRead Retrieve the IP address. - Use this method to retrieve an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve an __Address__ object. +The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ AddressRead(ctx context.Context, id string) ApiAddressReadRequest @@ -80,14 +81,14 @@ type AddressAPI interface { // @return IpamsvcReadAddressResponse AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) /* - AddressUpdate Update the IP address. + AddressUpdate Update the IP address. - Use this method to update an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to update an __Address__ object. +The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest @@ -100,9 +101,9 @@ type AddressAPI interface { type AddressAPIService internal.Service type ApiAddressCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - body *IpamsvcAddress + body *IpamsvcAddress } func (r ApiAddressCreateRequest) Body(body IpamsvcAddress) ApiAddressCreateRequest { @@ -120,25 +121,24 @@ AddressCreate Create the IP address. Use this method to create an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ func (a *AddressAPIService) AddressCreate(ctx context.Context) ApiAddressCreateRequest { return ApiAddressCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateAddressResponse +// @return IpamsvcCreateAddressResponse func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateAddressResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressCreate") @@ -172,16 +172,16 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip } type ApiAddressDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - id string + id string } func (r ApiAddressDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ AddressDelete Move the IP address to the recycle bin. Use this method to move an __Address__ object to the recycle bin. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ func (a *AddressAPIService) AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest { return ApiAddressDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AddressAPIService) AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressDelete") @@ -331,51 +331,51 @@ func (a *AddressAPIService) AddressDeleteExecute(r ApiAddressDeleteRequest) (*ht } type ApiAddressListRequest struct { - ctx context.Context - ApiService AddressAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - scope *string + ctx context.Context + ApiService AddressAPI + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + scope *string addressState *string - torderBy *string - tfilter *string + torderBy *string + tfilter *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAddressListRequest) Filter(filter string) ApiAddressListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAddressListRequest) OrderBy(orderBy string) ApiAddressListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressListRequest) Fields(fields string) ApiAddressListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAddressListRequest) Offset(offset int32) ApiAddressListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAddressListRequest) Limit(limit int32) ApiAddressListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAddressListRequest) PageToken(pageToken string) ApiAddressListRequest { r.pageToken = &pageToken return r @@ -413,25 +413,24 @@ AddressList Retrieve IP addresses. Use this method to retrieve __Address__ objects. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ func (a *AddressAPIService) AddressList(ctx context.Context) ApiAddressListRequest { return ApiAddressListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListAddressResponse +// @return IpamsvcListAddressResponse func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressList") @@ -537,13 +536,13 @@ func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*Ipamsv } type ApiAddressReadRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressReadRequest) Fields(fields string) ApiAddressReadRequest { r.fields = &fields return r @@ -559,27 +558,26 @@ AddressRead Retrieve the IP address. Use this method to retrieve an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ func (a *AddressAPIService) AddressRead(ctx context.Context, id string) ApiAddressReadRequest { return ApiAddressReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadAddressResponse +// @return IpamsvcReadAddressResponse func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressRead") @@ -659,10 +657,10 @@ func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*Ipamsv } type ApiAddressUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - id string - body *IpamsvcAddress + id string + body *IpamsvcAddress } func (r ApiAddressUpdateRequest) Body(body IpamsvcAddress) ApiAddressUpdateRequest { @@ -680,27 +678,26 @@ AddressUpdate Update the IP address. Use this method to update an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ func (a *AddressAPIService) AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest { return ApiAddressUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateAddressResponse +// @return IpamsvcUpdateAddressResponse func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*IpamsvcUpdateAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateAddressResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressUpdate") @@ -735,16 +732,16 @@ func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_address_block.go b/ipam/api_address_block.go index 481539c..cc3cf60 100644 --- a/ipam/api_address_block.go +++ b/ipam/api_address_block.go @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type AddressBlockAPI interface { /* - AddressBlockCopy Copy the address block. + AddressBlockCopy Copy the address block. - Use this method to copy an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to copy an __AddressBlock__ object. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest @@ -38,13 +39,13 @@ type AddressBlockAPI interface { // @return IpamsvcCopyAddressBlockResponse AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) /* - AddressBlockCreate Create the address block. + AddressBlockCreate Create the address block. - Use this method to create an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to create an __AddressBlock__ object. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest @@ -52,14 +53,14 @@ type AddressBlockAPI interface { // @return IpamsvcCreateAddressBlockResponse AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. + AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. - Use this method to create a Next Available __AddressBlock__ object. - The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to create a Next Available __AddressBlock__ object. +The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest @@ -67,14 +68,14 @@ type AddressBlockAPI interface { // @return IpamsvcCreateNextAvailableABResponse AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableIP Allocate the next available IP address. + AddressBlockCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. +This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest @@ -82,14 +83,14 @@ type AddressBlockAPI interface { // @return IpamsvcCreateNextAvailableIPResponse AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. + AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. - Use this method to create a Next Available __Subnet__ object. - The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to create a Next Available __Subnet__ object. +The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest @@ -97,27 +98,27 @@ type AddressBlockAPI interface { // @return IpamsvcCreateNextAvailableSubnetResponse AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) /* - AddressBlockDelete Move the address block to the recycle bin. + AddressBlockDelete Move the address block to the recycle bin. - Use this method to move an __AddressBlock__ object to the recycle bin. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to move an __AddressBlock__ object to the recycle bin. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest // AddressBlockDeleteExecute executes the request AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) /* - AddressBlockList Retrieve the address blocks. + AddressBlockList Retrieve the address blocks. - Use this method to retrieve __AddressBlock__ objects. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve __AddressBlock__ objects. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ AddressBlockList(ctx context.Context) ApiAddressBlockListRequest @@ -125,14 +126,14 @@ type AddressBlockAPI interface { // @return IpamsvcListAddressBlockResponse AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) /* - AddressBlockListNextAvailableAB List Next Available Address Block objects. + AddressBlockListNextAvailableAB List Next Available Address Block objects. - Use this method to list Next Available __AddressBlock__ objects. - The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to list Next Available __AddressBlock__ objects. +The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest @@ -140,14 +141,14 @@ type AddressBlockAPI interface { // @return IpamsvcNextAvailableABResponse AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) /* - AddressBlockListNextAvailableIP Retrieve the next available IP address. + AddressBlockListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. +This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest @@ -155,14 +156,14 @@ type AddressBlockAPI interface { // @return IpamsvcNextAvailableIPResponse AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - AddressBlockListNextAvailableSubnet List Next Available Subnet objects. + AddressBlockListNextAvailableSubnet List Next Available Subnet objects. - Use this method to list Next Available __Subnet__ objects. - The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to list Next Available __Subnet__ objects. +The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest @@ -170,14 +171,14 @@ type AddressBlockAPI interface { // @return IpamsvcNextAvailableSubnetResponse AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) /* - AddressBlockRead Retrieve the address block. + AddressBlockRead Retrieve the address block. - Use this method to retrieve an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve an __AddressBlock__ object. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest @@ -185,14 +186,14 @@ type AddressBlockAPI interface { // @return IpamsvcReadAddressBlockResponse AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) /* - AddressBlockUpdate Update the address block. + AddressBlockUpdate Update the address block. - Use this method to update an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to update an __AddressBlock__ object. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest @@ -205,10 +206,10 @@ type AddressBlockAPI interface { type AddressBlockAPIService internal.Service type ApiAddressBlockCopyRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - body *IpamsvcCopyAddressBlock + id string + body *IpamsvcCopyAddressBlock } func (r ApiAddressBlockCopyRequest) Body(body IpamsvcCopyAddressBlock) ApiAddressBlockCopyRequest { @@ -226,27 +227,26 @@ AddressBlockCopy Copy the address block. Use this method to copy an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ func (a *AddressBlockAPIService) AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest { return ApiAddressBlockCopyRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCopyAddressBlockResponse +// @return IpamsvcCopyAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCopyAddressBlockResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCopyAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCopy") @@ -281,8 +281,8 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -328,10 +328,10 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe } type ApiAddressBlockCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - body *IpamsvcAddressBlock - inherit *string + body *IpamsvcAddressBlock + inherit *string } func (r ApiAddressBlockCreateRequest) Body(body IpamsvcAddressBlock) ApiAddressBlockCreateRequest { @@ -355,25 +355,24 @@ AddressBlockCreate Create the address block. Use this method to create an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ func (a *AddressBlockAPIService) AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest { return ApiAddressBlockCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateAddressBlockResponse +// @return IpamsvcCreateAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateAddressBlockResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreate") @@ -410,16 +409,16 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -465,13 +464,13 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea } type ApiAddressBlockCreateNextAvailableABRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string + id string + cidr *int32 + count *int32 + name *string + comment *string } // The cidr value of address blocks to be created. @@ -508,27 +507,26 @@ AddressBlockCreateNextAvailableAB Create the Next Available Address Block object Use this method to create a Next Available __AddressBlock__ object. The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest { return ApiAddressBlockCreateNextAvailableABRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableABResponse +// @return IpamsvcCreateNextAvailableABResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableABResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableABResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreateNextAvailableAB") @@ -621,11 +619,11 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiA } type ApiAddressBlockCreateNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -650,27 +648,26 @@ AddressBlockCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest { return ApiAddressBlockCreateNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableIPResponse +// @return IpamsvcCreateNextAvailableIPResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableIPResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreateNextAvailableIP") @@ -759,14 +756,14 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiA } type ApiAddressBlockCreateNextAvailableSubnetRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string - dhcpHost *string + id string + cidr *int32 + count *int32 + name *string + comment *string + dhcpHost *string } // The cidr value of subnets to be created. @@ -809,27 +806,26 @@ AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. Use this method to create a Next Available __Subnet__ object. The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest { return ApiAddressBlockCreateNextAvailableSubnetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableSubnetResponse +// @return IpamsvcCreateNextAvailableSubnetResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableSubnetResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreateNextAvailableSubnet") @@ -925,9 +921,9 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r } type ApiAddressBlockDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string + id string } func (r ApiAddressBlockDeleteRequest) Execute() (*http.Response, error) { @@ -940,24 +936,24 @@ AddressBlockDelete Move the address block to the recycle bin. Use this method to move an __AddressBlock__ object to the recycle bin. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ func (a *AddressBlockAPIService) AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest { return ApiAddressBlockDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AddressBlockAPIService) AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockDelete") @@ -1029,50 +1025,50 @@ func (a *AddressBlockAPIService) AddressBlockDeleteExecute(r ApiAddressBlockDele } type ApiAddressBlockListRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressBlockListRequest) Fields(fields string) ApiAddressBlockListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAddressBlockListRequest) Filter(filter string) ApiAddressBlockListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAddressBlockListRequest) Offset(offset int32) ApiAddressBlockListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAddressBlockListRequest) Limit(limit int32) ApiAddressBlockListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAddressBlockListRequest) PageToken(pageToken string) ApiAddressBlockListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAddressBlockListRequest) OrderBy(orderBy string) ApiAddressBlockListRequest { r.orderBy = &orderBy return r @@ -1106,25 +1102,24 @@ AddressBlockList Retrieve the address blocks. Use this method to retrieve __AddressBlock__ objects. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ func (a *AddressBlockAPIService) AddressBlockList(ctx context.Context) ApiAddressBlockListRequest { return ApiAddressBlockListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListAddressBlockResponse +// @return IpamsvcListAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListAddressBlockResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockList") @@ -1227,13 +1222,13 @@ func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRe } type ApiAddressBlockListNextAvailableABRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string + id string + cidr *int32 + count *int32 + name *string + comment *string } // The cidr value of address blocks to be created. @@ -1270,27 +1265,26 @@ AddressBlockListNextAvailableAB List Next Available Address Block objects. Use this method to list Next Available __AddressBlock__ objects. The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest { return ApiAddressBlockListNextAvailableABRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcNextAvailableABResponse +// @return IpamsvcNextAvailableABResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableABResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableABResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockListNextAvailableAB") @@ -1379,11 +1373,11 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAdd } type ApiAddressBlockListNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -1408,27 +1402,26 @@ AddressBlockListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest { return ApiAddressBlockListNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcNextAvailableIPResponse +// @return IpamsvcNextAvailableIPResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableIPResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockListNextAvailableIP") @@ -1511,14 +1504,14 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAdd } type ApiAddressBlockListNextAvailableSubnetRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string - dhcpHost *string + id string + cidr *int32 + count *int32 + name *string + comment *string + dhcpHost *string } // The cidr value of subnets to be created. @@ -1561,27 +1554,26 @@ AddressBlockListNextAvailableSubnet List Next Available Subnet objects. Use this method to list Next Available __Subnet__ objects. The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest { return ApiAddressBlockListNextAvailableSubnetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcNextAvailableSubnetResponse +// @return IpamsvcNextAvailableSubnetResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableSubnetResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockListNextAvailableSubnet") @@ -1673,14 +1665,14 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r Ap } type ApiAddressBlockReadRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressBlockReadRequest) Fields(fields string) ApiAddressBlockReadRequest { r.fields = &fields return r @@ -1702,27 +1694,26 @@ AddressBlockRead Retrieve the address block. Use this method to retrieve an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ func (a *AddressBlockAPIService) AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest { return ApiAddressBlockReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadAddressBlockResponse +// @return IpamsvcReadAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadAddressBlockResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockRead") @@ -1805,11 +1796,11 @@ func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRe } type ApiAddressBlockUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - body *IpamsvcAddressBlock - inherit *string + id string + body *IpamsvcAddressBlock + inherit *string } func (r ApiAddressBlockUpdateRequest) Body(body IpamsvcAddressBlock) ApiAddressBlockUpdateRequest { @@ -1833,27 +1824,26 @@ AddressBlockUpdate Update the address block. Use this method to update an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ func (a *AddressBlockAPIService) AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest { return ApiAddressBlockUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateAddressBlockResponse +// @return IpamsvcUpdateAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpdateRequest) (*IpamsvcUpdateAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateAddressBlockResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockUpdate") @@ -1891,16 +1881,16 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_asm.go b/ipam/api_asm.go index b2fe742..bf2dbc2 100644 --- a/ipam/api_asm.go +++ b/ipam/api_asm.go @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type AsmAPI interface { /* - AsmCreate Update subnet and ranges for Automated Scope Management. + AsmCreate Update subnet and ranges for Automated Scope Management. - Use this method to update the subnet and range for Automated Scope Management. - The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. - This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. + Use this method to update the subnet and range for Automated Scope Management. +The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. +This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ AsmCreate(ctx context.Context) ApiAsmCreateRequest @@ -38,13 +39,13 @@ type AsmAPI interface { // @return IpamsvcCreateASMResponse AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) /* - AsmList Retrieve suggested updates for Automated Scope Management. + AsmList Retrieve suggested updates for Automated Scope Management. - Use this method to retrieve __ASM__ objects for Automated Scope Management. - The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve __ASM__ objects for Automated Scope Management. +The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ AsmList(ctx context.Context) ApiAsmListRequest @@ -52,14 +53,14 @@ type AsmAPI interface { // @return IpamsvcListASMResponse AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) /* - AsmRead Retrieve the suggested update for Automated Scope Management. + AsmRead Retrieve the suggested update for Automated Scope Management. - Use this method to retrieve an __ASM__ object for Automated Scope Management. - The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve an __ASM__ object for Automated Scope Management. +The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ AsmRead(ctx context.Context, id string) ApiAsmReadRequest @@ -72,9 +73,9 @@ type AsmAPI interface { type AsmAPIService internal.Service type ApiAsmCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AsmAPI - body *IpamsvcASM + body *IpamsvcASM } func (r ApiAsmCreateRequest) Body(body IpamsvcASM) ApiAsmCreateRequest { @@ -93,25 +94,24 @@ Use this method to update the subnet and range for Automated Scope Management. The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ func (a *AsmAPIService) AsmCreate(ctx context.Context) ApiAsmCreateRequest { return ApiAsmCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateASMResponse +// @return IpamsvcCreateASMResponse func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateASMResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateASMResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AsmAPIService.AsmCreate") @@ -145,8 +145,8 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -192,13 +192,13 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA } type ApiAsmListRequest struct { - ctx context.Context + ctx context.Context ApiService AsmAPI - fields *string - subnetId *string + fields *string + subnetId *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAsmListRequest) Fields(fields string) ApiAsmListRequest { r.fields = &fields return r @@ -219,25 +219,24 @@ AsmList Retrieve suggested updates for Automated Scope Management. Use this method to retrieve __ASM__ objects for Automated Scope Management. The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ func (a *AsmAPIService) AsmList(ctx context.Context) ApiAsmListRequest { return ApiAsmListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListASMResponse +// @return IpamsvcListASMResponse func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListASMResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListASMResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AsmAPIService.AsmList") @@ -319,13 +318,13 @@ func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResp } type ApiAsmReadRequest struct { - ctx context.Context + ctx context.Context ApiService AsmAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAsmReadRequest) Fields(fields string) ApiAsmReadRequest { r.fields = &fields return r @@ -341,27 +340,26 @@ AsmRead Retrieve the suggested update for Automated Scope Management. Use this method to retrieve an __ASM__ object for Automated Scope Management. The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ func (a *AsmAPIService) AsmRead(ctx context.Context, id string) ApiAsmReadRequest { return ApiAsmReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadASMResponse +// @return IpamsvcReadASMResponse func (a *AsmAPIService) AsmReadExecute(r ApiAsmReadRequest) (*IpamsvcReadASMResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadASMResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadASMResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AsmAPIService.AsmRead") diff --git a/ipam/api_dhcp_host.go b/ipam/api_dhcp_host.go index a3d955b..72f295c 100644 --- a/ipam/api_dhcp_host.go +++ b/ipam/api_dhcp_host.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type DhcpHostAPI interface { /* - DhcpHostList Retrieve DHCP hosts. + DhcpHostList Retrieve DHCP hosts. - Use this method to retrieve DHCP __Host__ objects. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve DHCP __Host__ objects. +A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ DhcpHostList(ctx context.Context) ApiDhcpHostListRequest @@ -37,13 +38,13 @@ type DhcpHostAPI interface { // @return IpamsvcListHostResponse DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) /* - DhcpHostListAssociations Retrieve DHCP host associations. + DhcpHostListAssociations Retrieve DHCP host associations. - Use this method to retrieve __HostAssociation__ objects. + Use this method to retrieve __HostAssociation__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostListAssociationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostListAssociationsRequest */ DhcpHostListAssociations(ctx context.Context, id string) ApiDhcpHostListAssociationsRequest @@ -51,14 +52,14 @@ type DhcpHostAPI interface { // @return IpamsvcHostAssociationsResponse DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) /* - DhcpHostRead Retrieve the DHCP host. + DhcpHostRead Retrieve the DHCP host. - Use this method to retrieve a DHCP Host object. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve a DHCP Host object. +A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest @@ -66,14 +67,14 @@ type DhcpHostAPI interface { // @return IpamsvcReadHostResponse DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) /* - DhcpHostUpdate Update the DHCP hosts. + DhcpHostUpdate Update the DHCP hosts. - Use this method to update a DHCP __Host__ object. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to update a DHCP __Host__ object. +A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest @@ -86,49 +87,49 @@ type DhcpHostAPI interface { type DhcpHostAPIService internal.Service type ApiDhcpHostListRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDhcpHostListRequest) Fields(fields string) ApiDhcpHostListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDhcpHostListRequest) Filter(filter string) ApiDhcpHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDhcpHostListRequest) Offset(offset int32) ApiDhcpHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDhcpHostListRequest) Limit(limit int32) ApiDhcpHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDhcpHostListRequest) PageToken(pageToken string) ApiDhcpHostListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDhcpHostListRequest) OrderBy(orderBy string) ApiDhcpHostListRequest { r.orderBy = &orderBy return r @@ -156,25 +157,24 @@ DhcpHostList Retrieve DHCP hosts. Use this method to retrieve DHCP __Host__ objects. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ func (a *DhcpHostAPIService) DhcpHostList(ctx context.Context) ApiDhcpHostListRequest { return ApiDhcpHostListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListHostResponse +// @return IpamsvcListHostResponse func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostList") @@ -274,9 +274,9 @@ func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*Ipa } type ApiDhcpHostListAssociationsRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - id string + id string } func (r ApiDhcpHostListAssociationsRequest) Execute() (*IpamsvcHostAssociationsResponse, *http.Response, error) { @@ -288,27 +288,26 @@ DhcpHostListAssociations Retrieve DHCP host associations. Use this method to retrieve __HostAssociation__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostListAssociationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostListAssociationsRequest */ func (a *DhcpHostAPIService) DhcpHostListAssociations(ctx context.Context, id string) ApiDhcpHostListAssociationsRequest { return ApiDhcpHostListAssociationsRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcHostAssociationsResponse +// @return IpamsvcHostAssociationsResponse func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcHostAssociationsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcHostAssociationsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostListAssociations") @@ -385,13 +384,13 @@ func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAs } type ApiDhcpHostReadRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDhcpHostReadRequest) Fields(fields string) ApiDhcpHostReadRequest { r.fields = &fields return r @@ -407,27 +406,26 @@ DhcpHostRead Retrieve the DHCP host. Use this method to retrieve a DHCP Host object. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ func (a *DhcpHostAPIService) DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest { return ApiDhcpHostReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadHostResponse +// @return IpamsvcReadHostResponse func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostRead") @@ -507,10 +505,10 @@ func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*Ipa } type ApiDhcpHostUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - id string - body *IpamsvcHost + id string + body *IpamsvcHost } func (r ApiDhcpHostUpdateRequest) Body(body IpamsvcHost) ApiDhcpHostUpdateRequest { @@ -528,27 +526,26 @@ DhcpHostUpdate Update the DHCP hosts. Use this method to update a DHCP __Host__ object. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ func (a *DhcpHostAPIService) DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest { return ApiDhcpHostUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateHostResponse +// @return IpamsvcUpdateHostResponse func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) (*IpamsvcUpdateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateHostResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostUpdate") @@ -583,16 +580,16 @@ func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_dns_usage.go b/ipam/api_dns_usage.go index ce964cf..ec33abe 100644 --- a/ipam/api_dns_usage.go +++ b/ipam/api_dns_usage.go @@ -18,17 +18,18 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type DnsUsageAPI interface { /* - DnsUsageList Retrieve DNS usage for multiple objects. + DnsUsageList Retrieve DNS usage for multiple objects. - Use this method to retrieve __DNSUsage__ objects. + Use this method to retrieve __DNSUsage__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDnsUsageListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDnsUsageListRequest */ DnsUsageList(ctx context.Context) ApiDnsUsageListRequest @@ -36,13 +37,13 @@ type DnsUsageAPI interface { // @return IpamsvcListDNSUsageResponse DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) /* - DnsUsageRead Retrieve the DNS usage. + DnsUsageRead Retrieve the DNS usage. - Use this method to retrieve a __DNSUsage__ object. + Use this method to retrieve a __DNSUsage__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDnsUsageReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDnsUsageReadRequest */ DnsUsageRead(ctx context.Context, id string) ApiDnsUsageReadRequest @@ -55,47 +56,47 @@ type DnsUsageAPI interface { type DnsUsageAPIService internal.Service type ApiDnsUsageListRequest struct { - ctx context.Context + ctx context.Context ApiService DnsUsageAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDnsUsageListRequest) Fields(fields string) ApiDnsUsageListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDnsUsageListRequest) Filter(filter string) ApiDnsUsageListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDnsUsageListRequest) Offset(offset int32) ApiDnsUsageListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDnsUsageListRequest) Limit(limit int32) ApiDnsUsageListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDnsUsageListRequest) PageToken(pageToken string) ApiDnsUsageListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDnsUsageListRequest) OrderBy(orderBy string) ApiDnsUsageListRequest { r.orderBy = &orderBy return r @@ -110,25 +111,24 @@ DnsUsageList Retrieve DNS usage for multiple objects. Use this method to retrieve __DNSUsage__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDnsUsageListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDnsUsageListRequest */ func (a *DnsUsageAPIService) DnsUsageList(ctx context.Context) ApiDnsUsageListRequest { return ApiDnsUsageListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListDNSUsageResponse +// @return IpamsvcListDNSUsageResponse func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListDNSUsageResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListDNSUsageResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DnsUsageAPIService.DnsUsageList") @@ -222,13 +222,13 @@ func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*Ipa } type ApiDnsUsageReadRequest struct { - ctx context.Context + ctx context.Context ApiService DnsUsageAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDnsUsageReadRequest) Fields(fields string) ApiDnsUsageReadRequest { r.fields = &fields return r @@ -243,27 +243,26 @@ DnsUsageRead Retrieve the DNS usage. Use this method to retrieve a __DNSUsage__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDnsUsageReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDnsUsageReadRequest */ func (a *DnsUsageAPIService) DnsUsageRead(ctx context.Context, id string) ApiDnsUsageReadRequest { return ApiDnsUsageReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadDNSUsageResponse +// @return IpamsvcReadDNSUsageResponse func (a *DnsUsageAPIService) DnsUsageReadExecute(r ApiDnsUsageReadRequest) (*IpamsvcReadDNSUsageResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadDNSUsageResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadDNSUsageResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DnsUsageAPIService.DnsUsageRead") diff --git a/ipam/api_filter.go b/ipam/api_filter.go index 572f312..c69ac61 100644 --- a/ipam/api_filter.go +++ b/ipam/api_filter.go @@ -17,17 +17,18 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type FilterAPI interface { /* - FilterList Retrieve DHCP filters. + FilterList Retrieve DHCP filters. - Use this method to retrieve DHCP __Filter__ objects of all types. + Use this method to retrieve DHCP __Filter__ objects of all types. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFilterListRequest */ FilterList(ctx context.Context) ApiFilterListRequest @@ -40,49 +41,49 @@ type FilterAPI interface { type FilterAPIService internal.Service type ApiFilterListRequest struct { - ctx context.Context + ctx context.Context ApiService FilterAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFilterListRequest) Fields(fields string) ApiFilterListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiFilterListRequest) Filter(filter string) ApiFilterListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiFilterListRequest) Offset(offset int32) ApiFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiFilterListRequest) Limit(limit int32) ApiFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiFilterListRequest) PageToken(pageToken string) ApiFilterListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiFilterListRequest) OrderBy(orderBy string) ApiFilterListRequest { r.orderBy = &orderBy return r @@ -109,25 +110,24 @@ FilterList Retrieve DHCP filters. Use this method to retrieve DHCP __Filter__ objects of all types. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFilterListRequest */ func (a *FilterAPIService) FilterList(ctx context.Context) ApiFilterListRequest { return ApiFilterListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListFilterResponse +// @return IpamsvcListFilterResponse func (a *FilterAPIService) FilterListExecute(r ApiFilterListRequest) (*IpamsvcListFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FilterAPIService.FilterList") diff --git a/ipam/api_fixed_address.go b/ipam/api_fixed_address.go index 15ede2e..1608d30 100644 --- a/ipam/api_fixed_address.go +++ b/ipam/api_fixed_address.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type FixedAddressAPI interface { /* - FixedAddressCreate Create the fixed address. + FixedAddressCreate Create the fixed address. - Use this method to create a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to create a __FixedAddress__ object. +The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest @@ -37,27 +38,27 @@ type FixedAddressAPI interface { // @return IpamsvcCreateFixedAddressResponse FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) /* - FixedAddressDelete Move the fixed address to the recycle bin. + FixedAddressDelete Move the fixed address to the recycle bin. - Use this method to move a __FixedAddress__ object to the recycle bin. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to move a __FixedAddress__ object to the recycle bin. +The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest // FixedAddressDeleteExecute executes the request FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) /* - FixedAddressList Retrieve fixed addresses. + FixedAddressList Retrieve fixed addresses. - Use this method to retrieve __FixedAddress__ objects. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve __FixedAddress__ objects. +The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ FixedAddressList(ctx context.Context) ApiFixedAddressListRequest @@ -65,14 +66,14 @@ type FixedAddressAPI interface { // @return IpamsvcListFixedAddressResponse FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) /* - FixedAddressRead Retrieve the fixed address. + FixedAddressRead Retrieve the fixed address. - Use this method to retrieve a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve a __FixedAddress__ object. +The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest @@ -80,14 +81,14 @@ type FixedAddressAPI interface { // @return IpamsvcReadFixedAddressResponse FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) /* - FixedAddressUpdate Update the fixed address. + FixedAddressUpdate Update the fixed address. - Use this method to update a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to update a __FixedAddress__ object. +The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest @@ -100,10 +101,10 @@ type FixedAddressAPI interface { type FixedAddressAPIService internal.Service type ApiFixedAddressCreateRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - body *IpamsvcFixedAddress - inherit *string + body *IpamsvcFixedAddress + inherit *string } func (r ApiFixedAddressCreateRequest) Body(body IpamsvcFixedAddress) ApiFixedAddressCreateRequest { @@ -127,25 +128,24 @@ FixedAddressCreate Create the fixed address. Use this method to create a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ func (a *FixedAddressAPIService) FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest { return ApiFixedAddressCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateFixedAddressResponse +// @return IpamsvcCreateFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateFixedAddressResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressCreate") @@ -182,16 +182,16 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -237,9 +237,9 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea } type ApiFixedAddressDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - id string + id string } func (r ApiFixedAddressDeleteRequest) Execute() (*http.Response, error) { @@ -252,24 +252,24 @@ FixedAddressDelete Move the fixed address to the recycle bin. Use this method to move a __FixedAddress__ object to the recycle bin. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ func (a *FixedAddressAPIService) FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest { return ApiFixedAddressDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *FixedAddressAPIService) FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressDelete") @@ -341,50 +341,50 @@ func (a *FixedAddressAPIService) FixedAddressDeleteExecute(r ApiFixedAddressDele } type ApiFixedAddressListRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string - inherit *string -} - -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string + inherit *string +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiFixedAddressListRequest) Filter(filter string) ApiFixedAddressListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiFixedAddressListRequest) OrderBy(orderBy string) ApiFixedAddressListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFixedAddressListRequest) Fields(fields string) ApiFixedAddressListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiFixedAddressListRequest) Offset(offset int32) ApiFixedAddressListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiFixedAddressListRequest) Limit(limit int32) ApiFixedAddressListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiFixedAddressListRequest) PageToken(pageToken string) ApiFixedAddressListRequest { r.pageToken = &pageToken return r @@ -418,25 +418,24 @@ FixedAddressList Retrieve fixed addresses. Use this method to retrieve __FixedAddress__ objects. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ func (a *FixedAddressAPIService) FixedAddressList(ctx context.Context) ApiFixedAddressListRequest { return ApiFixedAddressListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListFixedAddressResponse +// @return IpamsvcListFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListFixedAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressList") @@ -539,14 +538,14 @@ func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRe } type ApiFixedAddressReadRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFixedAddressReadRequest) Fields(fields string) ApiFixedAddressReadRequest { r.fields = &fields return r @@ -568,27 +567,26 @@ FixedAddressRead Retrieve the fixed address. Use this method to retrieve a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ func (a *FixedAddressAPIService) FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest { return ApiFixedAddressReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadFixedAddressResponse +// @return IpamsvcReadFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadFixedAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressRead") @@ -671,11 +669,11 @@ func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRe } type ApiFixedAddressUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - id string - body *IpamsvcFixedAddress - inherit *string + id string + body *IpamsvcFixedAddress + inherit *string } func (r ApiFixedAddressUpdateRequest) Body(body IpamsvcFixedAddress) ApiFixedAddressUpdateRequest { @@ -699,27 +697,26 @@ FixedAddressUpdate Update the fixed address. Use this method to update a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ func (a *FixedAddressAPIService) FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest { return ApiFixedAddressUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateFixedAddressResponse +// @return IpamsvcUpdateFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpdateRequest) (*IpamsvcUpdateFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateFixedAddressResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressUpdate") @@ -757,16 +754,16 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_global.go b/ipam/api_global.go index d1f14ea..32ae434 100644 --- a/ipam/api_global.go +++ b/ipam/api_global.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type GlobalAPI interface { /* - GlobalRead Retrieve the global configuration. + GlobalRead Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. +The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest @@ -37,14 +38,14 @@ type GlobalAPI interface { // @return IpamsvcReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) /* - GlobalRead2 Retrieve the global configuration. + GlobalRead2 Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. +The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request @@ -52,13 +53,13 @@ type GlobalAPI interface { // @return IpamsvcReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) /* - GlobalUpdate Update the global configuration. + GlobalUpdate Update the global configuration. - Use this method to update the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. +The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest @@ -66,14 +67,14 @@ type GlobalAPI interface { // @return IpamsvcUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) /* - GlobalUpdate2 Update the global configuration. + GlobalUpdate2 Update the global configuration. - Use this method to update the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. +The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request @@ -86,12 +87,12 @@ type GlobalAPI interface { type GlobalAPIService internal.Service type ApiGlobalReadRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - fields *string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalReadRequest) Fields(fields string) ApiGlobalReadRequest { r.fields = &fields return r @@ -107,25 +108,24 @@ GlobalRead Retrieve the global configuration. Use this method to retrieve the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest { return ApiGlobalReadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcReadGlobalResponse +// @return IpamsvcReadGlobalResponse func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead") @@ -204,13 +204,13 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcRe } type ApiGlobalRead2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalRead2Request) Fields(fields string) ApiGlobalRead2Request { r.fields = &fields return r @@ -226,27 +226,26 @@ GlobalRead2 Retrieve the global configuration. Use this method to retrieve the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request { return ApiGlobalRead2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadGlobalResponse +// @return IpamsvcReadGlobalResponse func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead2") @@ -326,9 +325,9 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*Ipamsvc } type ApiGlobalUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - body *IpamsvcGlobal + body *IpamsvcGlobal } func (r ApiGlobalUpdateRequest) Body(body IpamsvcGlobal) ApiGlobalUpdateRequest { @@ -346,25 +345,24 @@ GlobalUpdate Update the global configuration. Use this method to update the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest { return ApiGlobalUpdateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcUpdateGlobalResponse +// @return IpamsvcUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate") @@ -398,8 +396,8 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -445,10 +443,10 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams } type ApiGlobalUpdate2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - body *IpamsvcGlobal + id string + body *IpamsvcGlobal } func (r ApiGlobalUpdate2Request) Body(body IpamsvcGlobal) ApiGlobalUpdate2Request { @@ -466,27 +464,26 @@ GlobalUpdate2 Update the global configuration. Use this method to update the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request { return ApiGlobalUpdate2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateGlobalResponse +// @return IpamsvcUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*IpamsvcUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate2") @@ -521,8 +518,8 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Ipa if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_ha_group.go b/ipam/api_ha_group.go index 06a4fc8..6e3bae2 100644 --- a/ipam/api_ha_group.go +++ b/ipam/api_ha_group.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type HaGroupAPI interface { /* - HaGroupCreate Create the HA group. + HaGroupCreate Create the HA group. - Use this method to create an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to create an __HAGroup__ object. +The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest @@ -37,27 +38,27 @@ type HaGroupAPI interface { // @return IpamsvcCreateHAGroupResponse HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) /* - HaGroupDelete Delete the HA group. + HaGroupDelete Delete the HA group. - Use this method to delete an __HAGroup__ object. - The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to delete an __HAGroup__ object. +The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest // HaGroupDeleteExecute executes the request HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) /* - HaGroupList Retrieve HA groups. + HaGroupList Retrieve HA groups. - Use this method to retrieve __HAGroup__ objects. - The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve __HAGroup__ objects. +The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ HaGroupList(ctx context.Context) ApiHaGroupListRequest @@ -65,14 +66,14 @@ type HaGroupAPI interface { // @return IpamsvcListHAGroupResponse HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) /* - HaGroupRead Retrieve the HA group. + HaGroupRead Retrieve the HA group. - Use this method to retrieve an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve an __HAGroup__ object. +The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest @@ -80,14 +81,14 @@ type HaGroupAPI interface { // @return IpamsvcReadHAGroupResponse HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) /* - HaGroupUpdate Update the HA group. + HaGroupUpdate Update the HA group. - Use this method to update an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to update an __HAGroup__ object. +The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest @@ -100,9 +101,9 @@ type HaGroupAPI interface { type HaGroupAPIService internal.Service type ApiHaGroupCreateRequest struct { - ctx context.Context + ctx context.Context ApiService HaGroupAPI - body *IpamsvcHAGroup + body *IpamsvcHAGroup } func (r ApiHaGroupCreateRequest) Body(body IpamsvcHAGroup) ApiHaGroupCreateRequest { @@ -120,25 +121,24 @@ HaGroupCreate Create the HA group. Use this method to create an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ func (a *HaGroupAPIService) HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest { return ApiHaGroupCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateHAGroupResponse +// @return IpamsvcCreateHAGroupResponse func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateHAGroupResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupCreate") @@ -172,16 +172,16 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip } type ApiHaGroupDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService HaGroupAPI - id string + id string } func (r ApiHaGroupDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ HaGroupDelete Delete the HA group. Use this method to delete an __HAGroup__ object. The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ func (a *HaGroupAPIService) HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest { return ApiHaGroupDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *HaGroupAPIService) HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupDelete") @@ -331,50 +331,50 @@ func (a *HaGroupAPIService) HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*ht } type ApiHaGroupListRequest struct { - ctx context.Context - ApiService HaGroupAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string + ctx context.Context + ApiService HaGroupAPI + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string collectStats *bool } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHaGroupListRequest) Filter(filter string) ApiHaGroupListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHaGroupListRequest) OrderBy(orderBy string) ApiHaGroupListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHaGroupListRequest) Fields(fields string) ApiHaGroupListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHaGroupListRequest) Offset(offset int32) ApiHaGroupListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHaGroupListRequest) Limit(limit int32) ApiHaGroupListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHaGroupListRequest) PageToken(pageToken string) ApiHaGroupListRequest { r.pageToken = &pageToken return r @@ -408,25 +408,24 @@ HaGroupList Retrieve HA groups. Use this method to retrieve __HAGroup__ objects. The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ func (a *HaGroupAPIService) HaGroupList(ctx context.Context) ApiHaGroupListRequest { return ApiHaGroupListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListHAGroupResponse +// @return IpamsvcListHAGroupResponse func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListHAGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupList") @@ -529,14 +528,14 @@ func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*Ipamsv } type ApiHaGroupReadRequest struct { - ctx context.Context - ApiService HaGroupAPI - id string - fields *string + ctx context.Context + ApiService HaGroupAPI + id string + fields *string collectStats *bool } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHaGroupReadRequest) Fields(fields string) ApiHaGroupReadRequest { r.fields = &fields return r @@ -558,27 +557,26 @@ HaGroupRead Retrieve the HA group. Use this method to retrieve an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ func (a *HaGroupAPIService) HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest { return ApiHaGroupReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadHAGroupResponse +// @return IpamsvcReadHAGroupResponse func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadHAGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupRead") @@ -661,10 +659,10 @@ func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*Ipamsv } type ApiHaGroupUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HaGroupAPI - id string - body *IpamsvcHAGroup + id string + body *IpamsvcHAGroup } func (r ApiHaGroupUpdateRequest) Body(body IpamsvcHAGroup) ApiHaGroupUpdateRequest { @@ -682,27 +680,26 @@ HaGroupUpdate Update the HA group. Use this method to update an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ func (a *HaGroupAPIService) HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest { return ApiHaGroupUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateHAGroupResponse +// @return IpamsvcUpdateHAGroupResponse func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*IpamsvcUpdateHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateHAGroupResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupUpdate") @@ -737,8 +734,8 @@ func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_hardware_filter.go b/ipam/api_hardware_filter.go index 18649ed..22a0cdc 100644 --- a/ipam/api_hardware_filter.go +++ b/ipam/api_hardware_filter.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type HardwareFilterAPI interface { /* - HardwareFilterCreate Create the hardware filter. + HardwareFilterCreate Create the hardware filter. - Use this method to create a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create a __HardwareFilter__ object. +The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest @@ -37,27 +38,27 @@ type HardwareFilterAPI interface { // @return IpamsvcCreateHardwareFilterResponse HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) /* - HardwareFilterDelete Move the hardware filter to the recycle bin. + HardwareFilterDelete Move the hardware filter to the recycle bin. - Use this method to move a __HardwareFilter__ object to the recycle bin. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move a __HardwareFilter__ object to the recycle bin. +The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest // HardwareFilterDeleteExecute executes the request HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) /* - HardwareFilterList Retrieve hardware filters. + HardwareFilterList Retrieve hardware filters. - Use this method to retrieve __HardwareFilter__ objects. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __HardwareFilter__ objects. +The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest @@ -65,14 +66,14 @@ type HardwareFilterAPI interface { // @return IpamsvcListHardwareFilterResponse HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) /* - HardwareFilterRead Retrieve the hardware filter. + HardwareFilterRead Retrieve the hardware filter. - Use this method to retrieve a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve a __HardwareFilter__ object. +The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest @@ -80,14 +81,14 @@ type HardwareFilterAPI interface { // @return IpamsvcReadHardwareFilterResponse HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) /* - HardwareFilterUpdate Update the hardware filter. + HardwareFilterUpdate Update the hardware filter. - Use this method to update a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update a __HardwareFilter__ object. +The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest @@ -100,9 +101,9 @@ type HardwareFilterAPI interface { type HardwareFilterAPIService internal.Service type ApiHardwareFilterCreateRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - body *IpamsvcHardwareFilter + body *IpamsvcHardwareFilter } func (r ApiHardwareFilterCreateRequest) Body(body IpamsvcHardwareFilter) ApiHardwareFilterCreateRequest { @@ -120,25 +121,24 @@ HardwareFilterCreate Create the hardware filter. Use this method to create a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ func (a *HardwareFilterAPIService) HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest { return ApiHardwareFilterCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateHardwareFilterResponse +// @return IpamsvcCreateHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateHardwareFilterResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterCreate") @@ -172,16 +172,16 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt } type ApiHardwareFilterDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - id string + id string } func (r ApiHardwareFilterDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ HardwareFilterDelete Move the hardware filter to the recycle bin. Use this method to move a __HardwareFilter__ object to the recycle bin. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ func (a *HardwareFilterAPIService) HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest { return ApiHardwareFilterDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *HardwareFilterAPIService) HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterDelete") @@ -331,49 +331,49 @@ func (a *HardwareFilterAPIService) HardwareFilterDeleteExecute(r ApiHardwareFilt } type ApiHardwareFilterListRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHardwareFilterListRequest) Filter(filter string) ApiHardwareFilterListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHardwareFilterListRequest) OrderBy(orderBy string) ApiHardwareFilterListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHardwareFilterListRequest) Fields(fields string) ApiHardwareFilterListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHardwareFilterListRequest) Offset(offset int32) ApiHardwareFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHardwareFilterListRequest) Limit(limit int32) ApiHardwareFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHardwareFilterListRequest) PageToken(pageToken string) ApiHardwareFilterListRequest { r.pageToken = &pageToken return r @@ -401,25 +401,24 @@ HardwareFilterList Retrieve hardware filters. Use this method to retrieve __HardwareFilter__ objects. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ func (a *HardwareFilterAPIService) HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest { return ApiHardwareFilterListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListHardwareFilterResponse +// @return IpamsvcListHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListHardwareFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterList") @@ -519,13 +518,13 @@ func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilter } type ApiHardwareFilterReadRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHardwareFilterReadRequest) Fields(fields string) ApiHardwareFilterReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ HardwareFilterRead Retrieve the hardware filter. Use this method to retrieve a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ func (a *HardwareFilterAPIService) HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest { return ApiHardwareFilterReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadHardwareFilterResponse +// @return IpamsvcReadHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadHardwareFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterRead") @@ -641,10 +639,10 @@ func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilter } type ApiHardwareFilterUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - id string - body *IpamsvcHardwareFilter + id string + body *IpamsvcHardwareFilter } func (r ApiHardwareFilterUpdateRequest) Body(body IpamsvcHardwareFilter) ApiHardwareFilterUpdateRequest { @@ -662,27 +660,26 @@ HardwareFilterUpdate Update the hardware filter. Use this method to update a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ func (a *HardwareFilterAPIService) HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest { return ApiHardwareFilterUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateHardwareFilterResponse +// @return IpamsvcUpdateHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilterUpdateRequest) (*IpamsvcUpdateHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateHardwareFilterResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterUpdate") @@ -717,16 +714,16 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_ip_space.go b/ipam/api_ip_space.go index ac81c8b..7873140 100644 --- a/ipam/api_ip_space.go +++ b/ipam/api_ip_space.go @@ -18,23 +18,24 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type IpSpaceAPI interface { /* - IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. + IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. - Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. - The __IPSpace__ object represents an entire address space. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. +The __IPSpace__ object represents an entire address space. +The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. - The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. +The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. +The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest @@ -42,14 +43,14 @@ type IpSpaceAPI interface { // @return IpamsvcBulkCopyIPSpaceResponse IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) /* - IpSpaceCopy Copy the IP space. + IpSpaceCopy Copy the IP space. - Use this method to copy an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to copy an __IPSpace__ object. +The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest @@ -57,13 +58,13 @@ type IpSpaceAPI interface { // @return IpamsvcCopyIPSpaceResponse IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) /* - IpSpaceCreate Create the IP space. + IpSpaceCreate Create the IP space. - Use this method to create an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to create an __IPSpace__ object. +The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest @@ -71,27 +72,27 @@ type IpSpaceAPI interface { // @return IpamsvcCreateIPSpaceResponse IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) /* - IpSpaceDelete Move the IP space to the recycle bin. + IpSpaceDelete Move the IP space to the recycle bin. - Use this method to move an __IPSpace__ object to the recycle bin. - The __IPSpace__ object represents an entire address space. + Use this method to move an __IPSpace__ object to the recycle bin. +The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest // IpSpaceDeleteExecute executes the request IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) /* - IpSpaceList Retrieve IP spaces. + IpSpaceList Retrieve IP spaces. - Use this method to retrieve __IPSpace__ objects. - The __IPSpace__ object represents an entire address space. + Use this method to retrieve __IPSpace__ objects. +The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ IpSpaceList(ctx context.Context) ApiIpSpaceListRequest @@ -99,14 +100,14 @@ type IpSpaceAPI interface { // @return IpamsvcListIPSpaceResponse IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) /* - IpSpaceRead Retrieve the IP space. + IpSpaceRead Retrieve the IP space. - Use this method to retrieve an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to retrieve an __IPSpace__ object. +The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest @@ -114,14 +115,14 @@ type IpSpaceAPI interface { // @return IpamsvcReadIPSpaceResponse IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) /* - IpSpaceUpdate Update the IP space. + IpSpaceUpdate Update the IP space. - Use this method to update an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to update an __IPSpace__ object. +The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest @@ -134,9 +135,9 @@ type IpSpaceAPI interface { type IpSpaceAPIService internal.Service type ApiIpSpaceBulkCopyRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - body *IpamsvcBulkCopyIPSpace + body *IpamsvcBulkCopyIPSpace } func (r ApiIpSpaceBulkCopyRequest) Body(body IpamsvcBulkCopyIPSpace) ApiIpSpaceBulkCopyRequest { @@ -159,25 +160,24 @@ The __Subnet__ object represents a set of addresses from which addresses are ass The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ func (a *IpSpaceAPIService) IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest { return ApiIpSpaceBulkCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcBulkCopyIPSpaceResponse +// @return IpamsvcBulkCopyIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcBulkCopyIPSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcBulkCopyIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceBulkCopy") @@ -211,8 +211,8 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -258,10 +258,10 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) } type ApiIpSpaceCopyRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string - body *IpamsvcCopyIPSpace + id string + body *IpamsvcCopyIPSpace } func (r ApiIpSpaceCopyRequest) Body(body IpamsvcCopyIPSpace) ApiIpSpaceCopyRequest { @@ -279,27 +279,26 @@ IpSpaceCopy Copy the IP space. Use this method to copy an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ func (a *IpSpaceAPIService) IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest { return ApiIpSpaceCopyRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCopyIPSpaceResponse +// @return IpamsvcCopyIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCopyIPSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCopyIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceCopy") @@ -334,8 +333,8 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -381,10 +380,10 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv } type ApiIpSpaceCreateRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - body *IpamsvcIPSpace - inherit *string + body *IpamsvcIPSpace + inherit *string } func (r ApiIpSpaceCreateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceCreateRequest { @@ -408,25 +407,24 @@ IpSpaceCreate Create the IP space. Use this method to create an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ func (a *IpSpaceAPIService) IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest { return ApiIpSpaceCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateIPSpaceResponse +// @return IpamsvcCreateIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateIPSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceCreate") @@ -463,16 +461,16 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -518,9 +516,9 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip } type ApiIpSpaceDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string + id string } func (r ApiIpSpaceDeleteRequest) Execute() (*http.Response, error) { @@ -533,24 +531,24 @@ IpSpaceDelete Move the IP space to the recycle bin. Use this method to move an __IPSpace__ object to the recycle bin. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ func (a *IpSpaceAPIService) IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest { return ApiIpSpaceDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *IpSpaceAPIService) IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceDelete") @@ -622,50 +620,50 @@ func (a *IpSpaceAPIService) IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*ht } type ApiIpSpaceListRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string - inherit *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpSpaceListRequest) Fields(fields string) ApiIpSpaceListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiIpSpaceListRequest) Filter(filter string) ApiIpSpaceListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiIpSpaceListRequest) Offset(offset int32) ApiIpSpaceListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiIpSpaceListRequest) Limit(limit int32) ApiIpSpaceListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiIpSpaceListRequest) PageToken(pageToken string) ApiIpSpaceListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpSpaceListRequest) OrderBy(orderBy string) ApiIpSpaceListRequest { r.orderBy = &orderBy return r @@ -699,25 +697,24 @@ IpSpaceList Retrieve IP spaces. Use this method to retrieve __IPSpace__ objects. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ func (a *IpSpaceAPIService) IpSpaceList(ctx context.Context) ApiIpSpaceListRequest { return ApiIpSpaceListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListIPSpaceResponse +// @return IpamsvcListIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListIPSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceList") @@ -820,14 +817,14 @@ func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*Ipamsv } type ApiIpSpaceReadRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpSpaceReadRequest) Fields(fields string) ApiIpSpaceReadRequest { r.fields = &fields return r @@ -849,27 +846,26 @@ IpSpaceRead Retrieve the IP space. Use this method to retrieve an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ func (a *IpSpaceAPIService) IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest { return ApiIpSpaceReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadIPSpaceResponse +// @return IpamsvcReadIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadIPSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceRead") @@ -952,11 +948,11 @@ func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*Ipamsv } type ApiIpSpaceUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string - body *IpamsvcIPSpace - inherit *string + id string + body *IpamsvcIPSpace + inherit *string } func (r ApiIpSpaceUpdateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceUpdateRequest { @@ -980,27 +976,26 @@ IpSpaceUpdate Update the IP space. Use this method to update an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ func (a *IpSpaceAPIService) IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest { return ApiIpSpaceUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateIPSpaceResponse +// @return IpamsvcUpdateIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*IpamsvcUpdateIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateIPSpaceResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceUpdate") @@ -1038,16 +1033,16 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_ipam_host.go b/ipam/api_ipam_host.go index 7e562ec..ab207b7 100644 --- a/ipam/api_ipam_host.go +++ b/ipam/api_ipam_host.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type IpamHostAPI interface { /* - IpamHostCreate Create the IPAM host. + IpamHostCreate Create the IPAM host. - Use this method to create an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to create an __IpamHost__ object. +The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest @@ -37,27 +38,27 @@ type IpamHostAPI interface { // @return IpamsvcCreateIpamHostResponse IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) /* - IpamHostDelete Move the IPAM host to the recycle bin. + IpamHostDelete Move the IPAM host to the recycle bin. - Use this method to move an __IpamHost__ object to the recycle bin. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to move an __IpamHost__ object to the recycle bin. +The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest // IpamHostDeleteExecute executes the request IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) /* - IpamHostList Retrieve the IPAM hosts. + IpamHostList Retrieve the IPAM hosts. - Use this method to retrieve __IpamHost__ objects. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve __IpamHost__ objects. +The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ IpamHostList(ctx context.Context) ApiIpamHostListRequest @@ -65,14 +66,14 @@ type IpamHostAPI interface { // @return IpamsvcListIpamHostResponse IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) /* - IpamHostRead Retrieve the IPAM host. + IpamHostRead Retrieve the IPAM host. - Use this method to retrieve an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve an __IpamHost__ object. +The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest @@ -80,14 +81,14 @@ type IpamHostAPI interface { // @return IpamsvcReadIpamHostResponse IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) /* - IpamHostUpdate Update the IPAM host. + IpamHostUpdate Update the IPAM host. - Use this method to update an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to update an __IpamHost__ object. +The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest @@ -100,9 +101,9 @@ type IpamHostAPI interface { type IpamHostAPIService internal.Service type ApiIpamHostCreateRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - body *IpamsvcIpamHost + body *IpamsvcIpamHost } func (r ApiIpamHostCreateRequest) Body(body IpamsvcIpamHost) ApiIpamHostCreateRequest { @@ -120,25 +121,24 @@ IpamHostCreate Create the IPAM host. Use this method to create an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ func (a *IpamHostAPIService) IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest { return ApiIpamHostCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateIpamHostResponse +// @return IpamsvcCreateIpamHostResponse func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateIpamHostResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostCreate") @@ -172,16 +172,16 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( } type ApiIpamHostDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - id string + id string } func (r ApiIpamHostDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ IpamHostDelete Move the IPAM host to the recycle bin. Use this method to move an __IpamHost__ object to the recycle bin. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ func (a *IpamHostAPIService) IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest { return ApiIpamHostDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *IpamHostAPIService) IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostDelete") @@ -331,49 +331,49 @@ func (a *IpamHostAPIService) IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) ( } type ApiIpamHostListRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - fields *string - orderBy *string - filter *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string + fields *string + orderBy *string + filter *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpamHostListRequest) Fields(fields string) ApiIpamHostListRequest { r.fields = &fields return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpamHostListRequest) OrderBy(orderBy string) ApiIpamHostListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiIpamHostListRequest) Filter(filter string) ApiIpamHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiIpamHostListRequest) Offset(offset int32) ApiIpamHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiIpamHostListRequest) Limit(limit int32) ApiIpamHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiIpamHostListRequest) PageToken(pageToken string) ApiIpamHostListRequest { r.pageToken = &pageToken return r @@ -401,25 +401,24 @@ IpamHostList Retrieve the IPAM hosts. Use this method to retrieve __IpamHost__ objects. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ func (a *IpamHostAPIService) IpamHostList(ctx context.Context) ApiIpamHostListRequest { return ApiIpamHostListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListIpamHostResponse +// @return IpamsvcListIpamHostResponse func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListIpamHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostList") @@ -519,20 +518,20 @@ func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*Ipa } type ApiIpamHostReadRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - id string - orderBy *string - fields *string + id string + orderBy *string + fields *string } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpamHostReadRequest) OrderBy(orderBy string) ApiIpamHostReadRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpamHostReadRequest) Fields(fields string) ApiIpamHostReadRequest { r.fields = &fields return r @@ -548,27 +547,26 @@ IpamHostRead Retrieve the IPAM host. Use this method to retrieve an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ func (a *IpamHostAPIService) IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest { return ApiIpamHostReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadIpamHostResponse +// @return IpamsvcReadIpamHostResponse func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadIpamHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostRead") @@ -651,10 +649,10 @@ func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*Ipa } type ApiIpamHostUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - id string - body *IpamsvcIpamHost + id string + body *IpamsvcIpamHost } func (r ApiIpamHostUpdateRequest) Body(body IpamsvcIpamHost) ApiIpamHostUpdateRequest { @@ -672,27 +670,26 @@ IpamHostUpdate Update the IPAM host. Use this method to update an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ func (a *IpamHostAPIService) IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest { return ApiIpamHostUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateIpamHostResponse +// @return IpamsvcUpdateIpamHostResponse func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) (*IpamsvcUpdateIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateIpamHostResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostUpdate") @@ -727,16 +724,16 @@ func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_leases_command.go b/ipam/api_leases_command.go index 02fb0c3..15bce95 100644 --- a/ipam/api_leases_command.go +++ b/ipam/api_leases_command.go @@ -17,18 +17,19 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type LeasesCommandAPI interface { /* - LeasesCommandCreate Perform actions like clearing DHCP lease(s). + LeasesCommandCreate Perform actions like clearing DHCP lease(s). - Use this method to create a __LeasesCommand__ object. - The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). + Use this method to create a __LeasesCommand__ object. +The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest @@ -41,9 +42,9 @@ type LeasesCommandAPI interface { type LeasesCommandAPIService internal.Service type ApiLeasesCommandCreateRequest struct { - ctx context.Context + ctx context.Context ApiService LeasesCommandAPI - body *IpamsvcLeasesCommand + body *IpamsvcLeasesCommand } func (r ApiLeasesCommandCreateRequest) Body(body IpamsvcLeasesCommand) ApiLeasesCommandCreateRequest { @@ -61,25 +62,24 @@ LeasesCommandCreate Perform actions like clearing DHCP lease(s). Use this method to create a __LeasesCommand__ object. The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ func (a *LeasesCommandAPIService) LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest { return ApiLeasesCommandCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateLeasesCommandResponse +// @return IpamsvcCreateLeasesCommandResponse func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandCreateRequest) (*IpamsvcCreateLeasesCommandResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateLeasesCommandResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateLeasesCommandResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LeasesCommandAPIService.LeasesCommandCreate") @@ -113,8 +113,8 @@ func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_code.go b/ipam/api_option_code.go index 17006da..1dccb2a 100644 --- a/ipam/api_option_code.go +++ b/ipam/api_option_code.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type OptionCodeAPI interface { /* - OptionCodeCreate Create the DHCP option code. + OptionCodeCreate Create the DHCP option code. - Use this method to create an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to create an __OptionCode__ object. +The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest @@ -37,27 +38,27 @@ type OptionCodeAPI interface { // @return IpamsvcCreateOptionCodeResponse OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) /* - OptionCodeDelete Delete the DHCP option code. + OptionCodeDelete Delete the DHCP option code. - Use this method to delete an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to delete an __OptionCode__ object. +The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest // OptionCodeDeleteExecute executes the request OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) /* - OptionCodeList Retrieve DHCP option codes. + OptionCodeList Retrieve DHCP option codes. - Use this method to retrieve __OptionCode__ objects. - The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve __OptionCode__ objects. +The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ OptionCodeList(ctx context.Context) ApiOptionCodeListRequest @@ -65,14 +66,14 @@ type OptionCodeAPI interface { // @return IpamsvcListOptionCodeResponse OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) /* - OptionCodeRead Retrieve the DHCP option code. + OptionCodeRead Retrieve the DHCP option code. - Use this method to retrieve an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve an __OptionCode__ object. +The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest @@ -80,14 +81,14 @@ type OptionCodeAPI interface { // @return IpamsvcReadOptionCodeResponse OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) /* - OptionCodeUpdate Update the DHCP option code. + OptionCodeUpdate Update the DHCP option code. - Use this method to update an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to update an __OptionCode__ object. +The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest @@ -100,9 +101,9 @@ type OptionCodeAPI interface { type OptionCodeAPIService internal.Service type ApiOptionCodeCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - body *IpamsvcOptionCode + body *IpamsvcOptionCode } func (r ApiOptionCodeCreateRequest) Body(body IpamsvcOptionCode) ApiOptionCodeCreateRequest { @@ -120,25 +121,24 @@ OptionCodeCreate Create the DHCP option code. Use this method to create an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ func (a *OptionCodeAPIService) OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest { return ApiOptionCodeCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateOptionCodeResponse +// @return IpamsvcCreateOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionCodeResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeCreate") @@ -172,8 +172,8 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -219,9 +219,9 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ } type ApiOptionCodeDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - id string + id string } func (r ApiOptionCodeDeleteRequest) Execute() (*http.Response, error) { @@ -234,24 +234,24 @@ OptionCodeDelete Delete the DHCP option code. Use this method to delete an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ func (a *OptionCodeAPIService) OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest { return ApiOptionCodeDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionCodeAPIService) OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeDelete") @@ -323,47 +323,47 @@ func (a *OptionCodeAPIService) OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequ } type ApiOptionCodeListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionCodeListRequest) Fields(fields string) ApiOptionCodeListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionCodeListRequest) Filter(filter string) ApiOptionCodeListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionCodeListRequest) Offset(offset int32) ApiOptionCodeListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionCodeListRequest) Limit(limit int32) ApiOptionCodeListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionCodeListRequest) PageToken(pageToken string) ApiOptionCodeListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionCodeListRequest) OrderBy(orderBy string) ApiOptionCodeListRequest { r.orderBy = &orderBy return r @@ -379,25 +379,24 @@ OptionCodeList Retrieve DHCP option codes. Use this method to retrieve __OptionCode__ objects. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ func (a *OptionCodeAPIService) OptionCodeList(ctx context.Context) ApiOptionCodeListRequest { return ApiOptionCodeListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListOptionCodeResponse +// @return IpamsvcListOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionCodeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeList") @@ -491,13 +490,13 @@ func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) } type ApiOptionCodeReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionCodeReadRequest) Fields(fields string) ApiOptionCodeReadRequest { r.fields = &fields return r @@ -513,27 +512,26 @@ OptionCodeRead Retrieve the DHCP option code. Use this method to retrieve an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ func (a *OptionCodeAPIService) OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest { return ApiOptionCodeReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadOptionCodeResponse +// @return IpamsvcReadOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionCodeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeRead") @@ -613,10 +611,10 @@ func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) } type ApiOptionCodeUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - id string - body *IpamsvcOptionCode + id string + body *IpamsvcOptionCode } func (r ApiOptionCodeUpdateRequest) Body(body IpamsvcOptionCode) ApiOptionCodeUpdateRequest { @@ -634,27 +632,26 @@ OptionCodeUpdate Update the DHCP option code. Use this method to update an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ func (a *OptionCodeAPIService) OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest { return ApiOptionCodeUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateOptionCodeResponse +// @return IpamsvcUpdateOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequest) (*IpamsvcUpdateOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionCodeResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeUpdate") @@ -689,8 +686,8 @@ func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_filter.go b/ipam/api_option_filter.go index f49e936..766d53f 100644 --- a/ipam/api_option_filter.go +++ b/ipam/api_option_filter.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type OptionFilterAPI interface { /* - OptionFilterCreate Create the DHCP option filter. + OptionFilterCreate Create the DHCP option filter. - Use this method to create an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create an __OptionFilter__ object. +The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest @@ -37,27 +38,27 @@ type OptionFilterAPI interface { // @return IpamsvcCreateOptionFilterResponse OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) /* - OptionFilterDelete Move the DHCP option filter to the recycle bin. + OptionFilterDelete Move the DHCP option filter to the recycle bin. - Use this method to move an __OptionFilter__ object to the recycle bin. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move an __OptionFilter__ object to the recycle bin. +The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest // OptionFilterDeleteExecute executes the request OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) /* - OptionFilterList Retrieve DHCP option filters. + OptionFilterList Retrieve DHCP option filters. - Use this method to retrieve __OptionFilter__ objects. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __OptionFilter__ objects. +The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ OptionFilterList(ctx context.Context) ApiOptionFilterListRequest @@ -65,14 +66,14 @@ type OptionFilterAPI interface { // @return IpamsvcListOptionFilterResponse OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) /* - OptionFilterRead Retrieve the DHCP option filter. + OptionFilterRead Retrieve the DHCP option filter. - Use this method to retrieve an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve an __OptionFilter__ object. +The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest @@ -80,14 +81,14 @@ type OptionFilterAPI interface { // @return IpamsvcReadOptionFilterResponse OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) /* - OptionFilterUpdate Update the DHCP option filter. + OptionFilterUpdate Update the DHCP option filter. - Use this method to update an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update an __OptionFilter__ object. +The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest @@ -100,9 +101,9 @@ type OptionFilterAPI interface { type OptionFilterAPIService internal.Service type ApiOptionFilterCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - body *IpamsvcOptionFilter + body *IpamsvcOptionFilter } func (r ApiOptionFilterCreateRequest) Body(body IpamsvcOptionFilter) ApiOptionFilterCreateRequest { @@ -120,25 +121,24 @@ OptionFilterCreate Create the DHCP option filter. Use this method to create an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ func (a *OptionFilterAPIService) OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest { return ApiOptionFilterCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateOptionFilterResponse +// @return IpamsvcCreateOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionFilterResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterCreate") @@ -172,16 +172,16 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea } type ApiOptionFilterDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - id string + id string } func (r ApiOptionFilterDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ OptionFilterDelete Move the DHCP option filter to the recycle bin. Use this method to move an __OptionFilter__ object to the recycle bin. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ func (a *OptionFilterAPIService) OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest { return ApiOptionFilterDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionFilterAPIService) OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterDelete") @@ -331,49 +331,49 @@ func (a *OptionFilterAPIService) OptionFilterDeleteExecute(r ApiOptionFilterDele } type ApiOptionFilterListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionFilterListRequest) Fields(fields string) ApiOptionFilterListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionFilterListRequest) Filter(filter string) ApiOptionFilterListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionFilterListRequest) Offset(offset int32) ApiOptionFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionFilterListRequest) Limit(limit int32) ApiOptionFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionFilterListRequest) PageToken(pageToken string) ApiOptionFilterListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionFilterListRequest) OrderBy(orderBy string) ApiOptionFilterListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ OptionFilterList Retrieve DHCP option filters. Use this method to retrieve __OptionFilter__ objects. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ func (a *OptionFilterAPIService) OptionFilterList(ctx context.Context) ApiOptionFilterListRequest { return ApiOptionFilterListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListOptionFilterResponse +// @return IpamsvcListOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterList") @@ -519,13 +518,13 @@ func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRe } type ApiOptionFilterReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionFilterReadRequest) Fields(fields string) ApiOptionFilterReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ OptionFilterRead Retrieve the DHCP option filter. Use this method to retrieve an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ func (a *OptionFilterAPIService) OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest { return ApiOptionFilterReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadOptionFilterResponse +// @return IpamsvcReadOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterRead") @@ -641,10 +639,10 @@ func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRe } type ApiOptionFilterUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - id string - body *IpamsvcOptionFilter + id string + body *IpamsvcOptionFilter } func (r ApiOptionFilterUpdateRequest) Body(body IpamsvcOptionFilter) ApiOptionFilterUpdateRequest { @@ -662,27 +660,26 @@ OptionFilterUpdate Update the DHCP option filter. Use this method to update an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ func (a *OptionFilterAPIService) OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest { return ApiOptionFilterUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateOptionFilterResponse +// @return IpamsvcUpdateOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpdateRequest) (*IpamsvcUpdateOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionFilterResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterUpdate") @@ -717,16 +714,16 @@ func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_group.go b/ipam/api_option_group.go index b91cbbd..3bad02a 100644 --- a/ipam/api_option_group.go +++ b/ipam/api_option_group.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type OptionGroupAPI interface { /* - OptionGroupCreate Create the DHCP option group. + OptionGroupCreate Create the DHCP option group. - Use this method to create an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to create an __OptionGroup__ object. +The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest @@ -37,27 +38,27 @@ type OptionGroupAPI interface { // @return IpamsvcCreateOptionGroupResponse OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) /* - OptionGroupDelete Move the DHCP option group to the recycle bin. + OptionGroupDelete Move the DHCP option group to the recycle bin. - Use this method to move an __OptionGroup__ object to the recycle bin. - The __OptionGroup__ object is a named collection of options. + Use this method to move an __OptionGroup__ object to the recycle bin. +The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest // OptionGroupDeleteExecute executes the request OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) /* - OptionGroupList Retrieve DHCP option groups. + OptionGroupList Retrieve DHCP option groups. - Use this method to retrieve __OptionGroup__ objects. - The __OptionGroup__ object is a named collection of options. + Use this method to retrieve __OptionGroup__ objects. +The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ OptionGroupList(ctx context.Context) ApiOptionGroupListRequest @@ -65,14 +66,14 @@ type OptionGroupAPI interface { // @return IpamsvcListOptionGroupResponse OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) /* - OptionGroupRead Retrieve the DHCP option group. + OptionGroupRead Retrieve the DHCP option group. - Use this method to retrieve an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to retrieve an __OptionGroup__ object. +The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest @@ -80,14 +81,14 @@ type OptionGroupAPI interface { // @return IpamsvcReadOptionGroupResponse OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) /* - OptionGroupUpdate Update the DHCP option group. + OptionGroupUpdate Update the DHCP option group. - Use this method to update an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to update an __OptionGroup__ object. +The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest @@ -100,9 +101,9 @@ type OptionGroupAPI interface { type OptionGroupAPIService internal.Service type ApiOptionGroupCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - body *IpamsvcOptionGroup + body *IpamsvcOptionGroup } func (r ApiOptionGroupCreateRequest) Body(body IpamsvcOptionGroup) ApiOptionGroupCreateRequest { @@ -120,25 +121,24 @@ OptionGroupCreate Create the DHCP option group. Use this method to create an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ func (a *OptionGroupAPIService) OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest { return ApiOptionGroupCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateOptionGroupResponse +// @return IpamsvcCreateOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionGroupResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupCreate") @@ -172,16 +172,16 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR } type ApiOptionGroupDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - id string + id string } func (r ApiOptionGroupDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ OptionGroupDelete Move the DHCP option group to the recycle bin. Use this method to move an __OptionGroup__ object to the recycle bin. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ func (a *OptionGroupAPIService) OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest { return ApiOptionGroupDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionGroupAPIService) OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupDelete") @@ -331,49 +331,49 @@ func (a *OptionGroupAPIService) OptionGroupDeleteExecute(r ApiOptionGroupDeleteR } type ApiOptionGroupListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionGroupListRequest) Fields(fields string) ApiOptionGroupListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionGroupListRequest) Filter(filter string) ApiOptionGroupListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionGroupListRequest) Offset(offset int32) ApiOptionGroupListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionGroupListRequest) Limit(limit int32) ApiOptionGroupListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionGroupListRequest) PageToken(pageToken string) ApiOptionGroupListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionGroupListRequest) OrderBy(orderBy string) ApiOptionGroupListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ OptionGroupList Retrieve DHCP option groups. Use this method to retrieve __OptionGroup__ objects. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ func (a *OptionGroupAPIService) OptionGroupList(ctx context.Context) ApiOptionGroupListRequest { return ApiOptionGroupListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListOptionGroupResponse +// @return IpamsvcListOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupList") @@ -519,13 +518,13 @@ func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListReque } type ApiOptionGroupReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionGroupReadRequest) Fields(fields string) ApiOptionGroupReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ OptionGroupRead Retrieve the DHCP option group. Use this method to retrieve an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ func (a *OptionGroupAPIService) OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest { return ApiOptionGroupReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadOptionGroupResponse +// @return IpamsvcReadOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupRead") @@ -641,10 +639,10 @@ func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadReque } type ApiOptionGroupUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - id string - body *IpamsvcOptionGroup + id string + body *IpamsvcOptionGroup } func (r ApiOptionGroupUpdateRequest) Body(body IpamsvcOptionGroup) ApiOptionGroupUpdateRequest { @@ -662,27 +660,26 @@ OptionGroupUpdate Update the DHCP option group. Use this method to update an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ func (a *OptionGroupAPIService) OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest { return ApiOptionGroupUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateOptionGroupResponse +// @return IpamsvcUpdateOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateRequest) (*IpamsvcUpdateOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionGroupResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupUpdate") @@ -717,16 +714,16 @@ func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_space.go b/ipam/api_option_space.go index babcf62..1bf3c1d 100644 --- a/ipam/api_option_space.go +++ b/ipam/api_option_space.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type OptionSpaceAPI interface { /* - OptionSpaceCreate Create the DHCP option space. + OptionSpaceCreate Create the DHCP option space. - Use this method to create an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to create an __OptionSpace__ object. +The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest @@ -37,27 +38,27 @@ type OptionSpaceAPI interface { // @return IpamsvcCreateOptionSpaceResponse OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) /* - OptionSpaceDelete Move the DHCP option space to the recycle bin. + OptionSpaceDelete Move the DHCP option space to the recycle bin. - Use this method to move an __OptionSpace__ object to the recycle bin. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to move an __OptionSpace__ object to the recycle bin. +The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest // OptionSpaceDeleteExecute executes the request OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) /* - OptionSpaceList Retrieve DHCP option spaces. + OptionSpaceList Retrieve DHCP option spaces. - Use this method to retrieve __OptionSpace__ objects. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve __OptionSpace__ objects. +The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest @@ -65,14 +66,14 @@ type OptionSpaceAPI interface { // @return IpamsvcListOptionSpaceResponse OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) /* - OptionSpaceRead Retrieve the DHCP option space. + OptionSpaceRead Retrieve the DHCP option space. - Use this method to retrieve an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve an __OptionSpace__ object. +The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest @@ -80,14 +81,14 @@ type OptionSpaceAPI interface { // @return IpamsvcReadOptionSpaceResponse OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) /* - OptionSpaceUpdate Update the DHCP option space. + OptionSpaceUpdate Update the DHCP option space. - Use this method to update an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to update an __OptionSpace__ object. +The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest @@ -100,9 +101,9 @@ type OptionSpaceAPI interface { type OptionSpaceAPIService internal.Service type ApiOptionSpaceCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - body *IpamsvcOptionSpace + body *IpamsvcOptionSpace } func (r ApiOptionSpaceCreateRequest) Body(body IpamsvcOptionSpace) ApiOptionSpaceCreateRequest { @@ -120,25 +121,24 @@ OptionSpaceCreate Create the DHCP option space. Use this method to create an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ func (a *OptionSpaceAPIService) OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest { return ApiOptionSpaceCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateOptionSpaceResponse +// @return IpamsvcCreateOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceCreate") @@ -172,16 +172,16 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR } type ApiOptionSpaceDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - id string + id string } func (r ApiOptionSpaceDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ OptionSpaceDelete Move the DHCP option space to the recycle bin. Use this method to move an __OptionSpace__ object to the recycle bin. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ func (a *OptionSpaceAPIService) OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest { return ApiOptionSpaceDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionSpaceAPIService) OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceDelete") @@ -331,49 +331,49 @@ func (a *OptionSpaceAPIService) OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteR } type ApiOptionSpaceListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionSpaceListRequest) Fields(fields string) ApiOptionSpaceListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionSpaceListRequest) Filter(filter string) ApiOptionSpaceListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionSpaceListRequest) Offset(offset int32) ApiOptionSpaceListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionSpaceListRequest) Limit(limit int32) ApiOptionSpaceListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionSpaceListRequest) PageToken(pageToken string) ApiOptionSpaceListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionSpaceListRequest) OrderBy(orderBy string) ApiOptionSpaceListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ OptionSpaceList Retrieve DHCP option spaces. Use this method to retrieve __OptionSpace__ objects. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ func (a *OptionSpaceAPIService) OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest { return ApiOptionSpaceListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListOptionSpaceResponse +// @return IpamsvcListOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceList") @@ -519,13 +518,13 @@ func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListReque } type ApiOptionSpaceReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionSpaceReadRequest) Fields(fields string) ApiOptionSpaceReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ OptionSpaceRead Retrieve the DHCP option space. Use this method to retrieve an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ func (a *OptionSpaceAPIService) OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest { return ApiOptionSpaceReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadOptionSpaceResponse +// @return IpamsvcReadOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceRead") @@ -641,10 +639,10 @@ func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadReque } type ApiOptionSpaceUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - id string - body *IpamsvcOptionSpace + id string + body *IpamsvcOptionSpace } func (r ApiOptionSpaceUpdateRequest) Body(body IpamsvcOptionSpace) ApiOptionSpaceUpdateRequest { @@ -662,27 +660,26 @@ OptionSpaceUpdate Update the DHCP option space. Use this method to update an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ func (a *OptionSpaceAPIService) OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest { return ApiOptionSpaceUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateOptionSpaceResponse +// @return IpamsvcUpdateOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateRequest) (*IpamsvcUpdateOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionSpaceResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceUpdate") @@ -717,16 +714,16 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_range.go b/ipam/api_range.go index e0f0bd6..4b8e6ce 100644 --- a/ipam/api_range.go +++ b/ipam/api_range.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type RangeAPI interface { /* - RangeCreate Create the range. + RangeCreate Create the range. - Use this method to create a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to create a __Range__ object. +A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ RangeCreate(ctx context.Context) ApiRangeCreateRequest @@ -37,14 +38,14 @@ type RangeAPI interface { // @return IpamsvcCreateRangeResponse RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) /* - RangeCreateNextAvailableIP Allocate the next available IP address. + RangeCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. +This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest @@ -52,27 +53,27 @@ type RangeAPI interface { // @return IpamsvcCreateNextAvailableIPResponse RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - RangeDelete Move the range to the recycle bin. + RangeDelete Move the range to the recycle bin. - Use this method to move a __Range__ object to the recycle bin. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to move a __Range__ object to the recycle bin. +A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest // RangeDeleteExecute executes the request RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) /* - RangeList Retrieve ranges. + RangeList Retrieve ranges. - Use this method to retrieve __Range__ objects. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve __Range__ objects. +A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ RangeList(ctx context.Context) ApiRangeListRequest @@ -80,14 +81,14 @@ type RangeAPI interface { // @return IpamsvcListRangeResponse RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) /* - RangeListNextAvailableIP Retrieve the next available IP address. + RangeListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. +This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest @@ -95,14 +96,14 @@ type RangeAPI interface { // @return IpamsvcNextAvailableIPResponse RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - RangeRead Retrieve the range. + RangeRead Retrieve the range. - Use this method to retrieve a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve a __Range__ object. +A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ RangeRead(ctx context.Context, id string) ApiRangeReadRequest @@ -110,14 +111,14 @@ type RangeAPI interface { // @return IpamsvcReadRangeResponse RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) /* - RangeUpdate Update the range. + RangeUpdate Update the range. - Use this method to update a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to update a __Range__ object. +A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest @@ -130,10 +131,10 @@ type RangeAPI interface { type RangeAPIService internal.Service type ApiRangeCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - body *IpamsvcRange - inherit *string + body *IpamsvcRange + inherit *string } func (r ApiRangeCreateRequest) Body(body IpamsvcRange) ApiRangeCreateRequest { @@ -157,25 +158,24 @@ RangeCreate Create the range. Use this method to create a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ func (a *RangeAPIService) RangeCreate(ctx context.Context) ApiRangeCreateRequest { return ApiRangeCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateRangeResponse +// @return IpamsvcCreateRangeResponse func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateRangeResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeCreate") @@ -212,16 +212,16 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -267,11 +267,11 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC } type ApiRangeCreateNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -296,27 +296,26 @@ RangeCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ func (a *RangeAPIService) RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest { return ApiRangeCreateNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableIPResponse +// @return IpamsvcCreateNextAvailableIPResponse func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableIPResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeCreateNextAvailableIP") @@ -405,9 +404,9 @@ func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNext } type ApiRangeDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string + id string } func (r ApiRangeDeleteRequest) Execute() (*http.Response, error) { @@ -420,24 +419,24 @@ RangeDelete Move the range to the recycle bin. Use this method to move a __Range__ object to the recycle bin. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ func (a *RangeAPIService) RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest { return ApiRangeDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RangeAPIService) RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeDelete") @@ -509,50 +508,50 @@ func (a *RangeAPIService) RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Res } type ApiRangeListRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string - inherit *string + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string + inherit *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRangeListRequest) Filter(filter string) ApiRangeListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRangeListRequest) OrderBy(orderBy string) ApiRangeListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRangeListRequest) Fields(fields string) ApiRangeListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRangeListRequest) Offset(offset int32) ApiRangeListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRangeListRequest) Limit(limit int32) ApiRangeListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRangeListRequest) PageToken(pageToken string) ApiRangeListRequest { r.pageToken = &pageToken return r @@ -586,25 +585,24 @@ RangeList Retrieve ranges. Use this method to retrieve __Range__ objects. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ func (a *RangeAPIService) RangeList(ctx context.Context) ApiRangeListRequest { return ApiRangeListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListRangeResponse +// @return IpamsvcListRangeResponse func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListRangeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeList") @@ -707,11 +705,11 @@ func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListR } type ApiRangeListNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -736,27 +734,26 @@ RangeListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ func (a *RangeAPIService) RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest { return ApiRangeListNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcNextAvailableIPResponse +// @return IpamsvcNextAvailableIPResponse func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableIPResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeListNextAvailableIP") @@ -839,14 +836,14 @@ func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvai } type ApiRangeReadRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRangeReadRequest) Fields(fields string) ApiRangeReadRequest { r.fields = &fields return r @@ -868,27 +865,26 @@ RangeRead Retrieve the range. Use this method to retrieve a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ func (a *RangeAPIService) RangeRead(ctx context.Context, id string) ApiRangeReadRequest { return ApiRangeReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadRangeResponse +// @return IpamsvcReadRangeResponse func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadRangeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeRead") @@ -971,11 +967,11 @@ func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadR } type ApiRangeUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string - body *IpamsvcRange - inherit *string + id string + body *IpamsvcRange + inherit *string } func (r ApiRangeUpdateRequest) Body(body IpamsvcRange) ApiRangeUpdateRequest { @@ -999,27 +995,26 @@ RangeUpdate Update the range. Use this method to update a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ func (a *RangeAPIService) RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest { return ApiRangeUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateRangeResponse +// @return IpamsvcUpdateRangeResponse func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcUpdateRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateRangeResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeUpdate") @@ -1057,16 +1052,16 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_server.go b/ipam/api_server.go index a9336ef..b6d1110 100644 --- a/ipam/api_server.go +++ b/ipam/api_server.go @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type ServerAPI interface { /* - ServerCreate Create the DHCP configuration profile. + ServerCreate Create the DHCP configuration profile. - Use this method to create a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a __Server__ object. +A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest @@ -37,27 +38,27 @@ type ServerAPI interface { // @return IpamsvcCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) /* - ServerDelete Move the DHCP configuration profile to the recycle bin. + ServerDelete Move the DHCP configuration profile to the recycle bin. - Use this method to move a __Server__ object to the recycle bin. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a __Server__ object to the recycle bin. +A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) /* - ServerList Retrieve DHCP configuration profiles. + ServerList Retrieve DHCP configuration profiles. - Use this method to retrieve __Server__ objects. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve __Server__ objects. +A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest @@ -65,14 +66,14 @@ type ServerAPI interface { // @return IpamsvcListServerResponse ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) /* - ServerRead Retrieve the DHCP configuration profile. + ServerRead Retrieve the DHCP configuration profile. - Use this method to retrieve a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve a __Server__ object. +A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest @@ -80,14 +81,14 @@ type ServerAPI interface { // @return IpamsvcReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) /* - ServerUpdate Update the DHCP configuration profile. + ServerUpdate Update the DHCP configuration profile. - Use this method to update a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a __Server__ object. +A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest @@ -100,10 +101,10 @@ type ServerAPI interface { type ServerAPIService internal.Service type ApiServerCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - body *IpamsvcServer - inherit *string + body *IpamsvcServer + inherit *string } func (r ApiServerCreateRequest) Body(body IpamsvcServer) ApiServerCreateRequest { @@ -127,25 +128,24 @@ ServerCreate Create the DHCP configuration profile. Use this method to create a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequest { return ApiServerCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateServerResponse +// @return IpamsvcCreateServerResponse func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateServerResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerCreate") @@ -182,16 +182,16 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -237,9 +237,9 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams } type ApiServerDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string + id string } func (r ApiServerDeleteRequest) Execute() (*http.Response, error) { @@ -252,24 +252,24 @@ ServerDelete Move the DHCP configuration profile to the recycle bin. Use this method to move a __Server__ object to the recycle bin. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ func (a *ServerAPIService) ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest { return ApiServerDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerDelete") @@ -341,50 +341,50 @@ func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http. } type ApiServerListRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string - inherit *string -} - -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string + inherit *string +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServerListRequest) Filter(filter string) ApiServerListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServerListRequest) OrderBy(orderBy string) ApiServerListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerListRequest) Fields(fields string) ApiServerListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServerListRequest) Offset(offset int32) ApiServerListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServerListRequest) Limit(limit int32) ApiServerListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServerListRequest) PageToken(pageToken string) ApiServerListRequest { r.pageToken = &pageToken return r @@ -418,25 +418,24 @@ ServerList Retrieve DHCP configuration profiles. Use this method to retrieve __Server__ objects. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest { return ApiServerListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListServerResponse +// @return IpamsvcListServerResponse func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerList") @@ -539,14 +538,14 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcLi } type ApiServerReadRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerReadRequest) Fields(fields string) ApiServerReadRequest { r.fields = &fields return r @@ -568,27 +567,26 @@ ServerRead Retrieve the DHCP configuration profile. Use this method to retrieve a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerReadRequest { return ApiServerReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadServerResponse +// @return IpamsvcReadServerResponse func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerRead") @@ -671,11 +669,11 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcRe } type ApiServerUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - body *IpamsvcServer - inherit *string + id string + body *IpamsvcServer + inherit *string } func (r ApiServerUpdateRequest) Body(body IpamsvcServer) ApiServerUpdateRequest { @@ -699,27 +697,26 @@ ServerUpdate Update the DHCP configuration profile. Use this method to update a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest { return ApiServerUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateServerResponse +// @return IpamsvcUpdateServerResponse func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*IpamsvcUpdateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateServerResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerUpdate") @@ -757,16 +754,16 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_subnet.go b/ipam/api_subnet.go index 42f1527..0b241fc 100644 --- a/ipam/api_subnet.go +++ b/ipam/api_subnet.go @@ -18,19 +18,20 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type SubnetAPI interface { /* - SubnetCopy Copy the subnet. + SubnetCopy Copy the subnet. - Use this method to copy a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to copy a __Subnet__ object. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest @@ -38,13 +39,13 @@ type SubnetAPI interface { // @return IpamsvcCopySubnetResponse SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) /* - SubnetCreate Create the subnet. + SubnetCreate Create the subnet. - Use this method to create a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to create a __Subnet__ object. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ SubnetCreate(ctx context.Context) ApiSubnetCreateRequest @@ -52,14 +53,14 @@ type SubnetAPI interface { // @return IpamsvcCreateSubnetResponse SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) /* - SubnetCreateNextAvailableIP Allocate the next available IP address. + SubnetCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. +This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest @@ -67,27 +68,27 @@ type SubnetAPI interface { // @return IpamsvcCreateNextAvailableIPResponse SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - SubnetDelete Move the subnet to the recycle bin. + SubnetDelete Move the subnet to the recycle bin. - Use this method to move a __Subnet__ object to the recycle bin. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to move a __Subnet__ object to the recycle bin. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest // SubnetDeleteExecute executes the request SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) /* - SubnetList Retrieve subnets. + SubnetList Retrieve subnets. - Use this method to retrieve __Subnet__ objects. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve __Subnet__ objects. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ SubnetList(ctx context.Context) ApiSubnetListRequest @@ -95,14 +96,14 @@ type SubnetAPI interface { // @return IpamsvcListSubnetResponse SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) /* - SubnetListNextAvailableIP Retrieve the next available IP address. + SubnetListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. +This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest @@ -110,14 +111,14 @@ type SubnetAPI interface { // @return IpamsvcNextAvailableIPResponse SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - SubnetRead Retrieve the subnet. + SubnetRead Retrieve the subnet. - Use this method to retrieve a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve a __Subnet__ object. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest @@ -125,14 +126,14 @@ type SubnetAPI interface { // @return IpamsvcReadSubnetResponse SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) /* - SubnetUpdate Update the subnet. + SubnetUpdate Update the subnet. - Use this method to update a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to update a __Subnet__ object. +The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest @@ -145,10 +146,10 @@ type SubnetAPI interface { type SubnetAPIService internal.Service type ApiSubnetCopyRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string - body *IpamsvcCopySubnet + id string + body *IpamsvcCopySubnet } func (r ApiSubnetCopyRequest) Body(body IpamsvcCopySubnet) ApiSubnetCopyRequest { @@ -166,27 +167,26 @@ SubnetCopy Copy the subnet. Use this method to copy a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ func (a *SubnetAPIService) SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest { return ApiSubnetCopyRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCopySubnetResponse +// @return IpamsvcCopySubnetResponse func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCopySubnetResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCopySubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetCopy") @@ -221,8 +221,8 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -268,10 +268,10 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo } type ApiSubnetCreateRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - body *IpamsvcSubnet - inherit *string + body *IpamsvcSubnet + inherit *string } func (r ApiSubnetCreateRequest) Body(body IpamsvcSubnet) ApiSubnetCreateRequest { @@ -295,25 +295,24 @@ SubnetCreate Create the subnet. Use this method to create a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ func (a *SubnetAPIService) SubnetCreate(ctx context.Context) ApiSubnetCreateRequest { return ApiSubnetCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcCreateSubnetResponse +// @return IpamsvcCreateSubnetResponse func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateSubnetResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetCreate") @@ -350,16 +349,16 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -405,11 +404,11 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams } type ApiSubnetCreateNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -434,27 +433,26 @@ SubnetCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ func (a *SubnetAPIService) SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest { return ApiSubnetCreateNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableIPResponse +// @return IpamsvcCreateNextAvailableIPResponse func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableIPResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetCreateNextAvailableIP") @@ -543,9 +541,9 @@ func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateN } type ApiSubnetDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string + id string } func (r ApiSubnetDeleteRequest) Execute() (*http.Response, error) { @@ -558,24 +556,24 @@ SubnetDelete Move the subnet to the recycle bin. Use this method to move a __Subnet__ object to the recycle bin. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ func (a *SubnetAPIService) SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest { return ApiSubnetDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *SubnetAPIService) SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetDelete") @@ -647,50 +645,50 @@ func (a *SubnetAPIService) SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http. } type ApiSubnetListRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string - inherit *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiSubnetListRequest) Fields(fields string) ApiSubnetListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiSubnetListRequest) Filter(filter string) ApiSubnetListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiSubnetListRequest) Offset(offset int32) ApiSubnetListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiSubnetListRequest) Limit(limit int32) ApiSubnetListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiSubnetListRequest) PageToken(pageToken string) ApiSubnetListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiSubnetListRequest) OrderBy(orderBy string) ApiSubnetListRequest { r.orderBy = &orderBy return r @@ -724,25 +722,24 @@ SubnetList Retrieve subnets. Use this method to retrieve __Subnet__ objects. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ func (a *SubnetAPIService) SubnetList(ctx context.Context) ApiSubnetListRequest { return ApiSubnetListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return IpamsvcListSubnetResponse +// @return IpamsvcListSubnetResponse func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListSubnetResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetList") @@ -845,11 +842,11 @@ func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcLi } type ApiSubnetListNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -874,27 +871,26 @@ SubnetListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ func (a *SubnetAPIService) SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest { return ApiSubnetListNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcNextAvailableIPResponse +// @return IpamsvcNextAvailableIPResponse func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableIPResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetListNextAvailableIP") @@ -977,14 +973,14 @@ func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextA } type ApiSubnetReadRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiSubnetReadRequest) Fields(fields string) ApiSubnetReadRequest { r.fields = &fields return r @@ -1006,27 +1002,26 @@ SubnetRead Retrieve the subnet. Use this method to retrieve a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ func (a *SubnetAPIService) SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest { return ApiSubnetReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcReadSubnetResponse +// @return IpamsvcReadSubnetResponse func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadSubnetResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetRead") @@ -1109,11 +1104,11 @@ func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcRe } type ApiSubnetUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string - body *IpamsvcSubnet - inherit *string + id string + body *IpamsvcSubnet + inherit *string } func (r ApiSubnetUpdateRequest) Body(body IpamsvcSubnet) ApiSubnetUpdateRequest { @@ -1137,27 +1132,26 @@ SubnetUpdate Update the subnet. Use this method to update a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ func (a *SubnetAPIService) SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest { return ApiSubnetUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return IpamsvcUpdateSubnetResponse +// @return IpamsvcUpdateSubnetResponse func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*IpamsvcUpdateSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateSubnetResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetUpdate") @@ -1195,16 +1189,16 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/client.go b/ipam/client.go index 8650416..ab22f7e 100644 --- a/ipam/client.go +++ b/ipam/client.go @@ -11,7 +11,7 @@ API version: v1 package ipam import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,36 +19,36 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the IP Address Management API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - AddressAPI AddressAPI - AddressBlockAPI AddressBlockAPI - AsmAPI AsmAPI - DhcpHostAPI DhcpHostAPI - DnsUsageAPI DnsUsageAPI - FilterAPI FilterAPI - FixedAddressAPI FixedAddressAPI - GlobalAPI GlobalAPI - HaGroupAPI HaGroupAPI + AddressAPI AddressAPI + AddressBlockAPI AddressBlockAPI + AsmAPI AsmAPI + DhcpHostAPI DhcpHostAPI + DnsUsageAPI DnsUsageAPI + FilterAPI FilterAPI + FixedAddressAPI FixedAddressAPI + GlobalAPI GlobalAPI + HaGroupAPI HaGroupAPI HardwareFilterAPI HardwareFilterAPI - IpSpaceAPI IpSpaceAPI - IpamHostAPI IpamHostAPI - LeasesCommandAPI LeasesCommandAPI - OptionCodeAPI OptionCodeAPI - OptionFilterAPI OptionFilterAPI - OptionGroupAPI OptionGroupAPI - OptionSpaceAPI OptionSpaceAPI - RangeAPI RangeAPI - ServerAPI ServerAPI - SubnetAPI SubnetAPI + IpSpaceAPI IpSpaceAPI + IpamHostAPI IpamHostAPI + LeasesCommandAPI LeasesCommandAPI + OptionCodeAPI OptionCodeAPI + OptionFilterAPI OptionFilterAPI + OptionGroupAPI OptionGroupAPI + OptionSpaceAPI OptionSpaceAPI + RangeAPI RangeAPI + ServerAPI ServerAPI + SubnetAPI SubnetAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.AddressAPI = (*AddressAPIService)(&c.Common) diff --git a/ipam/docs/AddressAPI.md b/ipam/docs/AddressAPI.md index a9fabca..2506a67 100644 --- a/ipam/docs/AddressAPI.md +++ b/ipam/docs/AddressAPI.md @@ -26,24 +26,24 @@ Create the IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressCreate`: IpamsvcCreateAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressCreate`: IpamsvcCreateAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the IP address to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AddressAPI.AddressDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AddressAPI.AddressDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,33 +160,33 @@ Retrieve IP addresses. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - scope := "scope_example" // string | (optional) - addressState := "addressState_example" // string | (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).Scope(scope).AddressState(addressState).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressList`: IpamsvcListAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + scope := "scope_example" // string | (optional) + addressState := "addressState_example" // string | (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).Scope(scope).AddressState(addressState).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressList`: IpamsvcListAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressList`: %v\n", resp) } ``` @@ -244,25 +244,25 @@ Retrieve the IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressRead`: IpamsvcReadAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressRead`: IpamsvcReadAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressRead`: %v\n", resp) } ``` @@ -316,25 +316,25 @@ Update the IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressUpdate`: IpamsvcUpdateAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressUpdate`: IpamsvcUpdateAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/AddressBlockAPI.md b/ipam/docs/AddressBlockAPI.md index 1eae92e..38ca0e4 100644 --- a/ipam/docs/AddressBlockAPI.md +++ b/ipam/docs/AddressBlockAPI.md @@ -33,25 +33,25 @@ Copy the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcCopyAddressBlock("Space_example") // IpamsvcCopyAddressBlock | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCopy`: IpamsvcCopyAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCopy`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcCopyAddressBlock("Space_example") // IpamsvcCopyAddressBlock | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCopy`: IpamsvcCopyAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCopy`: %v\n", resp) } ``` @@ -105,25 +105,25 @@ Create the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreate`: IpamsvcCreateAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreate`: IpamsvcCreateAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreate`: %v\n", resp) } ``` @@ -173,28 +173,28 @@ Create the Next Available Address Block object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of address blocks to be created. - count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) (default to 1) - name := "name_example" // string | Name of next available address blocks. (optional) - comment := "comment_example" // string | Comment of next available address blocks. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableAB``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreateNextAvailableAB`: IpamsvcCreateNextAvailableABResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableAB`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of address blocks to be created. + count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) (default to 1) + name := "name_example" // string | Name of next available address blocks. (optional) + comment := "comment_example" // string | Comment of next available address blocks. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableAB``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreateNextAvailableAB`: IpamsvcCreateNextAvailableABResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableAB`: %v\n", resp) } ``` @@ -251,26 +251,26 @@ Allocate the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableIP`: %v\n", resp) } ``` @@ -325,29 +325,29 @@ Create the Next Available Subnet object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of subnets to be created. - count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) (default to 1) - name := "name_example" // string | Name of next available subnets. (optional) - comment := "comment_example" // string | Comment of next available subnets. (optional) - dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreateNextAvailableSubnet`: IpamsvcCreateNextAvailableSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of subnets to be created. + count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) (default to 1) + name := "name_example" // string | Name of next available subnets. (optional) + comment := "comment_example" // string | Comment of next available subnets. (optional) + dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreateNextAvailableSubnet`: IpamsvcCreateNextAvailableSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet`: %v\n", resp) } ``` @@ -405,22 +405,22 @@ Move the address block to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -473,32 +473,32 @@ Retrieve the address blocks. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockList`: IpamsvcListAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockList`: IpamsvcListAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockList`: %v\n", resp) } ``` @@ -555,28 +555,28 @@ List Next Available Address Block objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of address blocks to be created. (optional) - count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) - name := "name_example" // string | Name of next available address blocks. (optional) - comment := "comment_example" // string | Comment of next available address blocks. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableAB``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockListNextAvailableAB`: IpamsvcNextAvailableABResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableAB`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of address blocks to be created. (optional) + count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) + name := "name_example" // string | Name of next available address blocks. (optional) + comment := "comment_example" // string | Comment of next available address blocks. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableAB``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockListNextAvailableAB`: IpamsvcNextAvailableABResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableAB`: %v\n", resp) } ``` @@ -633,26 +633,26 @@ Retrieve the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockListNextAvailableIP`: IpamsvcNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockListNextAvailableIP`: IpamsvcNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableIP`: %v\n", resp) } ``` @@ -707,29 +707,29 @@ List Next Available Subnet objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of subnets to be created. (optional) - count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) - name := "name_example" // string | Name of next available subnets. (optional) - comment := "comment_example" // string | Comment of next available subnets. (optional) - dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableSubnet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockListNextAvailableSubnet`: IpamsvcNextAvailableSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableSubnet`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of subnets to be created. (optional) + count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) + name := "name_example" // string | Name of next available subnets. (optional) + comment := "comment_example" // string | Comment of next available subnets. (optional) + dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableSubnet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockListNextAvailableSubnet`: IpamsvcNextAvailableSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableSubnet`: %v\n", resp) } ``` @@ -787,26 +787,26 @@ Retrieve the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockRead`: IpamsvcReadAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockRead`: IpamsvcReadAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockRead`: %v\n", resp) } ``` @@ -861,26 +861,26 @@ Update the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockUpdate`: IpamsvcUpdateAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockUpdate`: IpamsvcUpdateAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/AsmAPI.md b/ipam/docs/AsmAPI.md index 4b7038b..f1e9836 100644 --- a/ipam/docs/AsmAPI.md +++ b/ipam/docs/AsmAPI.md @@ -24,24 +24,24 @@ Update subnet and ranges for Automated Scope Management. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcASM("SubnetId_example") // IpamsvcASM | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AsmCreate`: IpamsvcCreateASMResponse - fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcASM("SubnetId_example") // IpamsvcASM | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AsmCreate`: IpamsvcCreateASMResponse + fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmCreate`: %v\n", resp) } ``` @@ -90,25 +90,25 @@ Retrieve suggested updates for Automated Scope Management. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - subnetId := "subnetId_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AsmAPI.AsmList(context.Background()).Fields(fields).SubnetId(subnetId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AsmList`: IpamsvcListASMResponse - fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + subnetId := "subnetId_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AsmAPI.AsmList(context.Background()).Fields(fields).SubnetId(subnetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AsmList`: IpamsvcListASMResponse + fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmList`: %v\n", resp) } ``` @@ -158,25 +158,25 @@ Retrieve the suggested update for Automated Scope Management. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AsmAPI.AsmRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AsmRead`: IpamsvcReadASMResponse - fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AsmAPI.AsmRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AsmRead`: IpamsvcReadASMResponse + fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmRead`: %v\n", resp) } ``` diff --git a/ipam/docs/DhcpHostAPI.md b/ipam/docs/DhcpHostAPI.md index cae4a34..e964fd1 100644 --- a/ipam/docs/DhcpHostAPI.md +++ b/ipam/docs/DhcpHostAPI.md @@ -25,31 +25,31 @@ Retrieve DHCP hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostList`: IpamsvcListHostResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostList`: IpamsvcListHostResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostList`: %v\n", resp) } ``` @@ -105,24 +105,24 @@ Retrieve DHCP host associations. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostListAssociations``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostListAssociations`: IpamsvcHostAssociationsResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostListAssociations`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostListAssociations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostListAssociations`: IpamsvcHostAssociationsResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostListAssociations`: %v\n", resp) } ``` @@ -175,25 +175,25 @@ Retrieve the DHCP host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostRead`: IpamsvcReadHostResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostRead`: IpamsvcReadHostResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostRead`: %v\n", resp) } ``` @@ -247,25 +247,25 @@ Update the DHCP hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcHost() // IpamsvcHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostUpdate`: IpamsvcUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcHost() // IpamsvcHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostUpdate`: IpamsvcUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/DnsUsageAPI.md b/ipam/docs/DnsUsageAPI.md index 8e67567..6ddfc39 100644 --- a/ipam/docs/DnsUsageAPI.md +++ b/ipam/docs/DnsUsageAPI.md @@ -23,29 +23,29 @@ Retrieve DNS usage for multiple objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DnsUsageAPI.DnsUsageList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DnsUsageList`: IpamsvcListDNSUsageResponse - fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DnsUsageAPI.DnsUsageList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsUsageList`: IpamsvcListDNSUsageResponse + fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageList`: %v\n", resp) } ``` @@ -99,25 +99,25 @@ Retrieve the DNS usage. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DnsUsageAPI.DnsUsageRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DnsUsageRead`: IpamsvcReadDNSUsageResponse - fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DnsUsageAPI.DnsUsageRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsUsageRead`: IpamsvcReadDNSUsageResponse + fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageRead`: %v\n", resp) } ``` diff --git a/ipam/docs/FilterAPI.md b/ipam/docs/FilterAPI.md index e359bba..5df7545 100644 --- a/ipam/docs/FilterAPI.md +++ b/ipam/docs/FilterAPI.md @@ -22,31 +22,31 @@ Retrieve DHCP filters. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FilterAPI.FilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FilterAPI.FilterList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FilterList`: IpamsvcListFilterResponse - fmt.Fprintf(os.Stdout, "Response from `FilterAPI.FilterList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FilterAPI.FilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FilterAPI.FilterList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FilterList`: IpamsvcListFilterResponse + fmt.Fprintf(os.Stdout, "Response from `FilterAPI.FilterList`: %v\n", resp) } ``` diff --git a/ipam/docs/FixedAddressAPI.md b/ipam/docs/FixedAddressAPI.md index f69e942..f86f1e6 100644 --- a/ipam/docs/FixedAddressAPI.md +++ b/ipam/docs/FixedAddressAPI.md @@ -26,25 +26,25 @@ Create the fixed address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressCreate`: IpamsvcCreateFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressCreate`: IpamsvcCreateFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the fixed address to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ Retrieve fixed addresses. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressList`: IpamsvcListFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressList`: IpamsvcListFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Retrieve the fixed address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressRead`: IpamsvcReadFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressRead`: IpamsvcReadFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the fixed address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressUpdate`: IpamsvcUpdateFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressUpdate`: IpamsvcUpdateFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/GlobalAPI.md b/ipam/docs/GlobalAPI.md index 167ba40..bd93827 100644 --- a/ipam/docs/GlobalAPI.md +++ b/ipam/docs/GlobalAPI.md @@ -25,24 +25,24 @@ Retrieve the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead`: IpamsvcReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead`: IpamsvcReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) } ``` @@ -91,25 +91,25 @@ Retrieve the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead2`: IpamsvcReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead2`: IpamsvcReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) } ``` @@ -163,24 +163,24 @@ Update the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate`: IpamsvcUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) + body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate`: IpamsvcUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) } ``` @@ -229,25 +229,25 @@ Update the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate2`: IpamsvcUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate2`: IpamsvcUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) } ``` diff --git a/ipam/docs/HaGroupAPI.md b/ipam/docs/HaGroupAPI.md index b2f9159..e3a67f6 100644 --- a/ipam/docs/HaGroupAPI.md +++ b/ipam/docs/HaGroupAPI.md @@ -26,24 +26,24 @@ Create the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupCreate`: IpamsvcCreateHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupCreate`: IpamsvcCreateHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,32 +160,32 @@ Retrieve HA groups. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).CollectStats(collectStats).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupList`: IpamsvcListHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).CollectStats(collectStats).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupList`: IpamsvcListHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupList`: %v\n", resp) } ``` @@ -242,26 +242,26 @@ Retrieve the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), id).Fields(fields).CollectStats(collectStats).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupRead`: IpamsvcReadHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), id).Fields(fields).CollectStats(collectStats).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupRead`: IpamsvcReadHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupRead`: %v\n", resp) } ``` @@ -316,25 +316,25 @@ Update the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupUpdate`: IpamsvcUpdateHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupUpdate`: IpamsvcUpdateHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/HardwareFilterAPI.md b/ipam/docs/HardwareFilterAPI.md index d5e2f5d..c9a7d6d 100644 --- a/ipam/docs/HardwareFilterAPI.md +++ b/ipam/docs/HardwareFilterAPI.md @@ -26,24 +26,24 @@ Create the hardware filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterCreate`: IpamsvcCreateHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterCreate`: IpamsvcCreateHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the hardware filter to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve hardware filters. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterList`: IpamsvcListHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterList`: IpamsvcListHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the hardware filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterRead`: IpamsvcReadHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterRead`: IpamsvcReadHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the hardware filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterUpdate`: IpamsvcUpdateHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterUpdate`: IpamsvcUpdateHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/IpSpaceAPI.md b/ipam/docs/IpSpaceAPI.md index 4c0a896..cd5e988 100644 --- a/ipam/docs/IpSpaceAPI.md +++ b/ipam/docs/IpSpaceAPI.md @@ -28,24 +28,24 @@ Copy the specified address block and subnets in the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcBulkCopyIPSpace([]string{"CopyObjects_example"}, "Target_example") // IpamsvcBulkCopyIPSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceBulkCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceBulkCopy`: IpamsvcBulkCopyIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceBulkCopy`: %v\n", resp) + body := *openapiclient.NewIpamsvcBulkCopyIPSpace([]string{"CopyObjects_example"}, "Target_example") // IpamsvcBulkCopyIPSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceBulkCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceBulkCopy`: IpamsvcBulkCopyIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceBulkCopy`: %v\n", resp) } ``` @@ -94,25 +94,25 @@ Copy the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcCopyIPSpace("Name_example") // IpamsvcCopyIPSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceCopy`: IpamsvcCopyIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCopy`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcCopyIPSpace("Name_example") // IpamsvcCopyIPSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceCopy`: IpamsvcCopyIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCopy`: %v\n", resp) } ``` @@ -166,25 +166,25 @@ Create the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceCreate`: IpamsvcCreateIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceCreate`: IpamsvcCreateIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCreate`: %v\n", resp) } ``` @@ -234,22 +234,22 @@ Move the IP space to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -302,32 +302,32 @@ Retrieve IP spaces. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceList`: IpamsvcListIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceList`: IpamsvcListIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceList`: %v\n", resp) } ``` @@ -384,26 +384,26 @@ Retrieve the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceRead`: IpamsvcReadIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceRead`: IpamsvcReadIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceRead`: %v\n", resp) } ``` @@ -458,26 +458,26 @@ Update the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceUpdate`: IpamsvcUpdateIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceUpdate`: IpamsvcUpdateIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/IpamHostAPI.md b/ipam/docs/IpamHostAPI.md index ff8d66f..1b08803 100644 --- a/ipam/docs/IpamHostAPI.md +++ b/ipam/docs/IpamHostAPI.md @@ -26,24 +26,24 @@ Create the IPAM host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostCreate`: IpamsvcCreateIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostCreate`: IpamsvcCreateIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the IPAM host to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve the IPAM hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostList(context.Background()).Fields(fields).OrderBy(orderBy).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostList`: IpamsvcListIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostList(context.Background()).Fields(fields).OrderBy(orderBy).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostList`: IpamsvcListIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostList`: %v\n", resp) } ``` @@ -240,26 +240,26 @@ Retrieve the IPAM host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), id).OrderBy(orderBy).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostRead`: IpamsvcReadIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), id).OrderBy(orderBy).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostRead`: IpamsvcReadIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostRead`: %v\n", resp) } ``` @@ -314,25 +314,25 @@ Update the IPAM host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostUpdate`: IpamsvcUpdateIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostUpdate`: IpamsvcUpdateIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/LeasesCommandAPI.md b/ipam/docs/LeasesCommandAPI.md index 2f88304..bfff583 100644 --- a/ipam/docs/LeasesCommandAPI.md +++ b/ipam/docs/LeasesCommandAPI.md @@ -22,24 +22,24 @@ Perform actions like clearing DHCP lease(s). package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcLeasesCommand("Command_example") // IpamsvcLeasesCommand | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LeasesCommandAPI.LeasesCommandCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LeasesCommandCreate`: IpamsvcCreateLeasesCommandResponse - fmt.Fprintf(os.Stdout, "Response from `LeasesCommandAPI.LeasesCommandCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcLeasesCommand("Command_example") // IpamsvcLeasesCommand | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LeasesCommandAPI.LeasesCommandCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LeasesCommandCreate`: IpamsvcCreateLeasesCommandResponse + fmt.Fprintf(os.Stdout, "Response from `LeasesCommandAPI.LeasesCommandCreate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionCodeAPI.md b/ipam/docs/OptionCodeAPI.md index f481072..81660a8 100644 --- a/ipam/docs/OptionCodeAPI.md +++ b/ipam/docs/OptionCodeAPI.md @@ -26,24 +26,24 @@ Create the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeCreate`: IpamsvcCreateOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeCreate`: IpamsvcCreateOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,29 +160,29 @@ Retrieve DHCP option codes. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeList`: IpamsvcListOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeList`: IpamsvcListOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeList`: %v\n", resp) } ``` @@ -236,25 +236,25 @@ Retrieve the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeRead`: IpamsvcReadOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeRead`: IpamsvcReadOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeRead`: %v\n", resp) } ``` @@ -308,25 +308,25 @@ Update the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeUpdate`: IpamsvcUpdateOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeUpdate`: IpamsvcUpdateOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionFilterAPI.md b/ipam/docs/OptionFilterAPI.md index f1d27e9..49e0c41 100644 --- a/ipam/docs/OptionFilterAPI.md +++ b/ipam/docs/OptionFilterAPI.md @@ -26,24 +26,24 @@ Create the DHCP option filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterCreate`: IpamsvcCreateOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterCreate`: IpamsvcCreateOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the DHCP option filter to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve DHCP option filters. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterList`: IpamsvcListOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterList`: IpamsvcListOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the DHCP option filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterRead`: IpamsvcReadOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterRead`: IpamsvcReadOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the DHCP option filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterUpdate`: IpamsvcUpdateOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterUpdate`: IpamsvcUpdateOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionGroupAPI.md b/ipam/docs/OptionGroupAPI.md index 7775e7d..9501fa3 100644 --- a/ipam/docs/OptionGroupAPI.md +++ b/ipam/docs/OptionGroupAPI.md @@ -26,24 +26,24 @@ Create the DHCP option group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupCreate`: IpamsvcCreateOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupCreate`: IpamsvcCreateOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the DHCP option group to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve DHCP option groups. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupList`: IpamsvcListOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupList`: IpamsvcListOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the DHCP option group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupRead`: IpamsvcReadOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupRead`: IpamsvcReadOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the DHCP option group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupUpdate`: IpamsvcUpdateOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupUpdate`: IpamsvcUpdateOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionSpaceAPI.md b/ipam/docs/OptionSpaceAPI.md index eebcd90..93f5f44 100644 --- a/ipam/docs/OptionSpaceAPI.md +++ b/ipam/docs/OptionSpaceAPI.md @@ -26,24 +26,24 @@ Create the DHCP option space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceCreate`: IpamsvcCreateOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceCreate`: IpamsvcCreateOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the DHCP option space to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve DHCP option spaces. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceList`: IpamsvcListOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceList`: IpamsvcListOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the DHCP option space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceRead`: IpamsvcReadOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceRead`: IpamsvcReadOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the DHCP option space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceUpdate`: IpamsvcUpdateOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceUpdate`: IpamsvcUpdateOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/RangeAPI.md b/ipam/docs/RangeAPI.md index 087beb9..6f7159d 100644 --- a/ipam/docs/RangeAPI.md +++ b/ipam/docs/RangeAPI.md @@ -28,25 +28,25 @@ Create the range. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeCreate`: IpamsvcCreateRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeCreate`: IpamsvcCreateRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreate`: %v\n", resp) } ``` @@ -96,26 +96,26 @@ Allocate the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreateNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreateNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreateNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreateNextAvailableIP`: %v\n", resp) } ``` @@ -170,22 +170,22 @@ Move the range to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.RangeAPI.RangeDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RangeAPI.RangeDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -238,32 +238,32 @@ Retrieve ranges. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeList`: IpamsvcListRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeList`: IpamsvcListRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeList`: %v\n", resp) } ``` @@ -320,26 +320,26 @@ Retrieve the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeListNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeListNextAvailableIP`: IpamsvcNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeListNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeListNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeListNextAvailableIP`: IpamsvcNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeListNextAvailableIP`: %v\n", resp) } ``` @@ -394,26 +394,26 @@ Retrieve the range. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeRead`: IpamsvcReadRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeRead`: IpamsvcReadRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeRead`: %v\n", resp) } ``` @@ -468,26 +468,26 @@ Update the range. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeUpdate`: IpamsvcUpdateRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeUpdate`: IpamsvcUpdateRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/ServerAPI.md b/ipam/docs/ServerAPI.md index ffb3780..2575063 100644 --- a/ipam/docs/ServerAPI.md +++ b/ipam/docs/ServerAPI.md @@ -26,25 +26,25 @@ Create the DHCP configuration profile. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerCreate`: IpamsvcCreateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerCreate`: IpamsvcCreateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the DHCP configuration profile to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ Retrieve DHCP configuration profiles. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerList`: IpamsvcListServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerList`: IpamsvcListServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Retrieve the DHCP configuration profile. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerRead`: IpamsvcReadServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerRead`: IpamsvcReadServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the DHCP configuration profile. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerUpdate`: IpamsvcUpdateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerUpdate`: IpamsvcUpdateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/SubnetAPI.md b/ipam/docs/SubnetAPI.md index fa6ad18..c4aab76 100644 --- a/ipam/docs/SubnetAPI.md +++ b/ipam/docs/SubnetAPI.md @@ -29,25 +29,25 @@ Copy the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcCopySubnet("Space_example") // IpamsvcCopySubnet | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetCopy`: IpamsvcCopySubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCopy`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcCopySubnet("Space_example") // IpamsvcCopySubnet | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetCopy`: IpamsvcCopySubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCopy`: %v\n", resp) } ``` @@ -101,25 +101,25 @@ Create the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetCreate`: IpamsvcCreateSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetCreate`: IpamsvcCreateSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreate`: %v\n", resp) } ``` @@ -169,26 +169,26 @@ Allocate the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreateNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreateNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreateNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreateNextAvailableIP`: %v\n", resp) } ``` @@ -243,22 +243,22 @@ Move the subnet to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -311,32 +311,32 @@ Retrieve subnets. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetList`: IpamsvcListSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetList`: IpamsvcListSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetList`: %v\n", resp) } ``` @@ -393,26 +393,26 @@ Retrieve the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetListNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetListNextAvailableIP`: IpamsvcNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetListNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetListNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetListNextAvailableIP`: IpamsvcNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetListNextAvailableIP`: %v\n", resp) } ``` @@ -467,26 +467,26 @@ Retrieve the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetRead`: IpamsvcReadSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetRead`: IpamsvcReadSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetRead`: %v\n", resp) } ``` @@ -541,26 +541,26 @@ Update the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetUpdate`: IpamsvcUpdateSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetUpdate`: IpamsvcUpdateSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetUpdate`: %v\n", resp) } ``` diff --git a/ipam/model_inheritance_assigned_host.go b/ipam/model_inheritance_assigned_host.go index fdf9c2d..3c8ba73 100644 --- a/ipam/model_inheritance_assigned_host.go +++ b/ipam/model_inheritance_assigned_host.go @@ -141,7 +141,7 @@ func (o *InheritanceAssignedHost) SetOphid(v string) { } func (o InheritanceAssignedHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableInheritanceAssignedHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inheritance_inherited_bool.go b/ipam/model_inheritance_inherited_bool.go index 50ed585..0839175 100644 --- a/ipam/model_inheritance_inherited_bool.go +++ b/ipam/model_inheritance_inherited_bool.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedBool) SetValue(v bool) { } func (o InheritanceInheritedBool) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritanceInheritedBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inheritance_inherited_float.go b/ipam/model_inheritance_inherited_float.go index 8c98855..525ade3 100644 --- a/ipam/model_inheritance_inherited_float.go +++ b/ipam/model_inheritance_inherited_float.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedFloat) SetValue(v float32) { } func (o InheritanceInheritedFloat) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritanceInheritedFloat) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inheritance_inherited_identifier.go b/ipam/model_inheritance_inherited_identifier.go index 30f2ece..b75fa49 100644 --- a/ipam/model_inheritance_inherited_identifier.go +++ b/ipam/model_inheritance_inherited_identifier.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedIdentifier) SetValue(v string) { } func (o InheritanceInheritedIdentifier) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritanceInheritedIdentifier) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inheritance_inherited_string.go b/ipam/model_inheritance_inherited_string.go index e507110..5c0c493 100644 --- a/ipam/model_inheritance_inherited_string.go +++ b/ipam/model_inheritance_inherited_string.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedString) SetValue(v string) { } func (o InheritanceInheritedString) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritanceInheritedString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inheritance_inherited_u_int32.go b/ipam/model_inheritance_inherited_u_int32.go index 5983891..66c43e1 100644 --- a/ipam/model_inheritance_inherited_u_int32.go +++ b/ipam/model_inheritance_inherited_u_int32.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedUInt32) SetValue(v int64) { } func (o InheritanceInheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritanceInheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inherited_dhcp_config_filter_list.go b/ipam/model_inherited_dhcp_config_filter_list.go index e7894bb..3d17bfb 100644 --- a/ipam/model_inherited_dhcp_config_filter_list.go +++ b/ipam/model_inherited_dhcp_config_filter_list.go @@ -175,7 +175,7 @@ func (o *InheritedDHCPConfigFilterList) SetValue(v []string) { } func (o InheritedDHCPConfigFilterList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritedDHCPConfigFilterList) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_inherited_dhcp_config_ignore_item_list.go b/ipam/model_inherited_dhcp_config_ignore_item_list.go index c520052..cc93a07 100644 --- a/ipam/model_inherited_dhcp_config_ignore_item_list.go +++ b/ipam/model_inherited_dhcp_config_ignore_item_list.go @@ -175,7 +175,7 @@ func (o *InheritedDHCPConfigIgnoreItemList) SetValue(v []IpamsvcIgnoreItem) { } func (o InheritedDHCPConfigIgnoreItemList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritedDHCPConfigIgnoreItemList) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_access_filter.go b/ipam/model_ipamsvc_access_filter.go index d185ec6..67b7d97 100644 --- a/ipam/model_ipamsvc_access_filter.go +++ b/ipam/model_ipamsvc_access_filter.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcAccessFilter type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcAccessFilter struct { OptionFilterId *string `json:"option_filter_id,omitempty"` } +type _IpamsvcAccessFilter IpamsvcAccessFilter + // NewIpamsvcAccessFilter instantiates a new IpamsvcAccessFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -134,7 +138,7 @@ func (o *IpamsvcAccessFilter) SetOptionFilterId(v string) { } func (o IpamsvcAccessFilter) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -153,6 +157,43 @@ func (o IpamsvcAccessFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcAccessFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcAccessFilter := _IpamsvcAccessFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcAccessFilter) + + if err != nil { + return err + } + + *o = IpamsvcAccessFilter(varIpamsvcAccessFilter) + + return err +} + type NullableIpamsvcAccessFilter struct { value *IpamsvcAccessFilter isSet bool @@ -188,3 +229,5 @@ func (v *NullableIpamsvcAccessFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_address.go b/ipam/model_ipamsvc_address.go index 83c73e1..5931a9c 100644 --- a/ipam/model_ipamsvc_address.go +++ b/ipam/model_ipamsvc_address.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcAddress type satisfies the MappedNullable interface at compile time @@ -25,8 +27,8 @@ type IpamsvcAddress struct { // The description for the address object. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` // Time when the object has been created. - CreatedAt *time.Time `json:"created_at,omitempty"` - DhcpInfo *IpamsvcDHCPInfo `json:"dhcp_info,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + DhcpInfo *IpamsvcDHCPInfo `json:"dhcp_info,omitempty"` // Read only. Represent the value of the same field in the associated _dhcp/fixed_address_ object. DisableDhcp *bool `json:"disable_dhcp,omitempty"` // The discovery attributes for this address in JSON format. @@ -61,6 +63,8 @@ type IpamsvcAddress struct { Usage []string `json:"usage,omitempty"` } +type _IpamsvcAddress IpamsvcAddress + // NewIpamsvcAddress instantiates a new IpamsvcAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -712,7 +716,7 @@ func (o *IpamsvcAddress) SetUsage(v []string) { } func (o IpamsvcAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -782,6 +786,43 @@ func (o IpamsvcAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcAddress) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcAddress := _IpamsvcAddress{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcAddress) + + if err != nil { + return err + } + + *o = IpamsvcAddress(varIpamsvcAddress) + + return err +} + type NullableIpamsvcAddress struct { value *IpamsvcAddress isSet bool @@ -817,3 +858,5 @@ func (v *NullableIpamsvcAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_address_block.go b/ipam/model_ipamsvc_address_block.go index cec0172..2266e8d 100644 --- a/ipam/model_ipamsvc_address_block.go +++ b/ipam/model_ipamsvc_address_block.go @@ -21,7 +21,7 @@ var _ MappedNullable = &IpamsvcAddressBlock{} // IpamsvcAddressBlock An __AddressBlock__ object (_ipam/address_block_) is a set of contiguous IP addresses in the same IP space with no gap, expressed as a CIDR block. Address blocks are hierarchical and may be parented to other address blocks as long as the parent block fully contains the child and no sibling overlaps. Top level address blocks are parented to an IP space. type IpamsvcAddressBlock struct { // The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. - Address *string `json:"address,omitempty"` + Address *string `json:"address,omitempty"` AsmConfig *IpamsvcASMConfig `json:"asm_config,omitempty"` // Incremented by 1 if the IP address usage limits for automated scope management are exceeded for any subnets in the address block. AsmScopeFlag *int64 `json:"asm_scope_flag,omitempty"` @@ -48,10 +48,10 @@ type IpamsvcAddressBlock struct { // Instructs the DHCP server to always update the DNS information when a lease is renewed even if its DNS information has not changed. Defaults to _false_. DdnsUpdateOnRenew *bool `json:"ddns_update_on_renew,omitempty"` // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. - DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` + DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of DHCP options for the address block. May be either a specific option or a group of options. - DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` + DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` DhcpUtilization *IpamsvcDHCPUtilization `json:"dhcp_utilization,omitempty"` // The discovery attributes for this address block in JSON format. DiscoveryAttrs map[string]interface{} `json:"discovery_attrs,omitempty"` @@ -72,7 +72,7 @@ type IpamsvcAddressBlock struct { // The resource identifier. Id *string `json:"id,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcDHCPInheritance `json:"inheritance_sources,omitempty"` // The name of the address block. May contain 1 to 256 characters. Can include UTF-8. Name *string `json:"name,omitempty"` @@ -83,13 +83,13 @@ type IpamsvcAddressBlock struct { // The resource identifier. Space *string `json:"space,omitempty"` // The tags for the address block in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` // The usage is a combination of indicators, each tracking a specific associated use. Listed below are usage indicators with their meaning: usage indicator | description ---------------------- | -------------------------------- _IPAM_ | AddressBlock is managed in BloxOne DDI. _DISCOVERED_ | AddressBlock is discovered by some network discovery probe like Network Insight or NetMRI in NIOS. - Usage []string `json:"usage,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + Usage []string `json:"usage,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } @@ -1359,7 +1359,7 @@ func (o *IpamsvcAddressBlock) SetUtilizationV6(v IpamsvcUtilizationV6) { } func (o IpamsvcAddressBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1523,3 +1523,5 @@ func (v *NullableIpamsvcAddressBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_asm.go b/ipam/model_ipamsvc_asm.go index 252a668..606990a 100644 --- a/ipam/model_ipamsvc_asm.go +++ b/ipam/model_ipamsvc_asm.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcASM type satisfies the MappedNullable interface at compile time @@ -69,6 +71,8 @@ type IpamsvcASM struct { Utilization *int64 `json:"utilization,omitempty"` } +type _IpamsvcASM IpamsvcASM + // NewIpamsvcASM instantiates a new IpamsvcASM object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -848,7 +852,7 @@ func (o *IpamsvcASM) SetUtilization(v int64) { } func (o IpamsvcASM) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -930,6 +934,43 @@ func (o IpamsvcASM) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcASM) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "subnet_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcASM := _IpamsvcASM{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcASM) + + if err != nil { + return err + } + + *o = IpamsvcASM(varIpamsvcASM) + + return err +} + type NullableIpamsvcASM struct { value *IpamsvcASM isSet bool @@ -965,3 +1006,5 @@ func (v *NullableIpamsvcASM) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_asm_config.go b/ipam/model_ipamsvc_asm_config.go index 4620d97..a3047ac 100644 --- a/ipam/model_ipamsvc_asm_config.go +++ b/ipam/model_ipamsvc_asm_config.go @@ -37,7 +37,7 @@ type IpamsvcASMConfig struct { // The minimum size of range needed for ASM to run on this subnet. MinTotal *int64 `json:"min_total,omitempty"` // The minimum percentage of addresses that must be available outside of the DHCP ranges and fixed addresses when making a suggested change.. - MinUnused *int64 `json:"min_unused,omitempty"` + MinUnused *int64 `json:"min_unused,omitempty"` ReenableDate *time.Time `json:"reenable_date,omitempty"` } @@ -415,7 +415,7 @@ func (o *IpamsvcASMConfig) SetReenableDate(v time.Time) { } func (o IpamsvcASMConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -492,3 +492,5 @@ func (v *NullableIpamsvcASMConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_asm_enable_block.go b/ipam/model_ipamsvc_asm_enable_block.go index cdaa411..328aa83 100644 --- a/ipam/model_ipamsvc_asm_enable_block.go +++ b/ipam/model_ipamsvc_asm_enable_block.go @@ -142,7 +142,7 @@ func (o *IpamsvcAsmEnableBlock) SetReenableDate(v time.Time) { } func (o IpamsvcAsmEnableBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -198,3 +198,5 @@ func (v *NullableIpamsvcAsmEnableBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_asm_growth_block.go b/ipam/model_ipamsvc_asm_growth_block.go index 6c992be..ddad1c3 100644 --- a/ipam/model_ipamsvc_asm_growth_block.go +++ b/ipam/model_ipamsvc_asm_growth_block.go @@ -107,7 +107,7 @@ func (o *IpamsvcAsmGrowthBlock) SetGrowthType(v string) { } func (o IpamsvcAsmGrowthBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcAsmGrowthBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_bulk_copy_error.go b/ipam/model_ipamsvc_bulk_copy_error.go index 4e17147..87b92fe 100644 --- a/ipam/model_ipamsvc_bulk_copy_error.go +++ b/ipam/model_ipamsvc_bulk_copy_error.go @@ -141,7 +141,7 @@ func (o *IpamsvcBulkCopyError) SetMessage(v string) { } func (o IpamsvcBulkCopyError) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableIpamsvcBulkCopyError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_bulk_copy_ip_space.go b/ipam/model_ipamsvc_bulk_copy_ip_space.go index bf4a0ea..dcd65cf 100644 --- a/ipam/model_ipamsvc_bulk_copy_ip_space.go +++ b/ipam/model_ipamsvc_bulk_copy_ip_space.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcBulkCopyIPSpace type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type IpamsvcBulkCopyIPSpace struct { Target string `json:"target"` } +type _IpamsvcBulkCopyIPSpace IpamsvcBulkCopyIPSpace + // NewIpamsvcBulkCopyIPSpace instantiates a new IpamsvcBulkCopyIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -195,7 +199,7 @@ func (o *IpamsvcBulkCopyIPSpace) SetTarget(v string) { } func (o IpamsvcBulkCopyIPSpace) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -218,6 +222,44 @@ func (o IpamsvcBulkCopyIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcBulkCopyIPSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "copy_objects", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcBulkCopyIPSpace := _IpamsvcBulkCopyIPSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcBulkCopyIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcBulkCopyIPSpace(varIpamsvcBulkCopyIPSpace) + + return err +} + type NullableIpamsvcBulkCopyIPSpace struct { value *IpamsvcBulkCopyIPSpace isSet bool @@ -253,3 +295,5 @@ func (v *NullableIpamsvcBulkCopyIPSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_bulk_copy_ip_space_response.go b/ipam/model_ipamsvc_bulk_copy_ip_space_response.go index 4dcc9a0..87c31f5 100644 --- a/ipam/model_ipamsvc_bulk_copy_ip_space_response.go +++ b/ipam/model_ipamsvc_bulk_copy_ip_space_response.go @@ -19,8 +19,8 @@ var _ MappedNullable = &IpamsvcBulkCopyIPSpaceResponse{} // IpamsvcBulkCopyIPSpaceResponse struct for IpamsvcBulkCopyIPSpaceResponse type IpamsvcBulkCopyIPSpaceResponse struct { - Errors []IpamsvcBulkCopyError `json:"errors,omitempty"` - Results []IpamsvcCopyResponse `json:"results,omitempty"` + Errors []IpamsvcBulkCopyError `json:"errors,omitempty"` + Results []IpamsvcCopyResponse `json:"results,omitempty"` } // NewIpamsvcBulkCopyIPSpaceResponse instantiates a new IpamsvcBulkCopyIPSpaceResponse object @@ -105,7 +105,7 @@ func (o *IpamsvcBulkCopyIPSpaceResponse) SetResults(v []IpamsvcCopyResponse) { } func (o IpamsvcBulkCopyIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,3 +158,5 @@ func (v *NullableIpamsvcBulkCopyIPSpaceResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_address_block.go b/ipam/model_ipamsvc_copy_address_block.go index ac70f2d..6f15272 100644 --- a/ipam/model_ipamsvc_copy_address_block.go +++ b/ipam/model_ipamsvc_copy_address_block.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcCopyAddressBlock type satisfies the MappedNullable interface at compile time @@ -35,6 +37,8 @@ type IpamsvcCopyAddressBlock struct { Space string `json:"space"` } +type _IpamsvcCopyAddressBlock IpamsvcCopyAddressBlock + // NewIpamsvcCopyAddressBlock instantiates a new IpamsvcCopyAddressBlock object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -270,7 +274,7 @@ func (o *IpamsvcCopyAddressBlock) SetSpace(v string) { } func (o IpamsvcCopyAddressBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -301,6 +305,43 @@ func (o IpamsvcCopyAddressBlock) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopyAddressBlock) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "space", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopyAddressBlock := _IpamsvcCopyAddressBlock{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcCopyAddressBlock) + + if err != nil { + return err + } + + *o = IpamsvcCopyAddressBlock(varIpamsvcCopyAddressBlock) + + return err +} + type NullableIpamsvcCopyAddressBlock struct { value *IpamsvcCopyAddressBlock isSet bool @@ -336,3 +377,5 @@ func (v *NullableIpamsvcCopyAddressBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_address_block_response.go b/ipam/model_ipamsvc_copy_address_block_response.go index 571fd07..c738d10 100644 --- a/ipam/model_ipamsvc_copy_address_block_response.go +++ b/ipam/model_ipamsvc_copy_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCopyAddressBlockResponse) SetResult(v IpamsvcCopyResponse) { } func (o IpamsvcCopyAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCopyAddressBlockResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_ip_space.go b/ipam/model_ipamsvc_copy_ip_space.go index 7fe0e96..2fb3f96 100644 --- a/ipam/model_ipamsvc_copy_ip_space.go +++ b/ipam/model_ipamsvc_copy_ip_space.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcCopyIPSpace type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type IpamsvcCopyIPSpace struct { SkipOnError *bool `json:"skip_on_error,omitempty"` } +type _IpamsvcCopyIPSpace IpamsvcCopyIPSpace + // NewIpamsvcCopyIPSpace instantiates a new IpamsvcCopyIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -202,7 +206,7 @@ func (o *IpamsvcCopyIPSpace) SetSkipOnError(v bool) { } func (o IpamsvcCopyIPSpace) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -227,6 +231,43 @@ func (o IpamsvcCopyIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopyIPSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopyIPSpace := _IpamsvcCopyIPSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcCopyIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcCopyIPSpace(varIpamsvcCopyIPSpace) + + return err +} + type NullableIpamsvcCopyIPSpace struct { value *IpamsvcCopyIPSpace isSet bool @@ -262,3 +303,5 @@ func (v *NullableIpamsvcCopyIPSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_ip_space_response.go b/ipam/model_ipamsvc_copy_ip_space_response.go index af980d9..deb8ebf 100644 --- a/ipam/model_ipamsvc_copy_ip_space_response.go +++ b/ipam/model_ipamsvc_copy_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCopyIPSpaceResponse) SetResult(v IpamsvcCopyResponse) { } func (o IpamsvcCopyIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCopyIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_response.go b/ipam/model_ipamsvc_copy_response.go index 52a2270..12d4b79 100644 --- a/ipam/model_ipamsvc_copy_response.go +++ b/ipam/model_ipamsvc_copy_response.go @@ -141,7 +141,7 @@ func (o *IpamsvcCopyResponse) SetJobId(v string) { } func (o IpamsvcCopyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableIpamsvcCopyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_subnet.go b/ipam/model_ipamsvc_copy_subnet.go index 43c101b..4121d7f 100644 --- a/ipam/model_ipamsvc_copy_subnet.go +++ b/ipam/model_ipamsvc_copy_subnet.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcCopySubnet type satisfies the MappedNullable interface at compile time @@ -35,6 +37,8 @@ type IpamsvcCopySubnet struct { Space string `json:"space"` } +type _IpamsvcCopySubnet IpamsvcCopySubnet + // NewIpamsvcCopySubnet instantiates a new IpamsvcCopySubnet object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -270,7 +274,7 @@ func (o *IpamsvcCopySubnet) SetSpace(v string) { } func (o IpamsvcCopySubnet) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -301,6 +305,43 @@ func (o IpamsvcCopySubnet) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopySubnet) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "space", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopySubnet := _IpamsvcCopySubnet{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcCopySubnet) + + if err != nil { + return err + } + + *o = IpamsvcCopySubnet(varIpamsvcCopySubnet) + + return err +} + type NullableIpamsvcCopySubnet struct { value *IpamsvcCopySubnet isSet bool @@ -336,3 +377,5 @@ func (v *NullableIpamsvcCopySubnet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_copy_subnet_response.go b/ipam/model_ipamsvc_copy_subnet_response.go index 0fd2882..5a6e7d5 100644 --- a/ipam/model_ipamsvc_copy_subnet_response.go +++ b/ipam/model_ipamsvc_copy_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCopySubnetResponse) SetResult(v IpamsvcCopyResponse) { } func (o IpamsvcCopySubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCopySubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_address_block_response.go b/ipam/model_ipamsvc_create_address_block_response.go index 88b0bc4..276e5c3 100644 --- a/ipam/model_ipamsvc_create_address_block_response.go +++ b/ipam/model_ipamsvc_create_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateAddressBlockResponse) SetResult(v IpamsvcAddressBlock) { } func (o IpamsvcCreateAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateAddressBlockResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_address_response.go b/ipam/model_ipamsvc_create_address_response.go index 66e001a..20786f2 100644 --- a/ipam/model_ipamsvc_create_address_response.go +++ b/ipam/model_ipamsvc_create_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateAddressResponse) SetResult(v IpamsvcAddress) { } func (o IpamsvcCreateAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_asm_response.go b/ipam/model_ipamsvc_create_asm_response.go index 1edab41..506ddaa 100644 --- a/ipam/model_ipamsvc_create_asm_response.go +++ b/ipam/model_ipamsvc_create_asm_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateASMResponse) SetResult(v IpamsvcASM) { } func (o IpamsvcCreateASMResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateASMResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_fixed_address_response.go b/ipam/model_ipamsvc_create_fixed_address_response.go index 54c3ce8..4a0f9c9 100644 --- a/ipam/model_ipamsvc_create_fixed_address_response.go +++ b/ipam/model_ipamsvc_create_fixed_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateFixedAddressResponse) SetResult(v IpamsvcFixedAddress) { } func (o IpamsvcCreateFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateFixedAddressResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_ha_group_response.go b/ipam/model_ipamsvc_create_ha_group_response.go index 12c0367..a69a9fc 100644 --- a/ipam/model_ipamsvc_create_ha_group_response.go +++ b/ipam/model_ipamsvc_create_ha_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateHAGroupResponse) SetResult(v IpamsvcHAGroup) { } func (o IpamsvcCreateHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_hardware_filter_response.go b/ipam/model_ipamsvc_create_hardware_filter_response.go index 781a36b..60be7da 100644 --- a/ipam/model_ipamsvc_create_hardware_filter_response.go +++ b/ipam/model_ipamsvc_create_hardware_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateHardwareFilterResponse) SetResult(v IpamsvcHardwareFilter) } func (o IpamsvcCreateHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateHardwareFilterResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_ip_space_response.go b/ipam/model_ipamsvc_create_ip_space_response.go index 3a5edd3..cb83db3 100644 --- a/ipam/model_ipamsvc_create_ip_space_response.go +++ b/ipam/model_ipamsvc_create_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateIPSpaceResponse) SetResult(v IpamsvcIPSpace) { } func (o IpamsvcCreateIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_ipam_host_response.go b/ipam/model_ipamsvc_create_ipam_host_response.go index 7dee77b..e54f3e0 100644 --- a/ipam/model_ipamsvc_create_ipam_host_response.go +++ b/ipam/model_ipamsvc_create_ipam_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateIpamHostResponse) SetResult(v IpamsvcIpamHost) { } func (o IpamsvcCreateIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateIpamHostResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_leases_command_response.go b/ipam/model_ipamsvc_create_leases_command_response.go index af034a4..f48ea56 100644 --- a/ipam/model_ipamsvc_create_leases_command_response.go +++ b/ipam/model_ipamsvc_create_leases_command_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateLeasesCommandResponse) SetSuccess(v string) { } func (o IpamsvcCreateLeasesCommandResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateLeasesCommandResponse) UnmarshalJSON(src []byte) e v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_next_available_ab_response.go b/ipam/model_ipamsvc_create_next_available_ab_response.go index 400ddeb..0b98f60 100644 --- a/ipam/model_ipamsvc_create_next_available_ab_response.go +++ b/ipam/model_ipamsvc_create_next_available_ab_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcCreateNextAvailableABResponse) SetResults(v []IpamsvcAddressBloc } func (o IpamsvcCreateNextAvailableABResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcCreateNextAvailableABResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_next_available_ip_response.go b/ipam/model_ipamsvc_create_next_available_ip_response.go index 8a86963..71d3102 100644 --- a/ipam/model_ipamsvc_create_next_available_ip_response.go +++ b/ipam/model_ipamsvc_create_next_available_ip_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcCreateNextAvailableIPResponse) SetResults(v []IpamsvcAddress) { } func (o IpamsvcCreateNextAvailableIPResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcCreateNextAvailableIPResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_next_available_subnet_response.go b/ipam/model_ipamsvc_create_next_available_subnet_response.go index 9757576..62b0ca1 100644 --- a/ipam/model_ipamsvc_create_next_available_subnet_response.go +++ b/ipam/model_ipamsvc_create_next_available_subnet_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcCreateNextAvailableSubnetResponse) SetResults(v []IpamsvcSubnet) } func (o IpamsvcCreateNextAvailableSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcCreateNextAvailableSubnetResponse) UnmarshalJSON(src []b v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_option_code_response.go b/ipam/model_ipamsvc_create_option_code_response.go index 2b1fc4a..3accc52 100644 --- a/ipam/model_ipamsvc_create_option_code_response.go +++ b/ipam/model_ipamsvc_create_option_code_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionCodeResponse) SetResult(v IpamsvcOptionCode) { } func (o IpamsvcCreateOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateOptionCodeResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_option_filter_response.go b/ipam/model_ipamsvc_create_option_filter_response.go index 6cbb71c..cfb29ce 100644 --- a/ipam/model_ipamsvc_create_option_filter_response.go +++ b/ipam/model_ipamsvc_create_option_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionFilterResponse) SetResult(v IpamsvcOptionFilter) { } func (o IpamsvcCreateOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateOptionFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_option_group_response.go b/ipam/model_ipamsvc_create_option_group_response.go index e3a43ef..7ece497 100644 --- a/ipam/model_ipamsvc_create_option_group_response.go +++ b/ipam/model_ipamsvc_create_option_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionGroupResponse) SetResult(v IpamsvcOptionGroup) { } func (o IpamsvcCreateOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateOptionGroupResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_option_space_response.go b/ipam/model_ipamsvc_create_option_space_response.go index 81b45ed..98a1fae 100644 --- a/ipam/model_ipamsvc_create_option_space_response.go +++ b/ipam/model_ipamsvc_create_option_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionSpaceResponse) SetResult(v IpamsvcOptionSpace) { } func (o IpamsvcCreateOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateOptionSpaceResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_range_response.go b/ipam/model_ipamsvc_create_range_response.go index 2c1d4a1..7a00f53 100644 --- a/ipam/model_ipamsvc_create_range_response.go +++ b/ipam/model_ipamsvc_create_range_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateRangeResponse) SetResult(v IpamsvcRange) { } func (o IpamsvcCreateRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_server_response.go b/ipam/model_ipamsvc_create_server_response.go index 2df45fd..9bc4c16 100644 --- a/ipam/model_ipamsvc_create_server_response.go +++ b/ipam/model_ipamsvc_create_server_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateServerResponse) SetResult(v IpamsvcServer) { } func (o IpamsvcCreateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_create_subnet_response.go b/ipam/model_ipamsvc_create_subnet_response.go index dcc2871..be7a4ea 100644 --- a/ipam/model_ipamsvc_create_subnet_response.go +++ b/ipam/model_ipamsvc_create_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateSubnetResponse) SetResult(v IpamsvcSubnet) { } func (o IpamsvcCreateSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcCreateSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ddns_block.go b/ipam/model_ipamsvc_ddns_block.go index af9b6fb..3bedbb4 100644 --- a/ipam/model_ipamsvc_ddns_block.go +++ b/ipam/model_ipamsvc_ddns_block.go @@ -481,7 +481,7 @@ func (o *IpamsvcDDNSBlock) SetServerPrincipal(v string) { } func (o IpamsvcDDNSBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -567,3 +567,5 @@ func (v *NullableIpamsvcDDNSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ddns_hostname_block.go b/ipam/model_ipamsvc_ddns_hostname_block.go index 33ca429..5511ef5 100644 --- a/ipam/model_ipamsvc_ddns_hostname_block.go +++ b/ipam/model_ipamsvc_ddns_hostname_block.go @@ -107,7 +107,7 @@ func (o *IpamsvcDDNSHostnameBlock) SetDdnsGeneratedPrefix(v string) { } func (o IpamsvcDDNSHostnameBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcDDNSHostnameBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ddns_update_block.go b/ipam/model_ipamsvc_ddns_update_block.go index 8ca0635..3cb57e6 100644 --- a/ipam/model_ipamsvc_ddns_update_block.go +++ b/ipam/model_ipamsvc_ddns_update_block.go @@ -107,7 +107,7 @@ func (o *IpamsvcDDNSUpdateBlock) SetDdnsSendUpdates(v bool) { } func (o IpamsvcDDNSUpdateBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcDDNSUpdateBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ddns_zone.go b/ipam/model_ipamsvc_ddns_zone.go index c076f5d..60c0bdd 100644 --- a/ipam/model_ipamsvc_ddns_zone.go +++ b/ipam/model_ipamsvc_ddns_zone.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcDDNSZone type satisfies the MappedNullable interface at compile time @@ -26,8 +28,8 @@ type IpamsvcDDNSZone struct { // The Nameservers in the zone. Each nameserver IP should be unique across the list of nameservers. Nameservers []IpamsvcNameserver `json:"nameservers,omitempty"` // Indicates if TSIG key should be used for the update. Defaults to _false_. - TsigEnabled *bool `json:"tsig_enabled,omitempty"` - TsigKey *IpamsvcTSIGKey `json:"tsig_key,omitempty"` + TsigEnabled *bool `json:"tsig_enabled,omitempty"` + TsigKey *IpamsvcTSIGKey `json:"tsig_key,omitempty"` // The resource identifier. View *string `json:"view,omitempty"` // The name of the view. @@ -36,6 +38,8 @@ type IpamsvcDDNSZone struct { Zone string `json:"zone"` } +type _IpamsvcDDNSZone IpamsvcDDNSZone + // NewIpamsvcDDNSZone instantiates a new IpamsvcDDNSZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -303,7 +307,7 @@ func (o *IpamsvcDDNSZone) SetZone(v string) { } func (o IpamsvcDDNSZone) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -337,6 +341,43 @@ func (o IpamsvcDDNSZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcDDNSZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcDDNSZone := _IpamsvcDDNSZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcDDNSZone) + + if err != nil { + return err + } + + *o = IpamsvcDDNSZone(varIpamsvcDDNSZone) + + return err +} + type NullableIpamsvcDDNSZone struct { value *IpamsvcDDNSZone isSet bool @@ -372,3 +413,5 @@ func (v *NullableIpamsvcDDNSZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_config.go b/ipam/model_ipamsvc_dhcp_config.go index fe59f6c..8b9fb98 100644 --- a/ipam/model_ipamsvc_dhcp_config.go +++ b/ipam/model_ipamsvc_dhcp_config.go @@ -407,7 +407,7 @@ func (o *IpamsvcDHCPConfig) SetLeaseTimeV6(v int64) { } func (o IpamsvcDHCPConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -484,3 +484,5 @@ func (v *NullableIpamsvcDHCPConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_info.go b/ipam/model_ipamsvc_dhcp_info.go index 9291c6f..bbc865e 100644 --- a/ipam/model_ipamsvc_dhcp_info.go +++ b/ipam/model_ipamsvc_dhcp_info.go @@ -448,7 +448,7 @@ func (o *IpamsvcDHCPInfo) SetStateTs(v time.Time) { } func (o IpamsvcDHCPInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -531,3 +531,5 @@ func (v *NullableIpamsvcDHCPInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_inheritance.go b/ipam/model_ipamsvc_dhcp_inheritance.go index 73d6cb8..dfb4684 100644 --- a/ipam/model_ipamsvc_dhcp_inheritance.go +++ b/ipam/model_ipamsvc_dhcp_inheritance.go @@ -19,21 +19,21 @@ var _ MappedNullable = &IpamsvcDHCPInheritance{} // IpamsvcDHCPInheritance The __DHCPInheritance__ object specifies how the _dhcp_config_, _dhcp_options_ and _asm_config_ configuration fields are inherited from the parent object. type IpamsvcDHCPInheritance struct { - AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` - DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` - DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` - DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` - DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` - DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` - DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` - DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` - DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` - HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` + AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` + DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` + DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` + DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` + DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` + DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` + DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` + DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` + DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` } // NewIpamsvcDHCPInheritance instantiates a new IpamsvcDHCPInheritance object @@ -534,7 +534,7 @@ func (o *IpamsvcDHCPInheritance) SetHostnameRewriteBlock(v IpamsvcInheritedHostn } func (o IpamsvcDHCPInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -626,3 +626,5 @@ func (v *NullableIpamsvcDHCPInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_options_inheritance.go b/ipam/model_ipamsvc_dhcp_options_inheritance.go index d98f3ac..23c656a 100644 --- a/ipam/model_ipamsvc_dhcp_options_inheritance.go +++ b/ipam/model_ipamsvc_dhcp_options_inheritance.go @@ -72,7 +72,7 @@ func (o *IpamsvcDHCPOptionsInheritance) SetDhcpOptions(v IpamsvcInheritedDHCPOpt } func (o IpamsvcDHCPOptionsInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcDHCPOptionsInheritance) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_packet_stats.go b/ipam/model_ipamsvc_dhcp_packet_stats.go index e6d8fc6..c18212f 100644 --- a/ipam/model_ipamsvc_dhcp_packet_stats.go +++ b/ipam/model_ipamsvc_dhcp_packet_stats.go @@ -243,7 +243,7 @@ func (o *IpamsvcDHCPPacketStats) SetDhcpReqReceivedV6(v string) { } func (o IpamsvcDHCPPacketStats) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,3 +308,5 @@ func (v *NullableIpamsvcDHCPPacketStats) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_utilization.go b/ipam/model_ipamsvc_dhcp_utilization.go index ff847e2..e59214f 100644 --- a/ipam/model_ipamsvc_dhcp_utilization.go +++ b/ipam/model_ipamsvc_dhcp_utilization.go @@ -175,7 +175,7 @@ func (o *IpamsvcDHCPUtilization) SetDhcpUtilization(v int64) { } func (o IpamsvcDHCPUtilization) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableIpamsvcDHCPUtilization) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dhcp_utilization_threshold.go b/ipam/model_ipamsvc_dhcp_utilization_threshold.go index a897e08..5081daa 100644 --- a/ipam/model_ipamsvc_dhcp_utilization_threshold.go +++ b/ipam/model_ipamsvc_dhcp_utilization_threshold.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcDHCPUtilizationThreshold type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcDHCPUtilizationThreshold struct { Low int64 `json:"low"` } +type _IpamsvcDHCPUtilizationThreshold IpamsvcDHCPUtilizationThreshold + // NewIpamsvcDHCPUtilizationThreshold instantiates a new IpamsvcDHCPUtilizationThreshold object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -120,7 +124,7 @@ func (o *IpamsvcDHCPUtilizationThreshold) SetLow(v int64) { } func (o IpamsvcDHCPUtilizationThreshold) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -135,6 +139,45 @@ func (o IpamsvcDHCPUtilizationThreshold) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *IpamsvcDHCPUtilizationThreshold) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "high", + "low", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcDHCPUtilizationThreshold := _IpamsvcDHCPUtilizationThreshold{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcDHCPUtilizationThreshold) + + if err != nil { + return err + } + + *o = IpamsvcDHCPUtilizationThreshold(varIpamsvcDHCPUtilizationThreshold) + + return err +} + type NullableIpamsvcDHCPUtilizationThreshold struct { value *IpamsvcDHCPUtilizationThreshold isSet bool @@ -170,3 +213,5 @@ func (v *NullableIpamsvcDHCPUtilizationThreshold) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_dns_usage.go b/ipam/model_ipamsvc_dns_usage.go index 34f078e..6b295aa 100644 --- a/ipam/model_ipamsvc_dns_usage.go +++ b/ipam/model_ipamsvc_dns_usage.go @@ -379,7 +379,7 @@ func (o *IpamsvcDNSUsage) SetZone(v string) { } func (o IpamsvcDNSUsage) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -456,3 +456,5 @@ func (v *NullableIpamsvcDNSUsage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_exclusion_range.go b/ipam/model_ipamsvc_exclusion_range.go index 5f01e73..02afd00 100644 --- a/ipam/model_ipamsvc_exclusion_range.go +++ b/ipam/model_ipamsvc_exclusion_range.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcExclusionRange type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcExclusionRange struct { Start string `json:"start"` } +type _IpamsvcExclusionRange IpamsvcExclusionRange + // NewIpamsvcExclusionRange instantiates a new IpamsvcExclusionRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -127,7 +131,7 @@ func (o *IpamsvcExclusionRange) SetStart(v string) { } func (o IpamsvcExclusionRange) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -144,6 +148,44 @@ func (o IpamsvcExclusionRange) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcExclusionRange) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "end", + "start", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcExclusionRange := _IpamsvcExclusionRange{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcExclusionRange) + + if err != nil { + return err + } + + *o = IpamsvcExclusionRange(varIpamsvcExclusionRange) + + return err +} + type NullableIpamsvcExclusionRange struct { value *IpamsvcExclusionRange isSet bool @@ -179,3 +221,5 @@ func (v *NullableIpamsvcExclusionRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_filter.go b/ipam/model_ipamsvc_filter.go index af41c5c..c10741c 100644 --- a/ipam/model_ipamsvc_filter.go +++ b/ipam/model_ipamsvc_filter.go @@ -277,7 +277,7 @@ func (o *IpamsvcFilter) SetType(v string) { } func (o IpamsvcFilter) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -345,3 +345,5 @@ func (v *NullableIpamsvcFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_fixed_address.go b/ipam/model_ipamsvc_fixed_address.go index f03d532..bc33c52 100644 --- a/ipam/model_ipamsvc_fixed_address.go +++ b/ipam/model_ipamsvc_fixed_address.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcFixedAddress type satisfies the MappedNullable interface at compile time @@ -43,7 +45,7 @@ type IpamsvcFixedAddress struct { // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []InheritanceAssignedHost `json:"inheritance_assigned_hosts,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcFixedAddressInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpSpace *string `json:"ip_space,omitempty"` @@ -61,6 +63,8 @@ type IpamsvcFixedAddress struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcFixedAddress IpamsvcFixedAddress + // NewIpamsvcFixedAddress instantiates a new IpamsvcFixedAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -698,7 +702,7 @@ func (o *IpamsvcFixedAddress) SetUpdatedAt(v time.Time) { } func (o IpamsvcFixedAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -764,6 +768,45 @@ func (o IpamsvcFixedAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcFixedAddress) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "match_type", + "match_value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcFixedAddress := _IpamsvcFixedAddress{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcFixedAddress) + + if err != nil { + return err + } + + *o = IpamsvcFixedAddress(varIpamsvcFixedAddress) + + return err +} + type NullableIpamsvcFixedAddress struct { value *IpamsvcFixedAddress isSet bool @@ -799,3 +842,5 @@ func (v *NullableIpamsvcFixedAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_fixed_address_inheritance.go b/ipam/model_ipamsvc_fixed_address_inheritance.go index 70db364..e51f08a 100644 --- a/ipam/model_ipamsvc_fixed_address_inheritance.go +++ b/ipam/model_ipamsvc_fixed_address_inheritance.go @@ -19,10 +19,10 @@ var _ MappedNullable = &IpamsvcFixedAddressInheritance{} // IpamsvcFixedAddressInheritance The __FixedAddressInheritance__ object specifies how and which fields _FixedAddress_ object inherits from the parent. type IpamsvcFixedAddressInheritance struct { - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` } // NewIpamsvcFixedAddressInheritance instantiates a new IpamsvcFixedAddressInheritance object @@ -171,7 +171,7 @@ func (o *IpamsvcFixedAddressInheritance) SetHeaderOptionServerName(v Inheritance } func (o IpamsvcFixedAddressInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -230,3 +230,5 @@ func (v *NullableIpamsvcFixedAddressInheritance) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_global.go b/ipam/model_ipamsvc_global.go index f855a41..b0bd2fb 100644 --- a/ipam/model_ipamsvc_global.go +++ b/ipam/model_ipamsvc_global.go @@ -43,12 +43,12 @@ type IpamsvcGlobal struct { // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` // DNS zones that DDNS updates can be sent to. There is no resolver fallback. The target zone must be explicitly configured for the update to be performed. Updates are sent to the closest enclosing zone. Error if _ddns_enabled_ is _true_ and the _ddns_domain_ does not have a corresponding entry in _ddns_zones_. Error if there are items with duplicate zone in the list. Defaults to empty list. - DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` + DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of DHCP options or group of options for IPv4. An option list is ordered and may include both option groups and specific options. Multiple occurrences of the same option or group is not an error. The last occurrence of an option in the list will be used. Error if the graph of referenced groups contains cycles. Defaults to empty list. DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` // The list of DHCP options or group of options for IPv6. An option list is ordered and may include both option groups and specific options. Multiple occurrences of the same option or group is not an error. The last occurrence of an option in the list will be used. Error if the graph of referenced groups contains cycles. Defaults to empty list. - DhcpOptionsV6 []IpamsvcOptionItem `json:"dhcp_options_v6,omitempty"` + DhcpOptionsV6 []IpamsvcOptionItem `json:"dhcp_options_v6,omitempty"` DhcpThreshold *IpamsvcDHCPUtilizationThreshold `json:"dhcp_threshold,omitempty"` // The behavior when GSS-TSIG should be used (a matching external DNS server is configured) but no GSS-TSIG key is available. If configured to _false_ (the default) this DNS server is skipped, if configured to _true_ the DNS server is ignored and the DNS update is sent with the configured DHCP-DDNS protection e.g. TSIG key or without any protection when none was configured. Defaults to _false_. GssTsigFallback *bool `json:"gss_tsig_fallback,omitempty"` @@ -1226,7 +1226,7 @@ func (o *IpamsvcGlobal) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcGlobal) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1378,3 +1378,5 @@ func (v *NullableIpamsvcGlobal) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ha_group.go b/ipam/model_ipamsvc_ha_group.go index a6c11e5..1bd6fa4 100644 --- a/ipam/model_ipamsvc_ha_group.go +++ b/ipam/model_ipamsvc_ha_group.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcHAGroup type satisfies the MappedNullable interface at compile time @@ -44,6 +46,8 @@ type IpamsvcHAGroup struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcHAGroup IpamsvcHAGroup + // NewIpamsvcHAGroup instantiates a new IpamsvcHAGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -400,7 +404,7 @@ func (o *IpamsvcHAGroup) SetUpdatedAt(v time.Time) { } func (o IpamsvcHAGroup) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -441,6 +445,44 @@ func (o IpamsvcHAGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHAGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "hosts", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHAGroup := _IpamsvcHAGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHAGroup) + + if err != nil { + return err + } + + *o = IpamsvcHAGroup(varIpamsvcHAGroup) + + return err +} + type NullableIpamsvcHAGroup struct { value *IpamsvcHAGroup isSet bool @@ -476,3 +518,5 @@ func (v *NullableIpamsvcHAGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ha_group_heartbeats.go b/ipam/model_ipamsvc_ha_group_heartbeats.go index 52d1c85..f74cdee 100644 --- a/ipam/model_ipamsvc_ha_group_heartbeats.go +++ b/ipam/model_ipamsvc_ha_group_heartbeats.go @@ -107,7 +107,7 @@ func (o *IpamsvcHAGroupHeartbeats) SetSuccessfulHeartbeat(v string) { } func (o IpamsvcHAGroupHeartbeats) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcHAGroupHeartbeats) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ha_group_host.go b/ipam/model_ipamsvc_ha_group_host.go index 82d24a1..fe90439 100644 --- a/ipam/model_ipamsvc_ha_group_host.go +++ b/ipam/model_ipamsvc_ha_group_host.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcHAGroupHost type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type IpamsvcHAGroupHost struct { State *string `json:"state,omitempty"` } +type _IpamsvcHAGroupHost IpamsvcHAGroupHost + // NewIpamsvcHAGroupHost instantiates a new IpamsvcHAGroupHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -236,7 +240,7 @@ func (o *IpamsvcHAGroupHost) SetState(v string) { } func (o IpamsvcHAGroupHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,6 +268,43 @@ func (o IpamsvcHAGroupHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHAGroupHost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "host", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHAGroupHost := _IpamsvcHAGroupHost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHAGroupHost) + + if err != nil { + return err + } + + *o = IpamsvcHAGroupHost(varIpamsvcHAGroupHost) + + return err +} + type NullableIpamsvcHAGroupHost struct { value *IpamsvcHAGroupHost isSet bool @@ -299,3 +340,5 @@ func (v *NullableIpamsvcHAGroupHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_hardware_filter.go b/ipam/model_ipamsvc_hardware_filter.go index 357c0b9..3a6772e 100644 --- a/ipam/model_ipamsvc_hardware_filter.go +++ b/ipam/model_ipamsvc_hardware_filter.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcHardwareFilter type satisfies the MappedNullable interface at compile time @@ -50,6 +52,8 @@ type IpamsvcHardwareFilter struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcHardwareFilter IpamsvcHardwareFilter + // NewIpamsvcHardwareFilter instantiates a new IpamsvcHardwareFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -509,7 +513,7 @@ func (o *IpamsvcHardwareFilter) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcHardwareFilter) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -561,6 +565,43 @@ func (o IpamsvcHardwareFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHardwareFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHardwareFilter := _IpamsvcHardwareFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHardwareFilter) + + if err != nil { + return err + } + + *o = IpamsvcHardwareFilter(varIpamsvcHardwareFilter) + + return err +} + type NullableIpamsvcHardwareFilter struct { value *IpamsvcHardwareFilter isSet bool @@ -596,3 +637,5 @@ func (v *NullableIpamsvcHardwareFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_host.go b/ipam/model_ipamsvc_host.go index 78a8153..f927dbb 100644 --- a/ipam/model_ipamsvc_host.go +++ b/ipam/model_ipamsvc_host.go @@ -22,7 +22,7 @@ type IpamsvcHost struct { // The primary IP address of the on-prem host. Address *string `json:"address,omitempty"` // Anycast address configured to the host. Order is not significant. - AnycastAddresses []string `json:"anycast_addresses,omitempty"` + AnycastAddresses []string `json:"anycast_addresses,omitempty"` AssociatedServer *IpamsvcHostAssociatedServer `json:"associated_server,omitempty"` // The description for the on-prem host. Comment *string `json:"comment,omitempty"` @@ -480,7 +480,7 @@ func (o *IpamsvcHost) SetType(v string) { } func (o IpamsvcHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -566,3 +566,5 @@ func (v *NullableIpamsvcHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_host_address.go b/ipam/model_ipamsvc_host_address.go index 785dd64..345d31c 100644 --- a/ipam/model_ipamsvc_host_address.go +++ b/ipam/model_ipamsvc_host_address.go @@ -141,7 +141,7 @@ func (o *IpamsvcHostAddress) SetSpace(v string) { } func (o IpamsvcHostAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableIpamsvcHostAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_host_associated_server.go b/ipam/model_ipamsvc_host_associated_server.go index a1d2706..88cbfa9 100644 --- a/ipam/model_ipamsvc_host_associated_server.go +++ b/ipam/model_ipamsvc_host_associated_server.go @@ -107,7 +107,7 @@ func (o *IpamsvcHostAssociatedServer) SetName(v string) { } func (o IpamsvcHostAssociatedServer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcHostAssociatedServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_host_associations_response.go b/ipam/model_ipamsvc_host_associations_response.go index 7abc8df..4ef2cea 100644 --- a/ipam/model_ipamsvc_host_associations_response.go +++ b/ipam/model_ipamsvc_host_associations_response.go @@ -22,7 +22,7 @@ type IpamsvcHostAssociationsResponse struct { DhcpPktStats *IpamsvcDHCPPacketStats `json:"dhcp_pkt_stats,omitempty"` // The list of HA groups. HaGroups []IpamsvcHAGroup `json:"ha_groups,omitempty"` - Host *IpamsvcHost `json:"host,omitempty"` + Host *IpamsvcHost `json:"host,omitempty"` // The list of subnets. Subnets []IpamsvcSubnet `json:"subnets,omitempty"` } @@ -173,7 +173,7 @@ func (o *IpamsvcHostAssociationsResponse) SetSubnets(v []IpamsvcSubnet) { } func (o IpamsvcHostAssociationsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -232,3 +232,5 @@ func (v *NullableIpamsvcHostAssociationsResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_host_name.go b/ipam/model_ipamsvc_host_name.go index e728d63..3c7c140 100644 --- a/ipam/model_ipamsvc_host_name.go +++ b/ipam/model_ipamsvc_host_name.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcHostName type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type IpamsvcHostName struct { Zone string `json:"zone"` } +type _IpamsvcHostName IpamsvcHostName + // NewIpamsvcHostName instantiates a new IpamsvcHostName object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -161,7 +165,7 @@ func (o *IpamsvcHostName) SetZone(v string) { } func (o IpamsvcHostName) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -181,6 +185,44 @@ func (o IpamsvcHostName) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHostName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHostName := _IpamsvcHostName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHostName) + + if err != nil { + return err + } + + *o = IpamsvcHostName(varIpamsvcHostName) + + return err +} + type NullableIpamsvcHostName struct { value *IpamsvcHostName isSet bool @@ -216,3 +258,5 @@ func (v *NullableIpamsvcHostName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_hostname_rewrite_block.go b/ipam/model_ipamsvc_hostname_rewrite_block.go index c36bd78..dcfd904 100644 --- a/ipam/model_ipamsvc_hostname_rewrite_block.go +++ b/ipam/model_ipamsvc_hostname_rewrite_block.go @@ -141,7 +141,7 @@ func (o *IpamsvcHostnameRewriteBlock) SetHostnameRewriteRegex(v string) { } func (o IpamsvcHostnameRewriteBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,3 +197,5 @@ func (v *NullableIpamsvcHostnameRewriteBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ignore_item.go b/ipam/model_ipamsvc_ignore_item.go index 8ee7184..7d3dcd5 100644 --- a/ipam/model_ipamsvc_ignore_item.go +++ b/ipam/model_ipamsvc_ignore_item.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcIgnoreItem type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type IpamsvcIgnoreItem struct { Value string `json:"value"` } +type _IpamsvcIgnoreItem IpamsvcIgnoreItem + // NewIpamsvcIgnoreItem instantiates a new IpamsvcIgnoreItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -93,7 +97,7 @@ func (o *IpamsvcIgnoreItem) SetValue(v string) { } func (o IpamsvcIgnoreItem) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -107,6 +111,44 @@ func (o IpamsvcIgnoreItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIgnoreItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIgnoreItem := _IpamsvcIgnoreItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcIgnoreItem) + + if err != nil { + return err + } + + *o = IpamsvcIgnoreItem(varIpamsvcIgnoreItem) + + return err +} + type NullableIpamsvcIgnoreItem struct { value *IpamsvcIgnoreItem isSet bool @@ -142,3 +184,5 @@ func (v *NullableIpamsvcIgnoreItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_asm_config.go b/ipam/model_ipamsvc_inherited_asm_config.go index 8f39e3d..fdd80fb 100644 --- a/ipam/model_ipamsvc_inherited_asm_config.go +++ b/ipam/model_ipamsvc_inherited_asm_config.go @@ -21,11 +21,11 @@ var _ MappedNullable = &IpamsvcInheritedASMConfig{} type IpamsvcInheritedASMConfig struct { AsmEnableBlock *IpamsvcInheritedAsmEnableBlock `json:"asm_enable_block,omitempty"` AsmGrowthBlock *IpamsvcInheritedAsmGrowthBlock `json:"asm_growth_block,omitempty"` - AsmThreshold *InheritanceInheritedUInt32 `json:"asm_threshold,omitempty"` - ForecastPeriod *InheritanceInheritedUInt32 `json:"forecast_period,omitempty"` - History *InheritanceInheritedUInt32 `json:"history,omitempty"` - MinTotal *InheritanceInheritedUInt32 `json:"min_total,omitempty"` - MinUnused *InheritanceInheritedUInt32 `json:"min_unused,omitempty"` + AsmThreshold *InheritanceInheritedUInt32 `json:"asm_threshold,omitempty"` + ForecastPeriod *InheritanceInheritedUInt32 `json:"forecast_period,omitempty"` + History *InheritanceInheritedUInt32 `json:"history,omitempty"` + MinTotal *InheritanceInheritedUInt32 `json:"min_total,omitempty"` + MinUnused *InheritanceInheritedUInt32 `json:"min_unused,omitempty"` } // NewIpamsvcInheritedASMConfig instantiates a new IpamsvcInheritedASMConfig object @@ -270,7 +270,7 @@ func (o *IpamsvcInheritedASMConfig) SetMinUnused(v InheritanceInheritedUInt32) { } func (o IpamsvcInheritedASMConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -338,3 +338,5 @@ func (v *NullableIpamsvcInheritedASMConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_asm_enable_block.go b/ipam/model_ipamsvc_inherited_asm_enable_block.go index 4122e6c..0b86bb6 100644 --- a/ipam/model_ipamsvc_inherited_asm_enable_block.go +++ b/ipam/model_ipamsvc_inherited_asm_enable_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedAsmEnableBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcAsmEnableBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcAsmEnableBlock `json:"value,omitempty"` } // NewIpamsvcInheritedAsmEnableBlock instantiates a new IpamsvcInheritedAsmEnableBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedAsmEnableBlock) SetValue(v IpamsvcAsmEnableBlock) { } func (o IpamsvcInheritedAsmEnableBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedAsmEnableBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_asm_growth_block.go b/ipam/model_ipamsvc_inherited_asm_growth_block.go index 1671c66..b3e6f2e 100644 --- a/ipam/model_ipamsvc_inherited_asm_growth_block.go +++ b/ipam/model_ipamsvc_inherited_asm_growth_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedAsmGrowthBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcAsmGrowthBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcAsmGrowthBlock `json:"value,omitempty"` } // NewIpamsvcInheritedAsmGrowthBlock instantiates a new IpamsvcInheritedAsmGrowthBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedAsmGrowthBlock) SetValue(v IpamsvcAsmGrowthBlock) { } func (o IpamsvcInheritedAsmGrowthBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedAsmGrowthBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_ddns_block.go b/ipam/model_ipamsvc_inherited_ddns_block.go index 3118b48..58481eb 100644 --- a/ipam/model_ipamsvc_inherited_ddns_block.go +++ b/ipam/model_ipamsvc_inherited_ddns_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDDNSBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcDDNSBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcDDNSBlock `json:"value,omitempty"` } // NewIpamsvcInheritedDDNSBlock instantiates a new IpamsvcInheritedDDNSBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDDNSBlock) SetValue(v IpamsvcDDNSBlock) { } func (o IpamsvcInheritedDDNSBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedDDNSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_ddns_hostname_block.go b/ipam/model_ipamsvc_inherited_ddns_hostname_block.go index 0676a6c..31a4d3b 100644 --- a/ipam/model_ipamsvc_inherited_ddns_hostname_block.go +++ b/ipam/model_ipamsvc_inherited_ddns_hostname_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDDNSHostnameBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcDDNSHostnameBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcDDNSHostnameBlock `json:"value,omitempty"` } // NewIpamsvcInheritedDDNSHostnameBlock instantiates a new IpamsvcInheritedDDNSHostnameBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDDNSHostnameBlock) SetValue(v IpamsvcDDNSHostnameBlock) } func (o IpamsvcInheritedDDNSHostnameBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedDDNSHostnameBlock) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_ddns_update_block.go b/ipam/model_ipamsvc_inherited_ddns_update_block.go index 99f4f4c..8acf3a1 100644 --- a/ipam/model_ipamsvc_inherited_ddns_update_block.go +++ b/ipam/model_ipamsvc_inherited_ddns_update_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDDNSUpdateBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcDDNSUpdateBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcDDNSUpdateBlock `json:"value,omitempty"` } // NewIpamsvcInheritedDDNSUpdateBlock instantiates a new IpamsvcInheritedDDNSUpdateBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDDNSUpdateBlock) SetValue(v IpamsvcDDNSUpdateBlock) { } func (o IpamsvcInheritedDDNSUpdateBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedDDNSUpdateBlock) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_dhcp_config.go b/ipam/model_ipamsvc_inherited_dhcp_config.go index 8a62fdd..59a45f5 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_config.go +++ b/ipam/model_ipamsvc_inherited_dhcp_config.go @@ -19,16 +19,16 @@ var _ MappedNullable = &IpamsvcInheritedDHCPConfig{} // IpamsvcInheritedDHCPConfig The inheritance configuration for a field of type _DHCPConfig_. type IpamsvcInheritedDHCPConfig struct { - AbandonedReclaimTime *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time,omitempty"` - AbandonedReclaimTimeV6 *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time_v6,omitempty"` - AllowUnknown *InheritanceInheritedBool `json:"allow_unknown,omitempty"` - AllowUnknownV6 *InheritanceInheritedBool `json:"allow_unknown_v6,omitempty"` - Filters *InheritedDHCPConfigFilterList `json:"filters,omitempty"` - FiltersV6 *InheritedDHCPConfigFilterList `json:"filters_v6,omitempty"` - IgnoreClientUid *InheritanceInheritedBool `json:"ignore_client_uid,omitempty"` - IgnoreList *InheritedDHCPConfigIgnoreItemList `json:"ignore_list,omitempty"` - LeaseTime *InheritanceInheritedUInt32 `json:"lease_time,omitempty"` - LeaseTimeV6 *InheritanceInheritedUInt32 `json:"lease_time_v6,omitempty"` + AbandonedReclaimTime *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time,omitempty"` + AbandonedReclaimTimeV6 *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time_v6,omitempty"` + AllowUnknown *InheritanceInheritedBool `json:"allow_unknown,omitempty"` + AllowUnknownV6 *InheritanceInheritedBool `json:"allow_unknown_v6,omitempty"` + Filters *InheritedDHCPConfigFilterList `json:"filters,omitempty"` + FiltersV6 *InheritedDHCPConfigFilterList `json:"filters_v6,omitempty"` + IgnoreClientUid *InheritanceInheritedBool `json:"ignore_client_uid,omitempty"` + IgnoreList *InheritedDHCPConfigIgnoreItemList `json:"ignore_list,omitempty"` + LeaseTime *InheritanceInheritedUInt32 `json:"lease_time,omitempty"` + LeaseTimeV6 *InheritanceInheritedUInt32 `json:"lease_time_v6,omitempty"` } // NewIpamsvcInheritedDHCPConfig instantiates a new IpamsvcInheritedDHCPConfig object @@ -369,7 +369,7 @@ func (o *IpamsvcInheritedDHCPConfig) SetLeaseTimeV6(v InheritanceInheritedUInt32 } func (o IpamsvcInheritedDHCPConfig) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -446,3 +446,5 @@ func (v *NullableIpamsvcInheritedDHCPConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_dhcp_option.go b/ipam/model_ipamsvc_inherited_dhcp_option.go index 08b9334..50882bf 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_option.go +++ b/ipam/model_ipamsvc_inherited_dhcp_option.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDHCPOption struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcInheritedDHCPOptionItem `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcInheritedDHCPOptionItem `json:"value,omitempty"` } // NewIpamsvcInheritedDHCPOption instantiates a new IpamsvcInheritedDHCPOption object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDHCPOption) SetValue(v IpamsvcInheritedDHCPOptionItem) } func (o IpamsvcInheritedDHCPOption) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedDHCPOption) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_dhcp_option_item.go b/ipam/model_ipamsvc_inherited_dhcp_option_item.go index 4ff6021..dbea964 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_option_item.go +++ b/ipam/model_ipamsvc_inherited_dhcp_option_item.go @@ -106,7 +106,7 @@ func (o *IpamsvcInheritedDHCPOptionItem) SetOverridingGroup(v string) { } func (o IpamsvcInheritedDHCPOptionItem) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,3 +159,5 @@ func (v *NullableIpamsvcInheritedDHCPOptionItem) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_dhcp_option_list.go b/ipam/model_ipamsvc_inherited_dhcp_option_list.go index 5812d13..3e0967b 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_option_list.go +++ b/ipam/model_ipamsvc_inherited_dhcp_option_list.go @@ -107,7 +107,7 @@ func (o *IpamsvcInheritedDHCPOptionList) SetValue(v []IpamsvcInheritedDHCPOption } func (o IpamsvcInheritedDHCPOptionList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcInheritedDHCPOptionList) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go b/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go index 82cd83e..64da520 100644 --- a/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go +++ b/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedHostnameRewriteBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcHostnameRewriteBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcHostnameRewriteBlock `json:"value,omitempty"` } // NewIpamsvcInheritedHostnameRewriteBlock instantiates a new IpamsvcInheritedHostnameRewriteBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedHostnameRewriteBlock) SetValue(v IpamsvcHostnameRewrite } func (o IpamsvcInheritedHostnameRewriteBlock) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,3 +233,5 @@ func (v *NullableIpamsvcInheritedHostnameRewriteBlock) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ip_space.go b/ipam/model_ipamsvc_ip_space.go index ff974a4..fe487c1 100644 --- a/ipam/model_ipamsvc_ip_space.go +++ b/ipam/model_ipamsvc_ip_space.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcIPSpace type satisfies the MappedNullable interface at compile time @@ -44,8 +46,8 @@ type IpamsvcIPSpace struct { // Instructs the DHCP server to always update the DNS information when a lease is renewed even if its DNS information has not changed. Defaults to _false_. DdnsUpdateOnRenew *bool `json:"ddns_update_on_renew,omitempty"` // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. - DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` + DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of IPv4 DHCP options for IP space. May be either a specific option or a group of options. DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` // The list of IPv6 DHCP options for IP space. May be either a specific option or a group of options. @@ -63,21 +65,23 @@ type IpamsvcIPSpace struct { // The regex bracket expression to match valid characters. Must begin with \"[\" and end with \"]\" and be a compilable POSIX regex. Defaults to \"[^a-zA-Z0-9_.]\". HostnameRewriteRegex *string `json:"hostname_rewrite_regex,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *IpamsvcIPSpaceInheritance `json:"inheritance_sources,omitempty"` // The name of the IP space. Must contain 1 to 256 characters. Can include UTF-8. Name string `json:"name"` // The tags for the IP space in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` // The resource identifier. VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcIPSpace IpamsvcIPSpace + // NewIpamsvcIPSpace instantiates a new IpamsvcIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1121,7 +1125,7 @@ func (o *IpamsvcIPSpace) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcIPSpace) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1224,6 +1228,43 @@ func (o IpamsvcIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIPSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIPSpace := _IpamsvcIPSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcIPSpace(varIpamsvcIPSpace) + + return err +} + type NullableIpamsvcIPSpace struct { value *IpamsvcIPSpace isSet bool @@ -1259,3 +1300,5 @@ func (v *NullableIpamsvcIPSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ip_space_inheritance.go b/ipam/model_ipamsvc_ip_space_inheritance.go index a70b2bd..16fcf76 100644 --- a/ipam/model_ipamsvc_ip_space_inheritance.go +++ b/ipam/model_ipamsvc_ip_space_inheritance.go @@ -19,23 +19,23 @@ var _ MappedNullable = &IpamsvcIPSpaceInheritance{} // IpamsvcIPSpaceInheritance The __IPSpaceInheritance__ object specifies how and which fields _IPSpace_ object inherits from the parent. type IpamsvcIPSpaceInheritance struct { - AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` - DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` - DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` - DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` - DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` - DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` - DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` - DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` - DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` - HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` - VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` + AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` + DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` + DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` + DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` + DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` + DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` + DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` + DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` + DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` + VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` } // NewIpamsvcIPSpaceInheritance instantiates a new IpamsvcIPSpaceInheritance object @@ -600,7 +600,7 @@ func (o *IpamsvcIPSpaceInheritance) SetVendorSpecificOptionOptionSpace(v Inherit } func (o IpamsvcIPSpaceInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -698,3 +698,5 @@ func (v *NullableIpamsvcIPSpaceInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_ipam_host.go b/ipam/model_ipamsvc_ipam_host.go index f8463e1..93cde8f 100644 --- a/ipam/model_ipamsvc_ipam_host.go +++ b/ipam/model_ipamsvc_ipam_host.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcIpamHost type satisfies the MappedNullable interface at compile time @@ -40,6 +42,8 @@ type IpamsvcIpamHost struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcIpamHost IpamsvcIpamHost + // NewIpamsvcIpamHost instantiates a new IpamsvcIpamHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -339,7 +343,7 @@ func (o *IpamsvcIpamHost) SetUpdatedAt(v time.Time) { } func (o IpamsvcIpamHost) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -376,6 +380,43 @@ func (o IpamsvcIpamHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIpamHost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIpamHost := _IpamsvcIpamHost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcIpamHost) + + if err != nil { + return err + } + + *o = IpamsvcIpamHost(varIpamsvcIpamHost) + + return err +} + type NullableIpamsvcIpamHost struct { value *IpamsvcIpamHost isSet bool @@ -411,3 +452,5 @@ func (v *NullableIpamsvcIpamHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_kerberos_key.go b/ipam/model_ipamsvc_kerberos_key.go index 86cb3a8..1a4c5a2 100644 --- a/ipam/model_ipamsvc_kerberos_key.go +++ b/ipam/model_ipamsvc_kerberos_key.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcKerberosKey type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type IpamsvcKerberosKey struct { Version *int64 `json:"version,omitempty"` } +type _IpamsvcKerberosKey IpamsvcKerberosKey + // NewIpamsvcKerberosKey instantiates a new IpamsvcKerberosKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -236,7 +240,7 @@ func (o *IpamsvcKerberosKey) SetVersion(v int64) { } func (o IpamsvcKerberosKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,6 +268,43 @@ func (o IpamsvcKerberosKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcKerberosKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcKerberosKey := _IpamsvcKerberosKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcKerberosKey) + + if err != nil { + return err + } + + *o = IpamsvcKerberosKey(varIpamsvcKerberosKey) + + return err +} + type NullableIpamsvcKerberosKey struct { value *IpamsvcKerberosKey isSet bool @@ -299,3 +340,5 @@ func (v *NullableIpamsvcKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_lease_address.go b/ipam/model_ipamsvc_lease_address.go index f011b7a..66547a6 100644 --- a/ipam/model_ipamsvc_lease_address.go +++ b/ipam/model_ipamsvc_lease_address.go @@ -107,7 +107,7 @@ func (o *IpamsvcLeaseAddress) SetSpace(v string) { } func (o IpamsvcLeaseAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcLeaseAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_lease_range.go b/ipam/model_ipamsvc_lease_range.go index f6923a7..9811317 100644 --- a/ipam/model_ipamsvc_lease_range.go +++ b/ipam/model_ipamsvc_lease_range.go @@ -73,7 +73,7 @@ func (o *IpamsvcLeaseRange) SetId(v string) { } func (o IpamsvcLeaseRange) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcLeaseRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_lease_subnet.go b/ipam/model_ipamsvc_lease_subnet.go index c4e3fef..a3d7545 100644 --- a/ipam/model_ipamsvc_lease_subnet.go +++ b/ipam/model_ipamsvc_lease_subnet.go @@ -73,7 +73,7 @@ func (o *IpamsvcLeaseSubnet) SetId(v string) { } func (o IpamsvcLeaseSubnet) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcLeaseSubnet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_leases_command.go b/ipam/model_ipamsvc_leases_command.go index b0209ea..1932140 100644 --- a/ipam/model_ipamsvc_leases_command.go +++ b/ipam/model_ipamsvc_leases_command.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcLeasesCommand type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type IpamsvcLeasesCommand struct { Subnet []IpamsvcLeaseSubnet `json:"subnet,omitempty"` } +type _IpamsvcLeasesCommand IpamsvcLeasesCommand + // NewIpamsvcLeasesCommand instantiates a new IpamsvcLeasesCommand object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -168,7 +172,7 @@ func (o *IpamsvcLeasesCommand) SetSubnet(v []IpamsvcLeaseSubnet) { } func (o IpamsvcLeasesCommand) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -190,6 +194,43 @@ func (o IpamsvcLeasesCommand) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcLeasesCommand) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "command", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcLeasesCommand := _IpamsvcLeasesCommand{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcLeasesCommand) + + if err != nil { + return err + } + + *o = IpamsvcLeasesCommand(varIpamsvcLeasesCommand) + + return err +} + type NullableIpamsvcLeasesCommand struct { value *IpamsvcLeasesCommand isSet bool @@ -225,3 +266,5 @@ func (v *NullableIpamsvcLeasesCommand) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_address_block_response.go b/ipam/model_ipamsvc_list_address_block_response.go index 2dbcc85..7412cde 100644 --- a/ipam/model_ipamsvc_list_address_block_response.go +++ b/ipam/model_ipamsvc_list_address_block_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListAddressBlockResponse) SetResults(v []IpamsvcAddressBlock) { } func (o IpamsvcListAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListAddressBlockResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_address_response.go b/ipam/model_ipamsvc_list_address_response.go index 44af1de..d0af5d8 100644 --- a/ipam/model_ipamsvc_list_address_response.go +++ b/ipam/model_ipamsvc_list_address_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListAddressResponse) SetResults(v []IpamsvcAddress) { } func (o IpamsvcListAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_asm_response.go b/ipam/model_ipamsvc_list_asm_response.go index dfa2cec..160d0b5 100644 --- a/ipam/model_ipamsvc_list_asm_response.go +++ b/ipam/model_ipamsvc_list_asm_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListASMResponse) SetResults(v []IpamsvcASM) { } func (o IpamsvcListASMResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListASMResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_dns_usage_response.go b/ipam/model_ipamsvc_list_dns_usage_response.go index 176df1b..de94604 100644 --- a/ipam/model_ipamsvc_list_dns_usage_response.go +++ b/ipam/model_ipamsvc_list_dns_usage_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListDNSUsageResponse) SetResults(v []IpamsvcDNSUsage) { } func (o IpamsvcListDNSUsageResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListDNSUsageResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_filter_response.go b/ipam/model_ipamsvc_list_filter_response.go index f336709..d14806a 100644 --- a/ipam/model_ipamsvc_list_filter_response.go +++ b/ipam/model_ipamsvc_list_filter_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListFilterResponse) SetResults(v []IpamsvcFilter) { } func (o IpamsvcListFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListFilterResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_fixed_address_response.go b/ipam/model_ipamsvc_list_fixed_address_response.go index 6ee5515..c773fa0 100644 --- a/ipam/model_ipamsvc_list_fixed_address_response.go +++ b/ipam/model_ipamsvc_list_fixed_address_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListFixedAddressResponse) SetResults(v []IpamsvcFixedAddress) { } func (o IpamsvcListFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListFixedAddressResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_ha_group_response.go b/ipam/model_ipamsvc_list_ha_group_response.go index 6334231..fa3a346 100644 --- a/ipam/model_ipamsvc_list_ha_group_response.go +++ b/ipam/model_ipamsvc_list_ha_group_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListHAGroupResponse) SetResults(v []IpamsvcHAGroup) { } func (o IpamsvcListHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_hardware_filter_response.go b/ipam/model_ipamsvc_list_hardware_filter_response.go index 2d3e426..288e245 100644 --- a/ipam/model_ipamsvc_list_hardware_filter_response.go +++ b/ipam/model_ipamsvc_list_hardware_filter_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListHardwareFilterResponse) SetResults(v []IpamsvcHardwareFilter } func (o IpamsvcListHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListHardwareFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_host_response.go b/ipam/model_ipamsvc_list_host_response.go index 5cd822a..b5950eb 100644 --- a/ipam/model_ipamsvc_list_host_response.go +++ b/ipam/model_ipamsvc_list_host_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListHostResponse) SetResults(v []IpamsvcHost) { } func (o IpamsvcListHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_ip_space_response.go b/ipam/model_ipamsvc_list_ip_space_response.go index 739f09b..f5e9efd 100644 --- a/ipam/model_ipamsvc_list_ip_space_response.go +++ b/ipam/model_ipamsvc_list_ip_space_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListIPSpaceResponse) SetResults(v []IpamsvcIPSpace) { } func (o IpamsvcListIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_ipam_host_response.go b/ipam/model_ipamsvc_list_ipam_host_response.go index 3adfca2..dfea029 100644 --- a/ipam/model_ipamsvc_list_ipam_host_response.go +++ b/ipam/model_ipamsvc_list_ipam_host_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListIpamHostResponse) SetResults(v []IpamsvcIpamHost) { } func (o IpamsvcListIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListIpamHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_option_code_response.go b/ipam/model_ipamsvc_list_option_code_response.go index a68728c..ab02828 100644 --- a/ipam/model_ipamsvc_list_option_code_response.go +++ b/ipam/model_ipamsvc_list_option_code_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionCodeResponse) SetResults(v []IpamsvcOptionCode) { } func (o IpamsvcListOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListOptionCodeResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_option_filter_response.go b/ipam/model_ipamsvc_list_option_filter_response.go index 7a40fa6..736542b 100644 --- a/ipam/model_ipamsvc_list_option_filter_response.go +++ b/ipam/model_ipamsvc_list_option_filter_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionFilterResponse) SetResults(v []IpamsvcOptionFilter) { } func (o IpamsvcListOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListOptionFilterResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_option_group_response.go b/ipam/model_ipamsvc_list_option_group_response.go index d996dee..9a760dd 100644 --- a/ipam/model_ipamsvc_list_option_group_response.go +++ b/ipam/model_ipamsvc_list_option_group_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionGroupResponse) SetResults(v []IpamsvcOptionGroup) { } func (o IpamsvcListOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListOptionGroupResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_option_space_response.go b/ipam/model_ipamsvc_list_option_space_response.go index f9404e7..2678817 100644 --- a/ipam/model_ipamsvc_list_option_space_response.go +++ b/ipam/model_ipamsvc_list_option_space_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionSpaceResponse) SetResults(v []IpamsvcOptionSpace) { } func (o IpamsvcListOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListOptionSpaceResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_range_response.go b/ipam/model_ipamsvc_list_range_response.go index a19c6cd..aa22116 100644 --- a/ipam/model_ipamsvc_list_range_response.go +++ b/ipam/model_ipamsvc_list_range_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListRangeResponse) SetResults(v []IpamsvcRange) { } func (o IpamsvcListRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_server_response.go b/ipam/model_ipamsvc_list_server_response.go index 9f17a9d..12c490c 100644 --- a/ipam/model_ipamsvc_list_server_response.go +++ b/ipam/model_ipamsvc_list_server_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListServerResponse) SetResults(v []IpamsvcServer) { } func (o IpamsvcListServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_list_subnet_response.go b/ipam/model_ipamsvc_list_subnet_response.go index 1798c35..a97d60a 100644 --- a/ipam/model_ipamsvc_list_subnet_response.go +++ b/ipam/model_ipamsvc_list_subnet_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListSubnetResponse) SetResults(v []IpamsvcSubnet) { } func (o IpamsvcListSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcListSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_name.go b/ipam/model_ipamsvc_name.go index 4bb67e2..bae8cfe 100644 --- a/ipam/model_ipamsvc_name.go +++ b/ipam/model_ipamsvc_name.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcName type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type IpamsvcName struct { Type string `json:"type"` } +type _IpamsvcName IpamsvcName + // NewIpamsvcName instantiates a new IpamsvcName object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -93,7 +97,7 @@ func (o *IpamsvcName) SetType(v string) { } func (o IpamsvcName) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -107,6 +111,44 @@ func (o IpamsvcName) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcName := _IpamsvcName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcName) + + if err != nil { + return err + } + + *o = IpamsvcName(varIpamsvcName) + + return err +} + type NullableIpamsvcName struct { value *IpamsvcName isSet bool @@ -142,3 +184,5 @@ func (v *NullableIpamsvcName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_nameserver.go b/ipam/model_ipamsvc_nameserver.go index 0534671..8e78f64 100644 --- a/ipam/model_ipamsvc_nameserver.go +++ b/ipam/model_ipamsvc_nameserver.go @@ -31,7 +31,7 @@ type IpamsvcNameserver struct { KerberosTkeyLifetime *int64 `json:"kerberos_tkey_lifetime,omitempty"` // Determines which protocol is used to establish the security context with the external DNS servers, TCP or UDP. Defaults to _tcp_. KerberosTkeyProtocol *string `json:"kerberos_tkey_protocol,omitempty"` - Nameserver *string `json:"nameserver,omitempty"` + Nameserver *string `json:"nameserver,omitempty"` // The Kerberos principal name of this DNS server that will receive updates. Defaults to empty. ServerPrincipal *string `json:"server_principal,omitempty"` } @@ -310,7 +310,7 @@ func (o *IpamsvcNameserver) SetServerPrincipal(v string) { } func (o IpamsvcNameserver) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -381,3 +381,5 @@ func (v *NullableIpamsvcNameserver) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_next_available_ab_response.go b/ipam/model_ipamsvc_next_available_ab_response.go index 838f8f7..51148a6 100644 --- a/ipam/model_ipamsvc_next_available_ab_response.go +++ b/ipam/model_ipamsvc_next_available_ab_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcNextAvailableABResponse) SetResults(v []IpamsvcAddressBlock) { } func (o IpamsvcNextAvailableABResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcNextAvailableABResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_next_available_ip_response.go b/ipam/model_ipamsvc_next_available_ip_response.go index 381bb89..c4890ce 100644 --- a/ipam/model_ipamsvc_next_available_ip_response.go +++ b/ipam/model_ipamsvc_next_available_ip_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcNextAvailableIPResponse) SetResults(v []IpamsvcAddress) { } func (o IpamsvcNextAvailableIPResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcNextAvailableIPResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_next_available_subnet_response.go b/ipam/model_ipamsvc_next_available_subnet_response.go index 2feb1c3..b6b1ee5 100644 --- a/ipam/model_ipamsvc_next_available_subnet_response.go +++ b/ipam/model_ipamsvc_next_available_subnet_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcNextAvailableSubnetResponse) SetResults(v []IpamsvcSubnet) { } func (o IpamsvcNextAvailableSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableIpamsvcNextAvailableSubnetResponse) UnmarshalJSON(src []byte) e v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_code.go b/ipam/model_ipamsvc_option_code.go index 79af98e..25e83af 100644 --- a/ipam/model_ipamsvc_option_code.go +++ b/ipam/model_ipamsvc_option_code.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcOptionCode type satisfies the MappedNullable interface at compile time @@ -42,6 +44,8 @@ type IpamsvcOptionCode struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionCode IpamsvcOptionCode + // NewIpamsvcOptionCode instantiates a new IpamsvcOptionCode object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -352,7 +356,7 @@ func (o *IpamsvcOptionCode) SetUpdatedAt(v time.Time) { } func (o IpamsvcOptionCode) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -386,6 +390,46 @@ func (o IpamsvcOptionCode) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionCode) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "name", + "option_space", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionCode := _IpamsvcOptionCode{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionCode) + + if err != nil { + return err + } + + *o = IpamsvcOptionCode(varIpamsvcOptionCode) + + return err +} + type NullableIpamsvcOptionCode struct { value *IpamsvcOptionCode isSet bool @@ -421,3 +465,5 @@ func (v *NullableIpamsvcOptionCode) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_filter.go b/ipam/model_ipamsvc_option_filter.go index 5dabbe5..12f8afa 100644 --- a/ipam/model_ipamsvc_option_filter.go +++ b/ipam/model_ipamsvc_option_filter.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcOptionFilter type satisfies the MappedNullable interface at compile time @@ -41,7 +43,7 @@ type IpamsvcOptionFilter struct { // The type of protocol of option filter (_ip4_ or _ip6_). Protocol *string `json:"protocol,omitempty"` // The role of DHCP filter (_values_ or _selection_). Defaults to _values_. - Role *string `json:"role,omitempty"` + Role *string `json:"role,omitempty"` Rules IpamsvcOptionFilterRuleList `json:"rules"` // The tags for the option filter in JSON format. Tags map[string]interface{} `json:"tags,omitempty"` @@ -51,6 +53,8 @@ type IpamsvcOptionFilter struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcOptionFilter IpamsvcOptionFilter + // NewIpamsvcOptionFilter instantiates a new IpamsvcOptionFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -535,7 +539,7 @@ func (o *IpamsvcOptionFilter) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcOptionFilter) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -588,6 +592,44 @@ func (o IpamsvcOptionFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "rules", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionFilter := _IpamsvcOptionFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionFilter) + + if err != nil { + return err + } + + *o = IpamsvcOptionFilter(varIpamsvcOptionFilter) + + return err +} + type NullableIpamsvcOptionFilter struct { value *IpamsvcOptionFilter isSet bool @@ -623,3 +665,5 @@ func (v *NullableIpamsvcOptionFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_filter_rule.go b/ipam/model_ipamsvc_option_filter_rule.go index 7d61417..c1ee061 100644 --- a/ipam/model_ipamsvc_option_filter_rule.go +++ b/ipam/model_ipamsvc_option_filter_rule.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcOptionFilterRule type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type IpamsvcOptionFilterRule struct { SubstringOffset *int64 `json:"substring_offset,omitempty"` } +type _IpamsvcOptionFilterRule IpamsvcOptionFilterRule + // NewIpamsvcOptionFilterRule instantiates a new IpamsvcOptionFilterRule object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -161,7 +165,7 @@ func (o *IpamsvcOptionFilterRule) SetSubstringOffset(v int64) { } func (o IpamsvcOptionFilterRule) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -181,6 +185,44 @@ func (o IpamsvcOptionFilterRule) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionFilterRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "compare", + "option_code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionFilterRule := _IpamsvcOptionFilterRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionFilterRule) + + if err != nil { + return err + } + + *o = IpamsvcOptionFilterRule(varIpamsvcOptionFilterRule) + + return err +} + type NullableIpamsvcOptionFilterRule struct { value *IpamsvcOptionFilterRule isSet bool @@ -216,3 +258,5 @@ func (v *NullableIpamsvcOptionFilterRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_filter_rule_list.go b/ipam/model_ipamsvc_option_filter_rule_list.go index ce41b98..5f094e8 100644 --- a/ipam/model_ipamsvc_option_filter_rule_list.go +++ b/ipam/model_ipamsvc_option_filter_rule_list.go @@ -107,7 +107,7 @@ func (o *IpamsvcOptionFilterRuleList) SetRules(v []IpamsvcOptionFilterRule) { } func (o IpamsvcOptionFilterRuleList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,3 +160,5 @@ func (v *NullableIpamsvcOptionFilterRuleList) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_group.go b/ipam/model_ipamsvc_option_group.go index e4f710d..dc22ba1 100644 --- a/ipam/model_ipamsvc_option_group.go +++ b/ipam/model_ipamsvc_option_group.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcOptionGroup type satisfies the MappedNullable interface at compile time @@ -38,6 +40,8 @@ type IpamsvcOptionGroup struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionGroup IpamsvcOptionGroup + // NewIpamsvcOptionGroup instantiates a new IpamsvcOptionGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -305,7 +309,7 @@ func (o *IpamsvcOptionGroup) SetUpdatedAt(v time.Time) { } func (o IpamsvcOptionGroup) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -339,6 +343,43 @@ func (o IpamsvcOptionGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionGroup := _IpamsvcOptionGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionGroup) + + if err != nil { + return err + } + + *o = IpamsvcOptionGroup(varIpamsvcOptionGroup) + + return err +} + type NullableIpamsvcOptionGroup struct { value *IpamsvcOptionGroup isSet bool @@ -374,3 +415,5 @@ func (v *NullableIpamsvcOptionGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_item.go b/ipam/model_ipamsvc_option_item.go index 6ed0669..8802580 100644 --- a/ipam/model_ipamsvc_option_item.go +++ b/ipam/model_ipamsvc_option_item.go @@ -175,7 +175,7 @@ func (o *IpamsvcOptionItem) SetType(v string) { } func (o IpamsvcOptionItem) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableIpamsvcOptionItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_option_space.go b/ipam/model_ipamsvc_option_space.go index e126876..434108e 100644 --- a/ipam/model_ipamsvc_option_space.go +++ b/ipam/model_ipamsvc_option_space.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcOptionSpace type satisfies the MappedNullable interface at compile time @@ -36,6 +38,8 @@ type IpamsvcOptionSpace struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionSpace IpamsvcOptionSpace + // NewIpamsvcOptionSpace instantiates a new IpamsvcOptionSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -271,7 +275,7 @@ func (o *IpamsvcOptionSpace) SetUpdatedAt(v time.Time) { } func (o IpamsvcOptionSpace) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -302,6 +306,43 @@ func (o IpamsvcOptionSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionSpace := _IpamsvcOptionSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionSpace) + + if err != nil { + return err + } + + *o = IpamsvcOptionSpace(varIpamsvcOptionSpace) + + return err +} + type NullableIpamsvcOptionSpace struct { value *IpamsvcOptionSpace isSet bool @@ -337,3 +378,5 @@ func (v *NullableIpamsvcOptionSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_range.go b/ipam/model_ipamsvc_range.go index be9f8b4..78bf1a6 100644 --- a/ipam/model_ipamsvc_range.go +++ b/ipam/model_ipamsvc_range.go @@ -13,12 +13,14 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcRange type satisfies the MappedNullable interface at compile time var _ MappedNullable = &IpamsvcRange{} -// IpamsvcRange A __Range__ object (_ipam/range_) represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. +// IpamsvcRange A __Range__ object (_ipam/range_) represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. type IpamsvcRange struct { // The description for the range. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` @@ -41,7 +43,7 @@ type IpamsvcRange struct { // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []InheritanceAssignedHost `json:"inheritance_assigned_hosts,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcDHCPOptionsInheritance `json:"inheritance_sources,omitempty"` // The name of the range. May contain 1 to 256 characters. Can include UTF-8. Name *string `json:"name,omitempty"` @@ -54,14 +56,16 @@ type IpamsvcRange struct { // The start IP address of the range. Start string `json:"start"` // The tags for the range in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } +type _IpamsvcRange IpamsvcRange + // NewIpamsvcRange instantiates a new IpamsvcRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -770,7 +774,7 @@ func (o *IpamsvcRange) SetUtilizationV6(v IpamsvcUtilizationV6) { } func (o IpamsvcRange) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -844,6 +848,44 @@ func (o IpamsvcRange) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcRange) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "end", + "start", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcRange := _IpamsvcRange{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcRange) + + if err != nil { + return err + } + + *o = IpamsvcRange(varIpamsvcRange) + + return err +} + type NullableIpamsvcRange struct { value *IpamsvcRange isSet bool @@ -879,3 +921,5 @@ func (v *NullableIpamsvcRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_address_block_response.go b/ipam/model_ipamsvc_read_address_block_response.go index 5b1debe..4a018ea 100644 --- a/ipam/model_ipamsvc_read_address_block_response.go +++ b/ipam/model_ipamsvc_read_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadAddressBlockResponse) SetResult(v IpamsvcAddressBlock) { } func (o IpamsvcReadAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadAddressBlockResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_address_response.go b/ipam/model_ipamsvc_read_address_response.go index b5afa03..cd1b711 100644 --- a/ipam/model_ipamsvc_read_address_response.go +++ b/ipam/model_ipamsvc_read_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadAddressResponse) SetResult(v IpamsvcAddress) { } func (o IpamsvcReadAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_asm_response.go b/ipam/model_ipamsvc_read_asm_response.go index 046053e..90a1a37 100644 --- a/ipam/model_ipamsvc_read_asm_response.go +++ b/ipam/model_ipamsvc_read_asm_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadASMResponse) SetResult(v IpamsvcASM) { } func (o IpamsvcReadASMResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadASMResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_dns_usage_response.go b/ipam/model_ipamsvc_read_dns_usage_response.go index 74ef77b..f587f67 100644 --- a/ipam/model_ipamsvc_read_dns_usage_response.go +++ b/ipam/model_ipamsvc_read_dns_usage_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadDNSUsageResponse) SetResult(v IpamsvcDNSUsage) { } func (o IpamsvcReadDNSUsageResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadDNSUsageResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_fixed_address_response.go b/ipam/model_ipamsvc_read_fixed_address_response.go index 40ceee8..cd43301 100644 --- a/ipam/model_ipamsvc_read_fixed_address_response.go +++ b/ipam/model_ipamsvc_read_fixed_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadFixedAddressResponse) SetResult(v IpamsvcFixedAddress) { } func (o IpamsvcReadFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadFixedAddressResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_global_response.go b/ipam/model_ipamsvc_read_global_response.go index a68f9ac..c83e64d 100644 --- a/ipam/model_ipamsvc_read_global_response.go +++ b/ipam/model_ipamsvc_read_global_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadGlobalResponse) SetResult(v IpamsvcGlobal) { } func (o IpamsvcReadGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_ha_group_response.go b/ipam/model_ipamsvc_read_ha_group_response.go index 174bb48..7769b16 100644 --- a/ipam/model_ipamsvc_read_ha_group_response.go +++ b/ipam/model_ipamsvc_read_ha_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadHAGroupResponse) SetResult(v IpamsvcHAGroup) { } func (o IpamsvcReadHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_hardware_filter_response.go b/ipam/model_ipamsvc_read_hardware_filter_response.go index dd19045..b125140 100644 --- a/ipam/model_ipamsvc_read_hardware_filter_response.go +++ b/ipam/model_ipamsvc_read_hardware_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadHardwareFilterResponse) SetResult(v IpamsvcHardwareFilter) { } func (o IpamsvcReadHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadHardwareFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_host_response.go b/ipam/model_ipamsvc_read_host_response.go index 1ae30f4..aaeffa7 100644 --- a/ipam/model_ipamsvc_read_host_response.go +++ b/ipam/model_ipamsvc_read_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadHostResponse) SetResult(v IpamsvcHost) { } func (o IpamsvcReadHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_ip_space_response.go b/ipam/model_ipamsvc_read_ip_space_response.go index 18a3eff..9776f2b 100644 --- a/ipam/model_ipamsvc_read_ip_space_response.go +++ b/ipam/model_ipamsvc_read_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadIPSpaceResponse) SetResult(v IpamsvcIPSpace) { } func (o IpamsvcReadIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_ipam_host_response.go b/ipam/model_ipamsvc_read_ipam_host_response.go index 423803c..872ae94 100644 --- a/ipam/model_ipamsvc_read_ipam_host_response.go +++ b/ipam/model_ipamsvc_read_ipam_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadIpamHostResponse) SetResult(v IpamsvcIpamHost) { } func (o IpamsvcReadIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadIpamHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_option_code_response.go b/ipam/model_ipamsvc_read_option_code_response.go index 59555dd..5aedb15 100644 --- a/ipam/model_ipamsvc_read_option_code_response.go +++ b/ipam/model_ipamsvc_read_option_code_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionCodeResponse) SetResult(v IpamsvcOptionCode) { } func (o IpamsvcReadOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadOptionCodeResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_option_filter_response.go b/ipam/model_ipamsvc_read_option_filter_response.go index 8692cee..1de135c 100644 --- a/ipam/model_ipamsvc_read_option_filter_response.go +++ b/ipam/model_ipamsvc_read_option_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionFilterResponse) SetResult(v IpamsvcOptionFilter) { } func (o IpamsvcReadOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadOptionFilterResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_option_group_response.go b/ipam/model_ipamsvc_read_option_group_response.go index 9419041..6b8c323 100644 --- a/ipam/model_ipamsvc_read_option_group_response.go +++ b/ipam/model_ipamsvc_read_option_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionGroupResponse) SetResult(v IpamsvcOptionGroup) { } func (o IpamsvcReadOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadOptionGroupResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_option_space_response.go b/ipam/model_ipamsvc_read_option_space_response.go index ce5c7dd..680cca7 100644 --- a/ipam/model_ipamsvc_read_option_space_response.go +++ b/ipam/model_ipamsvc_read_option_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionSpaceResponse) SetResult(v IpamsvcOptionSpace) { } func (o IpamsvcReadOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadOptionSpaceResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_range_response.go b/ipam/model_ipamsvc_read_range_response.go index 1bdd2cc..c498dae 100644 --- a/ipam/model_ipamsvc_read_range_response.go +++ b/ipam/model_ipamsvc_read_range_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadRangeResponse) SetResult(v IpamsvcRange) { } func (o IpamsvcReadRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_server_response.go b/ipam/model_ipamsvc_read_server_response.go index 0f0e3e4..2ac57fc 100644 --- a/ipam/model_ipamsvc_read_server_response.go +++ b/ipam/model_ipamsvc_read_server_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadServerResponse) SetResult(v IpamsvcServer) { } func (o IpamsvcReadServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_read_subnet_response.go b/ipam/model_ipamsvc_read_subnet_response.go index 9b3a0ee..a21e788 100644 --- a/ipam/model_ipamsvc_read_subnet_response.go +++ b/ipam/model_ipamsvc_read_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadSubnetResponse) SetResult(v IpamsvcSubnet) { } func (o IpamsvcReadSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcReadSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_server.go b/ipam/model_ipamsvc_server.go index 1dd74ab..aa6c735 100644 --- a/ipam/model_ipamsvc_server.go +++ b/ipam/model_ipamsvc_server.go @@ -13,6 +13,8 @@ package ipam import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the IpamsvcServer type satisfies the MappedNullable interface at compile time @@ -47,7 +49,7 @@ type IpamsvcServer struct { // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` // The DNS zones that DDNS updates can be sent to. There is no resolver fallback. The target zone must be explicitly configured for the update to be performed. Updates are sent to the closest enclosing zone. Error if _ddns_enabled_ is _true_ and the _ddns_domain_ does not have a corresponding entry in _ddns_zones_. Error if there are items with duplicate zone in the list. Defaults to empty list. - DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` + DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of DHCP options or group of options for IPv4. An option list is ordered and may include both option groups and specific options. Multiple occurences of the same option or group is not an error. The last occurence of an option in the list will be used. Error if the graph of referenced groups contains cycles. Defaults to empty list. DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` @@ -68,7 +70,7 @@ type IpamsvcServer struct { // The regex bracket expression to match valid characters. Must begin with \"[\" and end with \"]\" and be a compilable POSIX regex. Defaults to \"[^a-zA-Z0-9_.]\". HostnameRewriteRegex *string `json:"hostname_rewrite_regex,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *IpamsvcServerInheritance `json:"inheritance_sources,omitempty"` // Address of Kerberos Key Distribution Center. Defaults to empty. KerberosKdc *string `json:"kerberos_kdc,omitempty"` @@ -94,6 +96,8 @@ type IpamsvcServer struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcServer IpamsvcServer + // NewIpamsvcServer instantiates a new IpamsvcServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1289,7 +1293,7 @@ func (o *IpamsvcServer) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcServer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1410,6 +1414,43 @@ func (o IpamsvcServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcServer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcServer := _IpamsvcServer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcServer) + + if err != nil { + return err + } + + *o = IpamsvcServer(varIpamsvcServer) + + return err +} + type NullableIpamsvcServer struct { value *IpamsvcServer isSet bool @@ -1445,3 +1486,5 @@ func (v *NullableIpamsvcServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_server_inheritance.go b/ipam/model_ipamsvc_server_inheritance.go index 312e10e..29ab706 100644 --- a/ipam/model_ipamsvc_server_inheritance.go +++ b/ipam/model_ipamsvc_server_inheritance.go @@ -19,21 +19,21 @@ var _ MappedNullable = &IpamsvcServerInheritance{} // IpamsvcServerInheritance The inheritance configuration specifies how and which fields _Server_ object (DHCP Config Profile) inherits from _Global_ parent. type IpamsvcServerInheritance struct { - DdnsBlock *IpamsvcInheritedDDNSBlock `json:"ddns_block,omitempty"` - DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` - DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` - DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` - DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` - DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` - DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` - HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` - VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` + DdnsBlock *IpamsvcInheritedDDNSBlock `json:"ddns_block,omitempty"` + DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` + DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` + DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` + DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` + DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` + DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` + VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` } // NewIpamsvcServerInheritance instantiates a new IpamsvcServerInheritance object @@ -534,7 +534,7 @@ func (o *IpamsvcServerInheritance) SetVendorSpecificOptionOptionSpace(v Inherita } func (o IpamsvcServerInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -626,3 +626,5 @@ func (v *NullableIpamsvcServerInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_subnet.go b/ipam/model_ipamsvc_subnet.go index 0f455eb..08f239b 100644 --- a/ipam/model_ipamsvc_subnet.go +++ b/ipam/model_ipamsvc_subnet.go @@ -21,7 +21,7 @@ var _ MappedNullable = &IpamsvcSubnet{} // IpamsvcSubnet A __Subnet__ object (_ipam/subnet_) is a set of contiguous IP addresses in the same IP space with no gap, expressed as an address and CIDR values. It represents a set of addresses from which addresses are assigned to network equipment interfaces. type IpamsvcSubnet struct { // The address of the subnet in the form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. - Address *string `json:"address,omitempty"` + Address *string `json:"address,omitempty"` AsmConfig *IpamsvcASMConfig `json:"asm_config,omitempty"` // Set to 1 to indicate that the subnet may run out of addresses. AsmScopeFlag *int64 `json:"asm_scope_flag,omitempty"` @@ -48,12 +48,12 @@ type IpamsvcSubnet struct { // Instructs the DHCP server to always update the DNS information when a lease is renewed even if its DNS information has not changed. Defaults to _false_. DdnsUpdateOnRenew *bool `json:"ddns_update_on_renew,omitempty"` // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. - DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` + DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The resource identifier. DhcpHost *string `json:"dhcp_host,omitempty"` // The DHCP options of the subnet. This can either be a specific option or a group of options. - DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` + DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` DhcpUtilization *IpamsvcDHCPUtilization `json:"dhcp_utilization,omitempty"` // Optional. _true_ to disable object. A disabled object is effectively non-existent when generating configuration. Defaults to _false_. DisableDhcp *bool `json:"disable_dhcp,omitempty"` @@ -78,7 +78,7 @@ type IpamsvcSubnet struct { // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []InheritanceAssignedHost `json:"inheritance_assigned_hosts,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcDHCPInheritance `json:"inheritance_sources,omitempty"` // The name of the subnet. May contain 1 to 256 characters. Can include UTF-8. Name *string `json:"name,omitempty"` @@ -93,13 +93,13 @@ type IpamsvcSubnet struct { // The resource identifier. Space *string `json:"space,omitempty"` // The tags for the subnet in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` // The usage is a combination of indicators, each tracking a specific associated use. Listed below are usage indicators with their meaning: usage indicator | description ---------------------- | -------------------------------- _IPAM_ | Subnet is managed in BloxOne DDI. _DHCP_ | Subnet is served by a DHCP Host. _DISCOVERED_ | Subnet is discovered by some network discovery probe like Network Insight or NetMRI in NIOS. - Usage []string `json:"usage,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + Usage []string `json:"usage,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } @@ -1529,7 +1529,7 @@ func (o *IpamsvcSubnet) SetUtilizationV6(v IpamsvcUtilizationV6) { } func (o IpamsvcSubnet) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1708,3 +1708,5 @@ func (v *NullableIpamsvcSubnet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_tsig_key.go b/ipam/model_ipamsvc_tsig_key.go index b358da3..0b539f6 100644 --- a/ipam/model_ipamsvc_tsig_key.go +++ b/ipam/model_ipamsvc_tsig_key.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcTSIGKey type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type IpamsvcTSIGKey struct { Secret *string `json:"secret,omitempty"` } +type _IpamsvcTSIGKey IpamsvcTSIGKey + // NewIpamsvcTSIGKey instantiates a new IpamsvcTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -236,7 +240,7 @@ func (o *IpamsvcTSIGKey) SetSecret(v string) { } func (o IpamsvcTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,6 +268,43 @@ func (o IpamsvcTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcTSIGKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcTSIGKey := _IpamsvcTSIGKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcTSIGKey) + + if err != nil { + return err + } + + *o = IpamsvcTSIGKey(varIpamsvcTSIGKey) + + return err +} + type NullableIpamsvcTSIGKey struct { value *IpamsvcTSIGKey isSet bool @@ -299,3 +340,5 @@ func (v *NullableIpamsvcTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_address_block_response.go b/ipam/model_ipamsvc_update_address_block_response.go index a2c7ad0..76f654f 100644 --- a/ipam/model_ipamsvc_update_address_block_response.go +++ b/ipam/model_ipamsvc_update_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateAddressBlockResponse) SetResult(v IpamsvcAddressBlock) { } func (o IpamsvcUpdateAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateAddressBlockResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_address_response.go b/ipam/model_ipamsvc_update_address_response.go index 878eb30..e76d5fa 100644 --- a/ipam/model_ipamsvc_update_address_response.go +++ b/ipam/model_ipamsvc_update_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateAddressResponse) SetResult(v IpamsvcAddress) { } func (o IpamsvcUpdateAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_fixed_address_response.go b/ipam/model_ipamsvc_update_fixed_address_response.go index 2d15973..b1b1839 100644 --- a/ipam/model_ipamsvc_update_fixed_address_response.go +++ b/ipam/model_ipamsvc_update_fixed_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateFixedAddressResponse) SetResult(v IpamsvcFixedAddress) { } func (o IpamsvcUpdateFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateFixedAddressResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_global_response.go b/ipam/model_ipamsvc_update_global_response.go index dfe6ac2..97daed9 100644 --- a/ipam/model_ipamsvc_update_global_response.go +++ b/ipam/model_ipamsvc_update_global_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateGlobalResponse) SetResult(v IpamsvcGlobal) { } func (o IpamsvcUpdateGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_ha_group_response.go b/ipam/model_ipamsvc_update_ha_group_response.go index 6b96556..f94a72e 100644 --- a/ipam/model_ipamsvc_update_ha_group_response.go +++ b/ipam/model_ipamsvc_update_ha_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateHAGroupResponse) SetResult(v IpamsvcHAGroup) { } func (o IpamsvcUpdateHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_hardware_filter_response.go b/ipam/model_ipamsvc_update_hardware_filter_response.go index 2abe891..8aa4af9 100644 --- a/ipam/model_ipamsvc_update_hardware_filter_response.go +++ b/ipam/model_ipamsvc_update_hardware_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateHardwareFilterResponse) SetResult(v IpamsvcHardwareFilter) } func (o IpamsvcUpdateHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateHardwareFilterResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_host_response.go b/ipam/model_ipamsvc_update_host_response.go index f838457..180eb0d 100644 --- a/ipam/model_ipamsvc_update_host_response.go +++ b/ipam/model_ipamsvc_update_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateHostResponse) SetResult(v IpamsvcHost) { } func (o IpamsvcUpdateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_ip_space_response.go b/ipam/model_ipamsvc_update_ip_space_response.go index 54bcd42..6df73d1 100644 --- a/ipam/model_ipamsvc_update_ip_space_response.go +++ b/ipam/model_ipamsvc_update_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateIPSpaceResponse) SetResult(v IpamsvcIPSpace) { } func (o IpamsvcUpdateIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_ipam_host_response.go b/ipam/model_ipamsvc_update_ipam_host_response.go index d10e650..897fe61 100644 --- a/ipam/model_ipamsvc_update_ipam_host_response.go +++ b/ipam/model_ipamsvc_update_ipam_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateIpamHostResponse) SetResult(v IpamsvcIpamHost) { } func (o IpamsvcUpdateIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateIpamHostResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_option_code_response.go b/ipam/model_ipamsvc_update_option_code_response.go index 5dfa6a4..541c160 100644 --- a/ipam/model_ipamsvc_update_option_code_response.go +++ b/ipam/model_ipamsvc_update_option_code_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionCodeResponse) SetResult(v IpamsvcOptionCode) { } func (o IpamsvcUpdateOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateOptionCodeResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_option_filter_response.go b/ipam/model_ipamsvc_update_option_filter_response.go index a9f929d..ba02027 100644 --- a/ipam/model_ipamsvc_update_option_filter_response.go +++ b/ipam/model_ipamsvc_update_option_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionFilterResponse) SetResult(v IpamsvcOptionFilter) { } func (o IpamsvcUpdateOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateOptionFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_option_group_response.go b/ipam/model_ipamsvc_update_option_group_response.go index 5dbeec4..a78ec4c 100644 --- a/ipam/model_ipamsvc_update_option_group_response.go +++ b/ipam/model_ipamsvc_update_option_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionGroupResponse) SetResult(v IpamsvcOptionGroup) { } func (o IpamsvcUpdateOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateOptionGroupResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_option_space_response.go b/ipam/model_ipamsvc_update_option_space_response.go index a1a6286..d60fef3 100644 --- a/ipam/model_ipamsvc_update_option_space_response.go +++ b/ipam/model_ipamsvc_update_option_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionSpaceResponse) SetResult(v IpamsvcOptionSpace) { } func (o IpamsvcUpdateOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateOptionSpaceResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_range_response.go b/ipam/model_ipamsvc_update_range_response.go index 364b3c9..8904318 100644 --- a/ipam/model_ipamsvc_update_range_response.go +++ b/ipam/model_ipamsvc_update_range_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateRangeResponse) SetResult(v IpamsvcRange) { } func (o IpamsvcUpdateRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_server_response.go b/ipam/model_ipamsvc_update_server_response.go index ec51735..84bd88a 100644 --- a/ipam/model_ipamsvc_update_server_response.go +++ b/ipam/model_ipamsvc_update_server_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateServerResponse) SetResult(v IpamsvcServer) { } func (o IpamsvcUpdateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_update_subnet_response.go b/ipam/model_ipamsvc_update_subnet_response.go index 9b49514..a2a9160 100644 --- a/ipam/model_ipamsvc_update_subnet_response.go +++ b/ipam/model_ipamsvc_update_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateSubnetResponse) SetResult(v IpamsvcSubnet) { } func (o IpamsvcUpdateSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableIpamsvcUpdateSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_utilization.go b/ipam/model_ipamsvc_utilization.go index e18202e..b85624a 100644 --- a/ipam/model_ipamsvc_utilization.go +++ b/ipam/model_ipamsvc_utilization.go @@ -311,7 +311,7 @@ func (o *IpamsvcUtilization) SetUtilization(v int64) { } func (o IpamsvcUtilization) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,3 +382,5 @@ func (v *NullableIpamsvcUtilization) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_utilization_threshold.go b/ipam/model_ipamsvc_utilization_threshold.go index c6f492c..201f447 100644 --- a/ipam/model_ipamsvc_utilization_threshold.go +++ b/ipam/model_ipamsvc_utilization_threshold.go @@ -12,6 +12,8 @@ package ipam import ( "encoding/json" + "bytes" + "fmt" ) // checks if the IpamsvcUtilizationThreshold type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcUtilizationThreshold struct { Low int64 `json:"low"` } +type _IpamsvcUtilizationThreshold IpamsvcUtilizationThreshold + // NewIpamsvcUtilizationThreshold instantiates a new IpamsvcUtilizationThreshold object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -120,7 +124,7 @@ func (o *IpamsvcUtilizationThreshold) SetLow(v int64) { } func (o IpamsvcUtilizationThreshold) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -135,6 +139,45 @@ func (o IpamsvcUtilizationThreshold) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcUtilizationThreshold) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "high", + "low", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcUtilizationThreshold := _IpamsvcUtilizationThreshold{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcUtilizationThreshold) + + if err != nil { + return err + } + + *o = IpamsvcUtilizationThreshold(varIpamsvcUtilizationThreshold) + + return err +} + type NullableIpamsvcUtilizationThreshold struct { value *IpamsvcUtilizationThreshold isSet bool @@ -170,3 +213,5 @@ func (v *NullableIpamsvcUtilizationThreshold) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/model_ipamsvc_utilization_v6.go b/ipam/model_ipamsvc_utilization_v6.go index 119f6fd..b8a616e 100644 --- a/ipam/model_ipamsvc_utilization_v6.go +++ b/ipam/model_ipamsvc_utilization_v6.go @@ -20,10 +20,10 @@ var _ MappedNullable = &IpamsvcUtilizationV6{} // IpamsvcUtilizationV6 The __UtilizationV6__ object represents IPV6 address usage statistics for an object. type IpamsvcUtilizationV6 struct { Abandoned *string `json:"abandoned,omitempty"` - Dynamic *string `json:"dynamic,omitempty"` - Static *string `json:"static,omitempty"` - Total *string `json:"total,omitempty"` - Used *string `json:"used,omitempty"` + Dynamic *string `json:"dynamic,omitempty"` + Static *string `json:"static,omitempty"` + Total *string `json:"total,omitempty"` + Used *string `json:"used,omitempty"` } // NewIpamsvcUtilizationV6 instantiates a new IpamsvcUtilizationV6 object @@ -204,7 +204,7 @@ func (o *IpamsvcUtilizationV6) SetUsed(v string) { } func (o IpamsvcUtilizationV6) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -266,3 +266,5 @@ func (v *NullableIpamsvcUtilizationV6) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/ipam/utils.go b/ipam/utils.go index 697ec87..9c90f59 100644 --- a/ipam/utils.go +++ b/ipam/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/keys/.openapi-generator/VERSION b/keys/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/keys/.openapi-generator/VERSION +++ b/keys/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/keys/README.md b/keys/README.md index cbc0947..7653042 100644 --- a/keys/README.md +++ b/keys/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import keys "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `keys.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `keys.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `keys.ContextOperationServerIndices` and `keys.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -127,11 +127,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + keys.ContextAPIKeys, + map[string]keys.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index 68f2022..1a8c350 100644 --- a/keys/api_generate_tsig.go +++ b/keys/api_generate_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,17 +17,18 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type GenerateTsigAPI interface { /* - GenerateTsigGenerateTSIG Generate TSIG key with a random secret. + GenerateTsigGenerateTSIG Generate TSIG key with a random secret. - Use this method to generate a TSIG key with a random secret using the specified algorithm. + Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest @@ -40,9 +41,9 @@ type GenerateTsigAPI interface { type GenerateTsigAPIService internal.Service type ApiGenerateTsigGenerateTSIGRequest struct { - ctx context.Context + ctx context.Context ApiService GenerateTsigAPI - algorithm *string + algorithm *string } // The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. @@ -60,25 +61,24 @@ GenerateTsigGenerateTSIG Generate TSIG key with a random secret. Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest { return ApiGenerateTsigGenerateTSIGRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysGenerateTSIGResponse +// @return KeysGenerateTSIGResponse func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTsigGenerateTSIGRequest) (*KeysGenerateTSIGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysGenerateTSIGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysGenerateTSIGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GenerateTsigAPIService.GenerateTsigGenerateTSIG") diff --git a/keys/api_kerberos.go b/keys/api_kerberos.go index 42d68ac..fea56c9 100644 --- a/keys/api_kerberos.go +++ b/keys/api_kerberos.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,32 +18,33 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type KerberosAPI interface { /* - KerberosDelete Delete the Kerberos key. + KerberosDelete Delete the Kerberos key. - Use this method to delete a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to delete a __KerberosKey__ object. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest // KerberosDeleteExecute executes the request KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) /* - KerberosList Retrieve Kerberos keys. + KerberosList Retrieve Kerberos keys. - Use this method to retrieve __KerberosKey__ objects. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve __KerberosKey__ objects. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ KerberosList(ctx context.Context) ApiKerberosListRequest @@ -51,14 +52,14 @@ type KerberosAPI interface { // @return KeysListKerberosKeyResponse KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) /* - KerberosRead Retrieve the Kerberos key. + KerberosRead Retrieve the Kerberos key. - Use this method to retrieve a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve a __KerberosKey__ object. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest @@ -66,14 +67,14 @@ type KerberosAPI interface { // @return KeysReadKerberosKeyResponse KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) /* - KerberosUpdate Update the Kerberos key. + KerberosUpdate Update the Kerberos key. - Use this method to update a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to update a __KerberosKey__ object. +A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest @@ -81,10 +82,10 @@ type KerberosAPI interface { // @return KeysUpdateKerberosKeyResponse KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) /* - KeysKerberosPost Method for KeysKerberosPost + KeysKerberosPost Method for KeysKerberosPost - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKeysKerberosPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest */ KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest @@ -97,9 +98,9 @@ type KerberosAPI interface { type KerberosAPIService internal.Service type ApiKerberosDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string + id string } func (r ApiKerberosDeleteRequest) Execute() (*http.Response, error) { @@ -112,24 +113,24 @@ KerberosDelete Delete the Kerberos key. Use this method to delete a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ func (a *KerberosAPIService) KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest { return ApiKerberosDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *KerberosAPIService) KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosDelete") @@ -201,49 +202,49 @@ func (a *KerberosAPIService) KerberosDeleteExecute(r ApiKerberosDeleteRequest) ( } type ApiKerberosListRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosListRequest) Fields(fields string) ApiKerberosListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiKerberosListRequest) Filter(filter string) ApiKerberosListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiKerberosListRequest) Offset(offset int32) ApiKerberosListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiKerberosListRequest) Limit(limit int32) ApiKerberosListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiKerberosListRequest) PageToken(pageToken string) ApiKerberosListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiKerberosListRequest) OrderBy(orderBy string) ApiKerberosListRequest { r.orderBy = &orderBy return r @@ -271,25 +272,24 @@ KerberosList Retrieve Kerberos keys. Use this method to retrieve __KerberosKey__ objects. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ func (a *KerberosAPIService) KerberosList(ctx context.Context) ApiKerberosListRequest { return ApiKerberosListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysListKerberosKeyResponse +// @return KeysListKerberosKeyResponse func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListKerberosKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosList") @@ -389,13 +389,13 @@ func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*Key } type ApiKerberosReadRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosReadRequest) Fields(fields string) ApiKerberosReadRequest { r.fields = &fields return r @@ -411,27 +411,26 @@ KerberosRead Retrieve the Kerberos key. Use this method to retrieve a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ func (a *KerberosAPIService) KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest { return ApiKerberosReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysReadKerberosKeyResponse +// @return KeysReadKerberosKeyResponse func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadKerberosKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosRead") @@ -511,10 +510,10 @@ func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*Key } type ApiKerberosUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string - body *KerberosKey + id string + body *KerberosKey } func (r ApiKerberosUpdateRequest) Body(body KerberosKey) ApiKerberosUpdateRequest { @@ -532,27 +531,26 @@ KerberosUpdate Update the Kerberos key. Use this method to update a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ func (a *KerberosAPIService) KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest { return ApiKerberosUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysUpdateKerberosKeyResponse +// @return KeysUpdateKerberosKeyResponse func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateKerberosKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosUpdate") @@ -587,8 +585,8 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -634,9 +632,9 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( } type ApiKeysKerberosPostRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - body *KerberosKey + body *KerberosKey } func (r ApiKeysKerberosPostRequest) Body(body KerberosKey) ApiKeysKerberosPostRequest { @@ -651,25 +649,24 @@ func (r ApiKeysKerberosPostRequest) Execute() (*KeysListKerberosKeyResponse, *ht /* KeysKerberosPost Method for KeysKerberosPost - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKeysKerberosPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest */ func (a *KerberosAPIService) KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest { return ApiKeysKerberosPostRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysListKerberosKeyResponse +// @return KeysListKerberosKeyResponse func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListKerberosKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KeysKerberosPost") @@ -703,8 +700,8 @@ func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostReques if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 7aa8083..75539e6 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type TsigAPI interface { /* - TsigCreate Create the TSIG key. + TsigCreate Create the TSIG key. - Use this method to create a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to create a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ TsigCreate(ctx context.Context) ApiTsigCreateRequest @@ -37,27 +38,27 @@ type TsigAPI interface { // @return KeysCreateTSIGKeyResponse TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) /* - TsigDelete Delete the TSIG key. + TsigDelete Delete the TSIG key. - Use this method to delete a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to delete a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest // TsigDeleteExecute executes the request TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) /* - TsigList Retrieve TSIG keys. + TsigList Retrieve TSIG keys. - Use this method to retrieve __TSIGKey__ objects. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve __TSIGKey__ objects. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ TsigList(ctx context.Context) ApiTsigListRequest @@ -65,14 +66,14 @@ type TsigAPI interface { // @return KeysListTSIGKeyResponse TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) /* - TsigRead Retrieve the TSIG key. + TsigRead Retrieve the TSIG key. - Use this method to retrieve a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ TsigRead(ctx context.Context, id string) ApiTsigReadRequest @@ -80,14 +81,14 @@ type TsigAPI interface { // @return KeysReadTSIGKeyResponse TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) /* - TsigUpdate Update the TSIG key. + TsigUpdate Update the TSIG key. - Use this method to update a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to update a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest @@ -100,9 +101,9 @@ type TsigAPI interface { type TsigAPIService internal.Service type ApiTsigCreateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - body *KeysTSIGKey + body *KeysTSIGKey } func (r ApiTsigCreateRequest) Body(body KeysTSIGKey) ApiTsigCreateRequest { @@ -120,25 +121,24 @@ TsigCreate Create the TSIG key. Use this method to create a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { return ApiTsigCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysCreateTSIGKeyResponse +// @return KeysCreateTSIGKeyResponse func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysCreateTSIGKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysCreateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigCreate") @@ -172,16 +172,16 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT } type ApiTsigDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string + id string } func (r ApiTsigDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ TsigDelete Delete the TSIG key. Use this method to delete a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ func (a *TsigAPIService) TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest { return ApiTsigDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigDelete") @@ -331,49 +331,49 @@ func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Respon } type ApiTsigListRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigListRequest) Fields(fields string) ApiTsigListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiTsigListRequest) Filter(filter string) ApiTsigListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiTsigListRequest) Offset(offset int32) ApiTsigListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiTsigListRequest) Limit(limit int32) ApiTsigListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiTsigListRequest) PageToken(pageToken string) ApiTsigListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiTsigListRequest) OrderBy(orderBy string) ApiTsigListRequest { r.orderBy = &orderBy return r @@ -401,25 +401,24 @@ TsigList Retrieve TSIG keys. Use this method to retrieve __TSIGKey__ objects. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { return ApiTsigListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysListTSIGKeyResponse +// @return KeysListTSIGKeyResponse func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigList") @@ -519,13 +518,13 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey } type ApiTsigReadRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigReadRequest) Fields(fields string) ApiTsigReadRequest { r.fields = &fields return r @@ -541,27 +540,26 @@ TsigRead Retrieve the TSIG key. Use this method to retrieve a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadRequest { return ApiTsigReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysReadTSIGKeyResponse +// @return KeysReadTSIGKeyResponse func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigRead") @@ -641,10 +639,10 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey } type ApiTsigUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - body *KeysTSIGKey + id string + body *KeysTSIGKey } func (r ApiTsigUpdateRequest) Body(body KeysTSIGKey) ApiTsigUpdateRequest { @@ -662,27 +660,26 @@ TsigUpdate Update the TSIG key. Use this method to update a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest { return ApiTsigUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysUpdateTSIGKeyResponse +// @return KeysUpdateTSIGKeyResponse func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateTSIGKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigUpdate") @@ -717,16 +714,16 @@ func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/keys/api_upload.go b/keys/api_upload.go index d91ba24..8c14f17 100644 --- a/keys/api_upload.go +++ b/keys/api_upload.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,17 +17,18 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type UploadAPI interface { /* - UploadUpload Upload content to the keys service. + UploadUpload Upload content to the keys service. - Use this method to upload specified content type to the keys service. + Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ UploadUpload(ctx context.Context) ApiUploadUploadRequest @@ -40,9 +41,9 @@ type UploadAPI interface { type UploadAPIService internal.Service type ApiUploadUploadRequest struct { - ctx context.Context + ctx context.Context ApiService UploadAPI - body *UploadRequest + body *UploadRequest } func (r ApiUploadUploadRequest) Body(body UploadRequest) ApiUploadUploadRequest { @@ -59,25 +60,24 @@ UploadUpload Upload content to the keys service. Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequest { return ApiUploadUploadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DdiuploadResponse +// @return DdiuploadResponse func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*DdiuploadResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DdiuploadResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DdiuploadResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UploadAPIService.UploadUpload") @@ -111,16 +111,16 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/keys/client.go b/keys/client.go index b3649a4..286dc91 100644 --- a/keys/client.go +++ b/keys/client.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package keys import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,20 +19,20 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DDI Keys API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services GenerateTsigAPI GenerateTsigAPI - KerberosAPI KerberosAPI - TsigAPI TsigAPI - UploadAPI UploadAPI + KerberosAPI KerberosAPI + TsigAPI TsigAPI + UploadAPI UploadAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.GenerateTsigAPI = (*GenerateTsigAPIService)(&c.Common) diff --git a/keys/docs/GenerateTsigAPI.md b/keys/docs/GenerateTsigAPI.md index 6f5663a..4293be1 100644 --- a/keys/docs/GenerateTsigAPI.md +++ b/keys/docs/GenerateTsigAPI.md @@ -22,24 +22,24 @@ Generate TSIG key with a random secret. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - algorithm := "algorithm_example" // string | The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm(algorithm).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GenerateTsigAPI.GenerateTsigGenerateTSIG``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateTsigGenerateTSIG`: KeysGenerateTSIGResponse - fmt.Fprintf(os.Stdout, "Response from `GenerateTsigAPI.GenerateTsigGenerateTSIG`: %v\n", resp) + algorithm := "algorithm_example" // string | The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm(algorithm).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GenerateTsigAPI.GenerateTsigGenerateTSIG``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateTsigGenerateTSIG`: KeysGenerateTSIGResponse + fmt.Fprintf(os.Stdout, "Response from `GenerateTsigAPI.GenerateTsigGenerateTSIG`: %v\n", resp) } ``` diff --git a/keys/docs/KerberosAPI.md b/keys/docs/KerberosAPI.md index 4e0fdb4..0442efd 100644 --- a/keys/docs/KerberosAPI.md +++ b/keys/docs/KerberosAPI.md @@ -26,22 +26,22 @@ Delete the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -94,31 +94,31 @@ Retrieve Kerberos keys. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosList`: KeysListKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosList`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosList`: %v\n", resp) } ``` @@ -174,25 +174,25 @@ Retrieve the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosRead`: KeysReadKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosRead`: KeysReadKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosRead`: %v\n", resp) } ``` @@ -246,25 +246,25 @@ Update the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewKerberosKey() // KerberosKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosUpdate`: KeysUpdateKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosUpdate`: KeysUpdateKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosUpdate`: %v\n", resp) } ``` @@ -316,24 +316,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewKerberosKey() // KerberosKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KeysKerberosPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KeysKerberosPost`: KeysListKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KeysKerberosPost`: %v\n", resp) + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KeysKerberosPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KeysKerberosPost`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KeysKerberosPost`: %v\n", resp) } ``` diff --git a/keys/docs/TsigAPI.md b/keys/docs/TsigAPI.md index 447b8d2..d3d6540 100644 --- a/keys/docs/TsigAPI.md +++ b/keys/docs/TsigAPI.md @@ -26,24 +26,24 @@ Create the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigCreate`: KeysCreateTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigCreate`: %v\n", resp) + body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigCreate`: KeysCreateTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve TSIG keys. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigList`: KeysListTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigList`: KeysListTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigRead`: KeysReadTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigRead`: KeysReadTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigUpdate`: KeysUpdateTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigUpdate`: KeysUpdateTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigUpdate`: %v\n", resp) } ``` diff --git a/keys/docs/UploadAPI.md b/keys/docs/UploadAPI.md index 00cc161..0170ee0 100644 --- a/keys/docs/UploadAPI.md +++ b/keys/docs/UploadAPI.md @@ -22,24 +22,24 @@ Upload content to the keys service. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewUploadRequest("Content_example", openapiclient.uploadContentType("UNKNOWN")) // UploadRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.UploadUpload``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UploadUpload`: DdiuploadResponse - fmt.Fprintf(os.Stdout, "Response from `UploadAPI.UploadUpload`: %v\n", resp) + body := *openapiclient.NewUploadRequest("Content_example", openapiclient.uploadContentType("UNKNOWN")) // UploadRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.UploadUpload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UploadUpload`: DdiuploadResponse + fmt.Fprintf(os.Stdout, "Response from `UploadAPI.UploadUpload`: %v\n", resp) } ``` diff --git a/keys/model_ddiupload_response.go b/keys/model_ddiupload_response.go index a58ddfb..e220432 100644 --- a/keys/model_ddiupload_response.go +++ b/keys/model_ddiupload_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -106,7 +106,7 @@ func (o *DdiuploadResponse) SetWarning(v string) { } func (o DdiuploadResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,3 +159,5 @@ func (v *NullableDdiuploadResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_kerberos_key.go b/keys/model_kerberos_key.go index ee036c9..4285f1e 100644 --- a/keys/model_kerberos_key.go +++ b/keys/model_kerberos_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -311,7 +311,7 @@ func (o *KerberosKey) SetVersion(v int64) { } func (o KerberosKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,3 +382,5 @@ func (v *NullableKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_kerberos_keys.go b/keys/model_kerberos_keys.go index 1c06064..78817e6 100644 --- a/keys/model_kerberos_keys.go +++ b/keys/model_kerberos_keys.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KerberosKeys) SetItems(v []KerberosKey) { } func (o KerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_create_tsig_key_response.go b/keys/model_keys_create_tsig_key_response.go index edd0da5..bfe51e4 100644 --- a/keys/model_keys_create_tsig_key_response.go +++ b/keys/model_keys_create_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysCreateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysCreateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysCreateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_generate_tsig_response.go b/keys/model_keys_generate_tsig_response.go index 85f10e4..5a6ee49 100644 --- a/keys/model_keys_generate_tsig_response.go +++ b/keys/model_keys_generate_tsig_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysGenerateTSIGResponse) SetResult(v KeysGenerateTSIGResult) { } func (o KeysGenerateTSIGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysGenerateTSIGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_generate_tsig_result.go b/keys/model_keys_generate_tsig_result.go index 4f6b49d..9b7dab8 100644 --- a/keys/model_keys_generate_tsig_result.go +++ b/keys/model_keys_generate_tsig_result.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysGenerateTSIGResult) SetSecret(v string) { } func (o KeysGenerateTSIGResult) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysGenerateTSIGResult) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_list_kerberos_key_response.go b/keys/model_keys_list_kerberos_key_response.go index 5966a99..31006cc 100644 --- a/keys/model_keys_list_kerberos_key_response.go +++ b/keys/model_keys_list_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListKerberosKeyResponse) SetResults(v []KerberosKey) { } func (o KeysListKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysListKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_list_tsig_key_response.go b/keys/model_keys_list_tsig_key_response.go index 2a6d699..5d90120 100644 --- a/keys/model_keys_list_tsig_key_response.go +++ b/keys/model_keys_list_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListTSIGKeyResponse) SetResults(v []KeysTSIGKey) { } func (o KeysListTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysListTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_read_kerberos_key_response.go b/keys/model_keys_read_kerberos_key_response.go index dce9578..daeeb0c 100644 --- a/keys/model_keys_read_kerberos_key_response.go +++ b/keys/model_keys_read_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysReadKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysReadKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_read_tsig_key_response.go b/keys/model_keys_read_tsig_key_response.go index fdc725c..3eee404 100644 --- a/keys/model_keys_read_tsig_key_response.go +++ b/keys/model_keys_read_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysReadTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysReadTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 9ebb444..2e98702 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,6 +13,8 @@ package keys import ( "encoding/json" "time" + "bytes" + "fmt" ) // checks if the KeysTSIGKey type satisfies the MappedNullable interface at compile time @@ -40,6 +42,8 @@ type KeysTSIGKey struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _KeysTSIGKey KeysTSIGKey + // NewKeysTSIGKey instantiates a new KeysTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -332,7 +336,7 @@ func (o *KeysTSIGKey) SetUpdatedAt(v time.Time) { } func (o KeysTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -367,6 +371,44 @@ func (o KeysTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *KeysTSIGKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKeysTSIGKey := _KeysTSIGKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKeysTSIGKey) + + if err != nil { + return err + } + + *o = KeysTSIGKey(varKeysTSIGKey) + + return err +} + type NullableKeysTSIGKey struct { value *KeysTSIGKey isSet bool @@ -402,3 +444,5 @@ func (v *NullableKeysTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_update_kerberos_key_response.go b/keys/model_keys_update_kerberos_key_response.go index 9e83ae5..189d271 100644 --- a/keys/model_keys_update_kerberos_key_response.go +++ b/keys/model_keys_update_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysUpdateKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysUpdateKerberosKeyResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_update_tsig_key_response.go b/keys/model_keys_update_tsig_key_response.go index dc1acd7..2082989 100644 --- a/keys/model_keys_update_tsig_key_response.go +++ b/keys/model_keys_update_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysUpdateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysUpdateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_protobuf_field_mask.go b/keys/model_protobuf_field_mask.go index c76ddb4..33973a0 100644 --- a/keys/model_protobuf_field_mask.go +++ b/keys/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_upload_content_type.go b/keys/model_upload_content_type.go index dbdf50c..4052062 100644 --- a/keys/model_upload_content_type.go +++ b/keys/model_upload_content_type.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -21,7 +21,7 @@ type UploadContentType string // List of uploadContentType const ( UPLOADCONTENTTYPE_UNKNOWN UploadContentType = "UNKNOWN" - UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" + UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" ) // All allowed values of UploadContentType enum @@ -108,3 +108,4 @@ func (v *NullableUploadContentType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + diff --git a/keys/model_upload_request.go b/keys/model_upload_request.go index bb985e6..351fa56 100644 --- a/keys/model_upload_request.go +++ b/keys/model_upload_request.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -12,6 +12,8 @@ package keys import ( "encoding/json" + "bytes" + "fmt" ) // checks if the UploadRequest type satisfies the MappedNullable interface at compile time @@ -22,13 +24,15 @@ type UploadRequest struct { // The description for uploaded content. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` // Base64 encoded content. - Content string `json:"content"` - Fields *ProtobufFieldMask `json:"fields,omitempty"` + Content string `json:"content"` + Fields *ProtobufFieldMask `json:"fields,omitempty"` // The tags for uploaded content in JSON format. Tags map[string]interface{} `json:"tags,omitempty"` - Type UploadContentType `json:"type"` + Type UploadContentType `json:"type"` } +type _UploadRequest UploadRequest + // NewUploadRequest instantiates a new UploadRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -195,7 +199,7 @@ func (o *UploadRequest) SetType(v UploadContentType) { } func (o UploadRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -218,6 +222,44 @@ func (o UploadRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UploadRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUploadRequest := _UploadRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUploadRequest) + + if err != nil { + return err + } + + *o = UploadRequest(varUploadRequest) + + return err +} + type NullableUploadRequest struct { value *UploadRequest isSet bool @@ -253,3 +295,5 @@ func (v *NullableUploadRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/utils.go b/keys/utils.go index 54647cd..51922c8 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { From 497b6b29275d406a219bcb5d7c32888a798568c7 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Tue, 27 Feb 2024 09:30:30 -0800 Subject: [PATCH 06/18] ran go fmt ./... --- dns_config/api_acl.go | 245 ++++---- dns_config/api_auth_nsg.go | 245 ++++---- dns_config/api_auth_zone.go | 292 ++++----- dns_config/api_cache_flush.go | 40 +- dns_config/api_convert_domain_name.go | 36 +- dns_config/api_convert_rname.go | 40 +- dns_config/api_delegation.go | 245 ++++---- dns_config/api_forward_nsg.go | 245 ++++---- dns_config/api_forward_zone.go | 280 ++++----- dns_config/api_global.go | 157 ++--- dns_config/api_host.go | 168 +++--- dns_config/api_lbdn.go | 235 ++++---- dns_config/api_server.go | 257 ++++---- dns_config/api_view.go | 294 ++++----- dns_config/client.go | 34 +- .../model_auth_zone_external_provider.go | 6 +- dns_config/model_config_acl.go | 12 +- dns_config/model_config_acl_item.go | 14 +- dns_config/model_config_auth_nsg.go | 12 +- dns_config/model_config_auth_zone.go | 10 +- dns_config/model_config_auth_zone_config.go | 6 +- .../model_config_auth_zone_inheritance.go | 20 +- dns_config/model_config_bulk_copy_error.go | 6 +- dns_config/model_config_bulk_copy_response.go | 10 +- dns_config/model_config_bulk_copy_view.go | 16 +- dns_config/model_config_cache_flush.go | 6 +- .../model_config_convert_domain_name.go | 6 +- ...del_config_convert_domain_name_response.go | 6 +- .../model_config_convert_r_name_response.go | 6 +- dns_config/model_config_copy_auth_zone.go | 12 +- .../model_config_copy_auth_zone_response.go | 6 +- dns_config/model_config_copy_forward_zone.go | 12 +- ...model_config_copy_forward_zone_response.go | 6 +- dns_config/model_config_copy_response.go | 6 +- .../model_config_create_acl_response.go | 6 +- .../model_config_create_auth_nsg_response.go | 6 +- .../model_config_create_auth_zone_response.go | 6 +- ...model_config_create_delegation_response.go | 6 +- ...odel_config_create_forward_nsg_response.go | 6 +- ...del_config_create_forward_zone_response.go | 6 +- .../model_config_create_lbdn_response.go | 6 +- .../model_config_create_server_response.go | 6 +- .../model_config_create_view_response.go | 6 +- .../model_config_custom_root_ns_block.go | 6 +- dns_config/model_config_delegation.go | 6 +- dns_config/model_config_delegation_server.go | 12 +- dns_config/model_config_display_view.go | 6 +- .../model_config_dnssec_validation_block.go | 6 +- dns_config/model_config_dtc_config.go | 6 +- dns_config/model_config_dtc_policy.go | 6 +- dns_config/model_config_ecs_block.go | 6 +- dns_config/model_config_ecs_zone.go | 12 +- dns_config/model_config_external_primary.go | 16 +- dns_config/model_config_external_secondary.go | 16 +- dns_config/model_config_forward_nsg.go | 12 +- dns_config/model_config_forward_zone.go | 6 +- .../model_config_forward_zone_config.go | 6 +- dns_config/model_config_forwarder.go | 12 +- dns_config/model_config_forwarders_block.go | 6 +- dns_config/model_config_global.go | 20 +- dns_config/model_config_host.go | 10 +- .../model_config_host_associated_server.go | 6 +- dns_config/model_config_host_inheritance.go | 6 +- .../model_config_inherited_acl_items.go | 6 +- ...l_config_inherited_custom_root_ns_block.go | 10 +- ...onfig_inherited_dnssec_validation_block.go | 10 +- .../model_config_inherited_dtc_config.go | 6 +- .../model_config_inherited_ecs_block.go | 10 +- ...model_config_inherited_forwarders_block.go | 10 +- .../model_config_inherited_kerberos_keys.go | 6 +- .../model_config_inherited_sort_list_items.go | 6 +- .../model_config_inherited_zone_authority.go | 22 +- ...g_inherited_zone_authority_m_name_block.go | 10 +- dns_config/model_config_internal_secondary.go | 12 +- dns_config/model_config_kerberos_key.go | 12 +- dns_config/model_config_lbdn.go | 16 +- dns_config/model_config_list_acl_response.go | 6 +- .../model_config_list_auth_nsg_response.go | 6 +- .../model_config_list_auth_zone_response.go | 6 +- .../model_config_list_delegation_response.go | 6 +- .../model_config_list_forward_nsg_response.go | 6 +- ...model_config_list_forward_zone_response.go | 6 +- dns_config/model_config_list_host_response.go | 6 +- dns_config/model_config_list_lbdn_response.go | 6 +- .../model_config_list_server_response.go | 6 +- dns_config/model_config_list_view_response.go | 6 +- dns_config/model_config_read_acl_response.go | 6 +- .../model_config_read_auth_nsg_response.go | 6 +- .../model_config_read_auth_zone_response.go | 6 +- .../model_config_read_delegation_response.go | 6 +- .../model_config_read_forward_nsg_response.go | 6 +- ...model_config_read_forward_zone_response.go | 6 +- .../model_config_read_global_response.go | 6 +- dns_config/model_config_read_host_response.go | 6 +- dns_config/model_config_read_lbdn_response.go | 6 +- .../model_config_read_server_response.go | 6 +- dns_config/model_config_read_view_response.go | 6 +- dns_config/model_config_root_ns.go | 12 +- dns_config/model_config_server.go | 16 +- dns_config/model_config_server_inheritance.go | 64 +- dns_config/model_config_sort_list_item.go | 12 +- dns_config/model_config_trust_anchor.go | 12 +- dns_config/model_config_tsig_key.go | 6 +- dns_config/model_config_ttl_inheritance.go | 6 +- .../model_config_update_acl_response.go | 6 +- .../model_config_update_auth_nsg_response.go | 6 +- .../model_config_update_auth_zone_response.go | 6 +- ...model_config_update_delegation_response.go | 6 +- ...odel_config_update_forward_nsg_response.go | 6 +- ...del_config_update_forward_zone_response.go | 6 +- .../model_config_update_global_response.go | 6 +- .../model_config_update_host_response.go | 6 +- .../model_config_update_lbdn_response.go | 6 +- .../model_config_update_server_response.go | 6 +- .../model_config_update_view_response.go | 6 +- dns_config/model_config_view.go | 24 +- dns_config/model_config_view_inheritance.go | 58 +- dns_config/model_config_warning.go | 6 +- dns_config/model_config_zone_authority.go | 6 +- ...odel_config_zone_authority_m_name_block.go | 6 +- .../model_inheritance2_assigned_host.go | 6 +- .../model_inheritance2_inherited_bool.go | 6 +- .../model_inheritance2_inherited_string.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_config/utils.go | 2 +- dns_data/api_record.go | 300 +++++----- dns_data/client.go | 8 +- dns_data/model_data_create_record_response.go | 6 +- dns_data/model_data_list_record_response.go | 6 +- dns_data/model_data_read_record_response.go | 6 +- dns_data/model_data_record.go | 16 +- dns_data/model_data_record_inheritance.go | 6 +- ...model_data_soa_serial_increment_request.go | 6 +- ...odel_data_soa_serial_increment_response.go | 6 +- dns_data/model_data_update_record_response.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_data/model_protobuf_field_mask.go | 6 +- dns_data/utils.go | 2 +- infra_mgmt/api_detail.go | 111 ++-- infra_mgmt/api_hosts.go | 419 ++++++------- infra_mgmt/api_services.go | 276 ++++----- infra_mgmt/client.go | 12 +- infra_mgmt/model_api_page_info.go | 6 +- infra_mgmt/model_infra_applications.go | 6 +- .../model_infra_applications_response.go | 6 +- infra_mgmt/model_infra_assign_tags_request.go | 12 +- .../model_infra_create_host_response.go | 6 +- .../model_infra_create_service_response.go | 6 +- infra_mgmt/model_infra_detail_host.go | 20 +- .../model_infra_detail_host_service_config.go | 10 +- infra_mgmt/model_infra_detail_location.go | 6 +- infra_mgmt/model_infra_detail_service.go | 12 +- infra_mgmt/model_infra_detail_service_host.go | 12 +- .../model_infra_detail_service_host_config.go | 12 +- infra_mgmt/model_infra_disconnect_request.go | 6 +- infra_mgmt/model_infra_get_host_response.go | 6 +- .../model_infra_get_service_response.go | 6 +- infra_mgmt/model_infra_host.go | 16 +- .../model_infra_list_detail_hosts_response.go | 8 +- ...del_infra_list_detail_services_response.go | 8 +- infra_mgmt/model_infra_list_host_response.go | 10 +- .../model_infra_list_service_response.go | 8 +- infra_mgmt/model_infra_pool_info.go | 6 +- .../model_infra_replace_host_request.go | 6 +- infra_mgmt/model_infra_service.go | 14 +- infra_mgmt/model_infra_service_host_config.go | 6 +- .../model_infra_short_service_status.go | 6 +- .../model_infra_unassign_tags_request.go | 8 +- .../model_infra_update_host_response.go | 6 +- .../model_infra_update_service_response.go | 6 +- infra_mgmt/utils.go | 2 +- infra_provision/api_ui_join_token.go | 259 ++++---- infra_provision/api_uicsr.go | 220 +++---- infra_provision/client.go | 8 +- infra_provision/model_api_page_info.go | 4 +- ...odel_hostactivation_approve_csr_request.go | 4 +- ...stactivation_create_join_token_response.go | 8 +- infra_provision/model_hostactivation_csr.go | 26 +- .../model_hostactivation_csr_state.go | 11 +- ...stactivation_delete_join_tokens_request.go | 4 +- .../model_hostactivation_deny_csr_request.go | 4 +- .../model_hostactivation_join_token.go | 32 +- ...model_hostactivation_list_csrs_response.go | 6 +- ...hostactivation_list_join_token_response.go | 6 +- ...hostactivation_read_join_token_response.go | 4 +- ...odel_hostactivation_revoke_cert_request.go | 6 +- ...stactivation_update_join_token_response.go | 4 +- .../model_join_token_join_token_status.go | 3 +- infra_provision/model_types_inet_value.go | 4 +- infra_provision/model_types_json_value.go | 4 +- ipam/api_address.go | 247 ++++---- ipam/api_address_block.go | 560 +++++++++--------- ipam/api_asm.go | 116 ++-- ipam/api_dhcp_host.go | 195 +++--- ipam/api_dns_usage.go | 93 +-- ipam/api_filter.go | 58 +- ipam/api_fixed_address.go | 255 ++++---- ipam/api_global.go | 155 ++--- ipam/api_ha_group.go | 231 ++++---- ipam/api_hardware_filter.go | 243 ++++---- ipam/api_ip_space.go | 337 +++++------ ipam/api_ipam_host.go | 247 ++++---- ipam/api_leases_command.go | 38 +- ipam/api_option_code.go | 207 +++---- ipam/api_option_filter.go | 243 ++++---- ipam/api_option_group.go | 243 ++++---- ipam/api_option_space.go | 243 ++++---- ipam/api_range.go | 329 +++++----- ipam/api_server.go | 255 ++++---- ipam/api_subnet.go | 372 ++++++------ ipam/client.go | 44 +- ipam/model_inheritance_assigned_host.go | 4 +- ipam/model_inheritance_inherited_bool.go | 4 +- ipam/model_inheritance_inherited_float.go | 4 +- .../model_inheritance_inherited_identifier.go | 4 +- ipam/model_inheritance_inherited_string.go | 4 +- ipam/model_inheritance_inherited_u_int32.go | 4 +- ...model_inherited_dhcp_config_filter_list.go | 4 +- ..._inherited_dhcp_config_ignore_item_list.go | 4 +- ipam/model_ipamsvc_access_filter.go | 10 +- ipam/model_ipamsvc_address.go | 16 +- ipam/model_ipamsvc_address_block.go | 20 +- ipam/model_ipamsvc_asm.go | 10 +- ipam/model_ipamsvc_asm_config.go | 6 +- ipam/model_ipamsvc_asm_enable_block.go | 4 +- ipam/model_ipamsvc_asm_growth_block.go | 4 +- ipam/model_ipamsvc_bulk_copy_error.go | 4 +- ipam/model_ipamsvc_bulk_copy_ip_space.go | 10 +- ...del_ipamsvc_bulk_copy_ip_space_response.go | 8 +- ipam/model_ipamsvc_copy_address_block.go | 10 +- ...del_ipamsvc_copy_address_block_response.go | 4 +- ipam/model_ipamsvc_copy_ip_space.go | 10 +- ipam/model_ipamsvc_copy_ip_space_response.go | 4 +- ipam/model_ipamsvc_copy_response.go | 4 +- ipam/model_ipamsvc_copy_subnet.go | 10 +- ipam/model_ipamsvc_copy_subnet_response.go | 4 +- ...l_ipamsvc_create_address_block_response.go | 4 +- ipam/model_ipamsvc_create_address_response.go | 4 +- ipam/model_ipamsvc_create_asm_response.go | 4 +- ...l_ipamsvc_create_fixed_address_response.go | 4 +- .../model_ipamsvc_create_ha_group_response.go | 4 +- ...ipamsvc_create_hardware_filter_response.go | 4 +- .../model_ipamsvc_create_ip_space_response.go | 4 +- ...model_ipamsvc_create_ipam_host_response.go | 4 +- ..._ipamsvc_create_leases_command_response.go | 4 +- ...amsvc_create_next_available_ab_response.go | 4 +- ...amsvc_create_next_available_ip_response.go | 4 +- ...c_create_next_available_subnet_response.go | 4 +- ...del_ipamsvc_create_option_code_response.go | 4 +- ...l_ipamsvc_create_option_filter_response.go | 4 +- ...el_ipamsvc_create_option_group_response.go | 4 +- ...el_ipamsvc_create_option_space_response.go | 4 +- ipam/model_ipamsvc_create_range_response.go | 4 +- ipam/model_ipamsvc_create_server_response.go | 4 +- ipam/model_ipamsvc_create_subnet_response.go | 4 +- ipam/model_ipamsvc_ddns_block.go | 4 +- ipam/model_ipamsvc_ddns_hostname_block.go | 4 +- ipam/model_ipamsvc_ddns_update_block.go | 4 +- ipam/model_ipamsvc_ddns_zone.go | 14 +- ipam/model_ipamsvc_dhcp_config.go | 4 +- ipam/model_ipamsvc_dhcp_info.go | 4 +- ipam/model_ipamsvc_dhcp_inheritance.go | 34 +- .../model_ipamsvc_dhcp_options_inheritance.go | 4 +- ipam/model_ipamsvc_dhcp_packet_stats.go | 4 +- ipam/model_ipamsvc_dhcp_utilization.go | 4 +- ...odel_ipamsvc_dhcp_utilization_threshold.go | 10 +- ipam/model_ipamsvc_dns_usage.go | 4 +- ipam/model_ipamsvc_exclusion_range.go | 10 +- ipam/model_ipamsvc_filter.go | 4 +- ipam/model_ipamsvc_fixed_address.go | 14 +- ...model_ipamsvc_fixed_address_inheritance.go | 12 +- ipam/model_ipamsvc_global.go | 8 +- ipam/model_ipamsvc_ha_group.go | 12 +- ipam/model_ipamsvc_ha_group_heartbeats.go | 4 +- ipam/model_ipamsvc_ha_group_host.go | 10 +- ipam/model_ipamsvc_hardware_filter.go | 12 +- ipam/model_ipamsvc_host.go | 6 +- ipam/model_ipamsvc_host_address.go | 4 +- ipam/model_ipamsvc_host_associated_server.go | 4 +- ...odel_ipamsvc_host_associations_response.go | 6 +- ipam/model_ipamsvc_host_name.go | 10 +- ipam/model_ipamsvc_hostname_rewrite_block.go | 4 +- ipam/model_ipamsvc_ignore_item.go | 10 +- ipam/model_ipamsvc_inherited_asm_config.go | 14 +- ...odel_ipamsvc_inherited_asm_enable_block.go | 8 +- ...odel_ipamsvc_inherited_asm_growth_block.go | 8 +- ipam/model_ipamsvc_inherited_ddns_block.go | 8 +- ...l_ipamsvc_inherited_ddns_hostname_block.go | 8 +- ...del_ipamsvc_inherited_ddns_update_block.go | 8 +- ipam/model_ipamsvc_inherited_dhcp_config.go | 24 +- ipam/model_ipamsvc_inherited_dhcp_option.go | 8 +- ...odel_ipamsvc_inherited_dhcp_option_item.go | 4 +- ...odel_ipamsvc_inherited_dhcp_option_list.go | 4 +- ...pamsvc_inherited_hostname_rewrite_block.go | 8 +- ipam/model_ipamsvc_ip_space.go | 24 +- ipam/model_ipamsvc_ip_space_inheritance.go | 38 +- ipam/model_ipamsvc_ipam_host.go | 12 +- ipam/model_ipamsvc_kerberos_key.go | 10 +- ipam/model_ipamsvc_lease_address.go | 4 +- ipam/model_ipamsvc_lease_range.go | 4 +- ipam/model_ipamsvc_lease_subnet.go | 4 +- ipam/model_ipamsvc_leases_command.go | 10 +- ...del_ipamsvc_list_address_block_response.go | 4 +- ipam/model_ipamsvc_list_address_response.go | 4 +- ipam/model_ipamsvc_list_asm_response.go | 4 +- ipam/model_ipamsvc_list_dns_usage_response.go | 4 +- ipam/model_ipamsvc_list_filter_response.go | 4 +- ...del_ipamsvc_list_fixed_address_response.go | 4 +- ipam/model_ipamsvc_list_ha_group_response.go | 4 +- ...l_ipamsvc_list_hardware_filter_response.go | 4 +- ipam/model_ipamsvc_list_host_response.go | 4 +- ipam/model_ipamsvc_list_ip_space_response.go | 4 +- ipam/model_ipamsvc_list_ipam_host_response.go | 4 +- ...model_ipamsvc_list_option_code_response.go | 4 +- ...del_ipamsvc_list_option_filter_response.go | 4 +- ...odel_ipamsvc_list_option_group_response.go | 4 +- ...odel_ipamsvc_list_option_space_response.go | 4 +- ipam/model_ipamsvc_list_range_response.go | 4 +- ipam/model_ipamsvc_list_server_response.go | 4 +- ipam/model_ipamsvc_list_subnet_response.go | 4 +- ipam/model_ipamsvc_name.go | 10 +- ipam/model_ipamsvc_nameserver.go | 6 +- ...odel_ipamsvc_next_available_ab_response.go | 4 +- ...odel_ipamsvc_next_available_ip_response.go | 4 +- ..._ipamsvc_next_available_subnet_response.go | 4 +- ipam/model_ipamsvc_option_code.go | 12 +- ipam/model_ipamsvc_option_filter.go | 14 +- ipam/model_ipamsvc_option_filter_rule.go | 10 +- ipam/model_ipamsvc_option_filter_rule_list.go | 4 +- ipam/model_ipamsvc_option_group.go | 12 +- ipam/model_ipamsvc_option_item.go | 4 +- ipam/model_ipamsvc_option_space.go | 12 +- ipam/model_ipamsvc_range.go | 22 +- ...del_ipamsvc_read_address_block_response.go | 4 +- ipam/model_ipamsvc_read_address_response.go | 4 +- ipam/model_ipamsvc_read_asm_response.go | 4 +- ipam/model_ipamsvc_read_dns_usage_response.go | 4 +- ...del_ipamsvc_read_fixed_address_response.go | 4 +- ipam/model_ipamsvc_read_global_response.go | 4 +- ipam/model_ipamsvc_read_ha_group_response.go | 4 +- ...l_ipamsvc_read_hardware_filter_response.go | 4 +- ipam/model_ipamsvc_read_host_response.go | 4 +- ipam/model_ipamsvc_read_ip_space_response.go | 4 +- ipam/model_ipamsvc_read_ipam_host_response.go | 4 +- ...model_ipamsvc_read_option_code_response.go | 4 +- ...del_ipamsvc_read_option_filter_response.go | 4 +- ...odel_ipamsvc_read_option_group_response.go | 4 +- ...odel_ipamsvc_read_option_space_response.go | 4 +- ipam/model_ipamsvc_read_range_response.go | 4 +- ipam/model_ipamsvc_read_server_response.go | 4 +- ipam/model_ipamsvc_read_subnet_response.go | 4 +- ipam/model_ipamsvc_server.go | 16 +- ipam/model_ipamsvc_server_inheritance.go | 34 +- ipam/model_ipamsvc_subnet.go | 20 +- ipam/model_ipamsvc_tsig_key.go | 10 +- ...l_ipamsvc_update_address_block_response.go | 4 +- ipam/model_ipamsvc_update_address_response.go | 4 +- ...l_ipamsvc_update_fixed_address_response.go | 4 +- ipam/model_ipamsvc_update_global_response.go | 4 +- .../model_ipamsvc_update_ha_group_response.go | 4 +- ...ipamsvc_update_hardware_filter_response.go | 4 +- ipam/model_ipamsvc_update_host_response.go | 4 +- .../model_ipamsvc_update_ip_space_response.go | 4 +- ...model_ipamsvc_update_ipam_host_response.go | 4 +- ...del_ipamsvc_update_option_code_response.go | 4 +- ...l_ipamsvc_update_option_filter_response.go | 4 +- ...el_ipamsvc_update_option_group_response.go | 4 +- ...el_ipamsvc_update_option_space_response.go | 4 +- ipam/model_ipamsvc_update_range_response.go | 4 +- ipam/model_ipamsvc_update_server_response.go | 4 +- ipam/model_ipamsvc_update_subnet_response.go | 4 +- ipam/model_ipamsvc_utilization.go | 4 +- ipam/model_ipamsvc_utilization_threshold.go | 10 +- ipam/model_ipamsvc_utilization_v6.go | 12 +- keys/api_generate_tsig.go | 34 +- keys/api_kerberos.go | 209 +++---- keys/api_tsig.go | 245 ++++---- keys/api_upload.go | 54 +- keys/client.go | 14 +- keys/model_ddiupload_response.go | 6 +- keys/model_kerberos_key.go | 6 +- keys/model_kerberos_keys.go | 6 +- keys/model_keys_create_tsig_key_response.go | 6 +- keys/model_keys_generate_tsig_response.go | 6 +- keys/model_keys_generate_tsig_result.go | 6 +- keys/model_keys_list_kerberos_key_response.go | 6 +- keys/model_keys_list_tsig_key_response.go | 6 +- keys/model_keys_read_kerberos_key_response.go | 6 +- keys/model_keys_read_tsig_key_response.go | 6 +- keys/model_keys_tsig_key.go | 14 +- ...model_keys_update_kerberos_key_response.go | 6 +- keys/model_keys_update_tsig_key_response.go | 6 +- keys/model_protobuf_field_mask.go | 6 +- keys/model_upload_content_type.go | 5 +- keys/model_upload_request.go | 18 +- keys/utils.go | 2 +- 396 files changed, 5904 insertions(+), 6456 deletions(-) diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index f9ed57d..c06e786 100644 --- a/dns_config/api_acl.go +++ b/dns_config/api_acl.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type AclAPI interface { /* - AclCreate Create the ACL object. + AclCreate Create the ACL object. - Use this method to create an ACL object. -ACL object (_dns/acl_) represents a named Access Control List. + Use this method to create an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ AclCreate(ctx context.Context) ApiAclCreateRequest @@ -38,27 +37,27 @@ ACL object (_dns/acl_) represents a named Access Control List. // @return ConfigCreateACLResponse AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) /* - AclDelete Move the ACL object to Recyclebin. + AclDelete Move the ACL object to Recyclebin. - Use this method to move an ACL object to Recyclebin. -ACL object (_dns/acl_) represents a named Access Control List. + Use this method to move an ACL object to Recyclebin. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ AclDelete(ctx context.Context, id string) ApiAclDeleteRequest // AclDeleteExecute executes the request AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) /* - AclList List ACL objects. + AclList List ACL objects. - Use this method to list ACL objects. -ACL object (_dns/acl_) represents a named Access Control List. + Use this method to list ACL objects. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ AclList(ctx context.Context) ApiAclListRequest @@ -66,14 +65,14 @@ ACL object (_dns/acl_) represents a named Access Control List. // @return ConfigListACLResponse AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) /* - AclRead Read the ACL object. + AclRead Read the ACL object. - Use this method to read an ACL object. -ACL object (_dns/acl_) represents a named Access Control List. + Use this method to read an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ AclRead(ctx context.Context, id string) ApiAclReadRequest @@ -81,14 +80,14 @@ ACL object (_dns/acl_) represents a named Access Control List. // @return ConfigReadACLResponse AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) /* - AclUpdate Update the ACL object. + AclUpdate Update the ACL object. - Use this method to update an ACL object. -ACL object (_dns/acl_) represents a named Access Control List. + Use this method to update an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest @@ -101,9 +100,9 @@ ACL object (_dns/acl_) represents a named Access Control List. type AclAPIService internal.Service type ApiAclCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - body *ConfigACL + body *ConfigACL } func (r ApiAclCreateRequest) Body(body ConfigACL) ApiAclCreateRequest { @@ -121,24 +120,25 @@ AclCreate Create the ACL object. Use this method to create an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ func (a *AclAPIService) AclCreate(ctx context.Context) ApiAclCreateRequest { return ApiAclCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateACLResponse +// +// @return ConfigCreateACLResponse func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateACLResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclCreate") @@ -172,16 +172,16 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC } type ApiAclDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - id string + id string } func (r ApiAclDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ AclDelete Move the ACL object to Recyclebin. Use this method to move an ACL object to Recyclebin. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ func (a *AclAPIService) AclDelete(ctx context.Context, id string) ApiAclDeleteRequest { return ApiAclDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AclAPIService) AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclDelete") @@ -331,49 +331,49 @@ func (a *AclAPIService) AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, } type ApiAclListRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAclListRequest) Fields(fields string) ApiAclListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAclListRequest) Filter(filter string) ApiAclListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAclListRequest) Offset(offset int32) ApiAclListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAclListRequest) Limit(limit int32) ApiAclListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAclListRequest) PageToken(pageToken string) ApiAclListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAclListRequest) OrderBy(orderBy string) ApiAclListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ AclList List ACL objects. Use this method to list ACL objects. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ func (a *AclAPIService) AclList(ctx context.Context) ApiAclListRequest { return ApiAclListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListACLResponse +// +// @return ConfigListACLResponse func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListACLResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclList") @@ -518,13 +519,13 @@ func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLRespo } type ApiAclReadRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAclReadRequest) Fields(fields string) ApiAclReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ AclRead Read the ACL object. Use this method to read an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ func (a *AclAPIService) AclRead(ctx context.Context, id string) ApiAclReadRequest { return ApiAclReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadACLResponse +// +// @return ConfigReadACLResponse func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadACLResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclRead") @@ -639,10 +641,10 @@ func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLRespo } type ApiAclUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AclAPI - id string - body *ConfigACL + id string + body *ConfigACL } func (r ApiAclUpdateRequest) Body(body ConfigACL) ApiAclUpdateRequest { @@ -660,26 +662,27 @@ AclUpdate Update the ACL object. Use this method to update an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ func (a *AclAPIService) AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest { return ApiAclUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateACLResponse +// +// @return ConfigUpdateACLResponse func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateACLResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateACLResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateACLResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AclAPIService.AclUpdate") @@ -714,16 +717,16 @@ func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_auth_nsg.go b/dns_config/api_auth_nsg.go index df8df8f..d2ed1ca 100644 --- a/dns_config/api_auth_nsg.go +++ b/dns_config/api_auth_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type AuthNsgAPI interface { /* - AuthNsgCreate Create the AuthNSG object. + AuthNsgCreate Create the AuthNSG object. - Use this method to create an AuthNSG object. -The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to create an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest @@ -38,27 +37,27 @@ The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for autho // @return ConfigCreateAuthNSGResponse AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) /* - AuthNsgDelete Move the AuthNSG object to Recyclebin. + AuthNsgDelete Move the AuthNSG object to Recyclebin. - Use this method to move an AuthNSG object to Recyclebin. -The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to move an AuthNSG object to Recyclebin. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest // AuthNsgDeleteExecute executes the request AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) /* - AuthNsgList List AuthNSG objects. + AuthNsgList List AuthNSG objects. - Use this method to list AuthNSG objects. -The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to list AuthNSG objects. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ AuthNsgList(ctx context.Context) ApiAuthNsgListRequest @@ -66,14 +65,14 @@ The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for autho // @return ConfigListAuthNSGResponse AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) /* - AuthNsgRead Read the AuthNSG object. + AuthNsgRead Read the AuthNSG object. - Use this method to read an AuthNSG object. -The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to read an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest @@ -81,14 +80,14 @@ The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for autho // @return ConfigReadAuthNSGResponse AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) /* - AuthNsgUpdate Update the AuthNSG object. + AuthNsgUpdate Update the AuthNSG object. - Use this method to update an AuthNSG object. -The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to update an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest @@ -101,9 +100,9 @@ The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for autho type AuthNsgAPIService internal.Service type ApiAuthNsgCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - body *ConfigAuthNSG + body *ConfigAuthNSG } func (r ApiAuthNsgCreateRequest) Body(body ConfigAuthNSG) ApiAuthNsgCreateRequest { @@ -121,24 +120,25 @@ AuthNsgCreate Create the AuthNSG object. Use this method to create an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ func (a *AuthNsgAPIService) AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest { return ApiAuthNsgCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateAuthNSGResponse +// +// @return ConfigCreateAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateAuthNSGResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgCreate") @@ -172,16 +172,16 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co } type ApiAuthNsgDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - id string + id string } func (r ApiAuthNsgDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ AuthNsgDelete Move the AuthNSG object to Recyclebin. Use this method to move an AuthNSG object to Recyclebin. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ func (a *AuthNsgAPIService) AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest { return ApiAuthNsgDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AuthNsgAPIService) AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgDelete") @@ -331,49 +331,49 @@ func (a *AuthNsgAPIService) AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*ht } type ApiAuthNsgListRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthNsgListRequest) Fields(fields string) ApiAuthNsgListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAuthNsgListRequest) Filter(filter string) ApiAuthNsgListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAuthNsgListRequest) Offset(offset int32) ApiAuthNsgListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAuthNsgListRequest) Limit(limit int32) ApiAuthNsgListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAuthNsgListRequest) PageToken(pageToken string) ApiAuthNsgListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAuthNsgListRequest) OrderBy(orderBy string) ApiAuthNsgListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ AuthNsgList List AuthNSG objects. Use this method to list AuthNSG objects. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ func (a *AuthNsgAPIService) AuthNsgList(ctx context.Context) ApiAuthNsgListRequest { return ApiAuthNsgListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListAuthNSGResponse +// +// @return ConfigListAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListAuthNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgList") @@ -518,13 +519,13 @@ func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*Config } type ApiAuthNsgReadRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthNsgReadRequest) Fields(fields string) ApiAuthNsgReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ AuthNsgRead Read the AuthNSG object. Use this method to read an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ func (a *AuthNsgAPIService) AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest { return ApiAuthNsgReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadAuthNSGResponse +// +// @return ConfigReadAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadAuthNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgRead") @@ -639,10 +641,10 @@ func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*Config } type ApiAuthNsgUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthNsgAPI - id string - body *ConfigAuthNSG + id string + body *ConfigAuthNSG } func (r ApiAuthNsgUpdateRequest) Body(body ConfigAuthNSG) ApiAuthNsgUpdateRequest { @@ -660,26 +662,27 @@ AuthNsgUpdate Update the AuthNSG object. Use this method to update an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ func (a *AuthNsgAPIService) AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest { return ApiAuthNsgUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateAuthNSGResponse +// +// @return ConfigUpdateAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*ConfigUpdateAuthNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateAuthNSGResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateAuthNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthNsgAPIService.AuthNsgUpdate") @@ -714,16 +717,16 @@ func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_auth_zone.go b/dns_config/api_auth_zone.go index eb9bb7b..c95502a 100644 --- a/dns_config/api_auth_zone.go +++ b/dns_config/api_auth_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type AuthZoneAPI interface { /* - AuthZoneCopy Copies the __AuthZone__ object. + AuthZoneCopy Copies the __AuthZone__ object. - Use this method to copy an __AuthZone__ object to a different __View__. -This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to copy an __AuthZone__ object to a different __View__. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest @@ -38,13 +37,13 @@ This object (_dns/auth_zone_) represents an authoritative zone. // @return ConfigCopyAuthZoneResponse AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) /* - AuthZoneCreate Create the AuthZone object. + AuthZoneCreate Create the AuthZone object. - Use this method to create an AuthZone object. -This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to create an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest @@ -52,27 +51,27 @@ This object (_dns/auth_zone_) represents an authoritative zone. // @return ConfigCreateAuthZoneResponse AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) /* - AuthZoneDelete Moves the AuthZone object to Recyclebin. + AuthZoneDelete Moves the AuthZone object to Recyclebin. - Use this method to move an AuthZone object to Recyclebin. -This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to move an AuthZone object to Recyclebin. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest // AuthZoneDeleteExecute executes the request AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) /* - AuthZoneList List AuthZone objects. + AuthZoneList List AuthZone objects. - Use this method to list AuthZone objects. -This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to list AuthZone objects. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ AuthZoneList(ctx context.Context) ApiAuthZoneListRequest @@ -80,14 +79,14 @@ This object (_dns/auth_zone_) represents an authoritative zone. // @return ConfigListAuthZoneResponse AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) /* - AuthZoneRead Read the AuthZone object. + AuthZoneRead Read the AuthZone object. - Use this method to read an AuthZone object. -This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to read an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest @@ -95,14 +94,14 @@ This object (_dns/auth_zone_) represents an authoritative zone. // @return ConfigReadAuthZoneResponse AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) /* - AuthZoneUpdate Update the AuthZone object. + AuthZoneUpdate Update the AuthZone object. - Use this method to update an AuthZone object. -This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to update an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest @@ -115,9 +114,9 @@ This object (_dns/auth_zone_) represents an authoritative zone. type AuthZoneAPIService internal.Service type ApiAuthZoneCopyRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - body *ConfigCopyAuthZone + body *ConfigCopyAuthZone } func (r ApiAuthZoneCopyRequest) Body(body ConfigCopyAuthZone) ApiAuthZoneCopyRequest { @@ -135,24 +134,25 @@ AuthZoneCopy Copies the __AuthZone__ object. Use this method to copy an __AuthZone__ object to a different __View__. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ func (a *AuthZoneAPIService) AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest { return ApiAuthZoneCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCopyAuthZoneResponse +// +// @return ConfigCopyAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCopyAuthZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCopyAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneCopy") @@ -186,8 +186,8 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -233,10 +233,10 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con } type ApiAuthZoneCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - body *ConfigAuthZone - inherit *string + body *ConfigAuthZone + inherit *string } func (r ApiAuthZoneCreateRequest) Body(body ConfigAuthZone) ApiAuthZoneCreateRequest { @@ -260,24 +260,25 @@ AuthZoneCreate Create the AuthZone object. Use this method to create an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ func (a *AuthZoneAPIService) AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest { return ApiAuthZoneCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateAuthZoneResponse +// +// @return ConfigCreateAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateAuthZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneCreate") @@ -314,16 +315,16 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -369,9 +370,9 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( } type ApiAuthZoneDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - id string + id string } func (r ApiAuthZoneDeleteRequest) Execute() (*http.Response, error) { @@ -384,24 +385,24 @@ AuthZoneDelete Moves the AuthZone object to Recyclebin. Use this method to move an AuthZone object to Recyclebin. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ func (a *AuthZoneAPIService) AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest { return ApiAuthZoneDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AuthZoneAPIService) AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneDelete") @@ -473,50 +474,50 @@ func (a *AuthZoneAPIService) AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) ( } type ApiAuthZoneListRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthZoneListRequest) Fields(fields string) ApiAuthZoneListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAuthZoneListRequest) Filter(filter string) ApiAuthZoneListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAuthZoneListRequest) Offset(offset int32) ApiAuthZoneListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAuthZoneListRequest) Limit(limit int32) ApiAuthZoneListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAuthZoneListRequest) PageToken(pageToken string) ApiAuthZoneListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAuthZoneListRequest) OrderBy(orderBy string) ApiAuthZoneListRequest { r.orderBy = &orderBy return r @@ -550,24 +551,25 @@ AuthZoneList List AuthZone objects. Use this method to list AuthZone objects. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ func (a *AuthZoneAPIService) AuthZoneList(ctx context.Context) ApiAuthZoneListRequest { return ApiAuthZoneListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListAuthZoneResponse +// +// @return ConfigListAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListAuthZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneList") @@ -670,14 +672,14 @@ func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*Con } type ApiAuthZoneReadRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthZoneReadRequest) Fields(fields string) ApiAuthZoneReadRequest { r.fields = &fields return r @@ -699,26 +701,27 @@ AuthZoneRead Read the AuthZone object. Use this method to read an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ func (a *AuthZoneAPIService) AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest { return ApiAuthZoneReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadAuthZoneResponse +// +// @return ConfigReadAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadAuthZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneRead") @@ -801,11 +804,11 @@ func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*Con } type ApiAuthZoneUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AuthZoneAPI - id string - body *ConfigAuthZone - inherit *string + id string + body *ConfigAuthZone + inherit *string } func (r ApiAuthZoneUpdateRequest) Body(body ConfigAuthZone) ApiAuthZoneUpdateRequest { @@ -829,26 +832,27 @@ AuthZoneUpdate Update the AuthZone object. Use this method to update an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ func (a *AuthZoneAPIService) AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest { return ApiAuthZoneUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateAuthZoneResponse +// +// @return ConfigUpdateAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) (*ConfigUpdateAuthZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateAuthZoneResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateAuthZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AuthZoneAPIService.AuthZoneUpdate") @@ -886,16 +890,16 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_cache_flush.go b/dns_config/api_cache_flush.go index fddc796..f3ca335 100644 --- a/dns_config/api_cache_flush.go +++ b/dns_config/api_cache_flush.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,19 +17,18 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type CacheFlushAPI interface { /* - CacheFlushCreate Create the Cache Flush object. + CacheFlushCreate Create the Cache Flush object. - Use this method to create a Cache Flush object. -The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. + Use this method to create a Cache Flush object. + The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest @@ -42,9 +41,9 @@ The Cache Flush object is for removing entries from the DNS cache on a host. The type CacheFlushAPIService internal.Service type ApiCacheFlushCreateRequest struct { - ctx context.Context + ctx context.Context ApiService CacheFlushAPI - body *ConfigCacheFlush + body *ConfigCacheFlush } func (r ApiCacheFlushCreateRequest) Body(body ConfigCacheFlush) ApiCacheFlushCreateRequest { @@ -62,24 +61,25 @@ CacheFlushCreate Create the Cache Flush object. Use this method to create a Cache Flush object. The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ func (a *CacheFlushAPIService) CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest { return ApiCacheFlushCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "CacheFlushAPIService.CacheFlushCreate") @@ -113,8 +113,8 @@ func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_convert_domain_name.go b/dns_config/api_convert_domain_name.go index 4c7de4c..cc1d7af 100644 --- a/dns_config/api_convert_domain_name.go +++ b/dns_config/api_convert_domain_name.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ConvertDomainNameAPI interface { /* - ConvertDomainNameConvert Convert the object. + ConvertDomainNameConvert Convert the object. - Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). + Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param domainName Input domain name in either of IDN or punycode representations. - @return ApiConvertDomainNameConvertRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainName Input domain name in either of IDN or punycode representations. + @return ApiConvertDomainNameConvertRequest */ ConvertDomainNameConvert(ctx context.Context, domainName string) ApiConvertDomainNameConvertRequest @@ -43,7 +42,7 @@ type ConvertDomainNameAPI interface { type ConvertDomainNameAPIService internal.Service type ApiConvertDomainNameConvertRequest struct { - ctx context.Context + ctx context.Context ApiService ConvertDomainNameAPI domainName string } @@ -57,26 +56,27 @@ ConvertDomainNameConvert Convert the object. Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param domainName Input domain name in either of IDN or punycode representations. - @return ApiConvertDomainNameConvertRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainName Input domain name in either of IDN or punycode representations. + @return ApiConvertDomainNameConvertRequest */ func (a *ConvertDomainNameAPIService) ConvertDomainNameConvert(ctx context.Context, domainName string) ApiConvertDomainNameConvertRequest { return ApiConvertDomainNameConvertRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, domainName: domainName, } } // Execute executes the request -// @return ConfigConvertDomainNameResponse +// +// @return ConfigConvertDomainNameResponse func (a *ConvertDomainNameAPIService) ConvertDomainNameConvertExecute(r ApiConvertDomainNameConvertRequest) (*ConfigConvertDomainNameResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigConvertDomainNameResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigConvertDomainNameResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ConvertDomainNameAPIService.ConvertDomainNameConvert") diff --git a/dns_config/api_convert_rname.go b/dns_config/api_convert_rname.go index a4ec468..e15f007 100644 --- a/dns_config/api_convert_rname.go +++ b/dns_config/api_convert_rname.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ConvertRnameAPI interface { /* - ConvertRnameConvertRName Convert the object. + ConvertRnameConvertRName Convert the object. - Use this method to convert email address to the master file RNAME format. + Use this method to convert email address to the master file RNAME format. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param emailAddress Input email address. - @return ApiConvertRnameConvertRNameRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param emailAddress Input email address. + @return ApiConvertRnameConvertRNameRequest */ ConvertRnameConvertRName(ctx context.Context, emailAddress string) ApiConvertRnameConvertRNameRequest @@ -43,8 +42,8 @@ type ConvertRnameAPI interface { type ConvertRnameAPIService internal.Service type ApiConvertRnameConvertRNameRequest struct { - ctx context.Context - ApiService ConvertRnameAPI + ctx context.Context + ApiService ConvertRnameAPI emailAddress string } @@ -57,26 +56,27 @@ ConvertRnameConvertRName Convert the object. Use this method to convert email address to the master file RNAME format. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param emailAddress Input email address. - @return ApiConvertRnameConvertRNameRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param emailAddress Input email address. + @return ApiConvertRnameConvertRNameRequest */ func (a *ConvertRnameAPIService) ConvertRnameConvertRName(ctx context.Context, emailAddress string) ApiConvertRnameConvertRNameRequest { return ApiConvertRnameConvertRNameRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, emailAddress: emailAddress, } } // Execute executes the request -// @return ConfigConvertRNameResponse +// +// @return ConfigConvertRNameResponse func (a *ConvertRnameAPIService) ConvertRnameConvertRNameExecute(r ApiConvertRnameConvertRNameRequest) (*ConfigConvertRNameResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigConvertRNameResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigConvertRNameResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ConvertRnameAPIService.ConvertRnameConvertRName") diff --git a/dns_config/api_delegation.go b/dns_config/api_delegation.go index 9523880..1aae7b6 100644 --- a/dns_config/api_delegation.go +++ b/dns_config/api_delegation.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type DelegationAPI interface { /* - DelegationCreate Create the Delegation object. + DelegationCreate Create the Delegation object. - Use this method to create a Delegation object. -This object (_dns/delegation_) represents a zone delegation. + Use this method to create a Delegation object. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ DelegationCreate(ctx context.Context) ApiDelegationCreateRequest @@ -38,27 +37,27 @@ This object (_dns/delegation_) represents a zone delegation. // @return ConfigCreateDelegationResponse DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) /* - DelegationDelete Moves the Delegation object to Recyclebin. + DelegationDelete Moves the Delegation object to Recyclebin. - Use this method to move a Delegation object to Recyclebin. -This object (_dns/delegation_) represents a zone delegation. + Use this method to move a Delegation object to Recyclebin. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest // DelegationDeleteExecute executes the request DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) /* - DelegationList List Delegation objects. + DelegationList List Delegation objects. - Use this method to list Delegation objects. -This object (_dns/delegation_) represents a zone delegation. + Use this method to list Delegation objects. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ DelegationList(ctx context.Context) ApiDelegationListRequest @@ -66,14 +65,14 @@ This object (_dns/delegation_) represents a zone delegation. // @return ConfigListDelegationResponse DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) /* - DelegationRead Read the Delegation object. + DelegationRead Read the Delegation object. - Use this method to read a Delegation object. -This object (_dns/delegation)_ represents a zone delegation. + Use this method to read a Delegation object. + This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest @@ -81,14 +80,14 @@ This object (_dns/delegation)_ represents a zone delegation. // @return ConfigReadDelegationResponse DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) /* - DelegationUpdate Update the Delegation object. + DelegationUpdate Update the Delegation object. - Use this method to update a Delegation object. -This object (_dns/delegation_) represents a zone delegation. + Use this method to update a Delegation object. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest @@ -101,9 +100,9 @@ This object (_dns/delegation_) represents a zone delegation. type DelegationAPIService internal.Service type ApiDelegationCreateRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - body *ConfigDelegation + body *ConfigDelegation } func (r ApiDelegationCreateRequest) Body(body ConfigDelegation) ApiDelegationCreateRequest { @@ -121,24 +120,25 @@ DelegationCreate Create the Delegation object. Use this method to create a Delegation object. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ func (a *DelegationAPIService) DelegationCreate(ctx context.Context) ApiDelegationCreateRequest { return ApiDelegationCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateDelegationResponse +// +// @return ConfigCreateDelegationResponse func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateDelegationResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationCreate") @@ -172,16 +172,16 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ } type ApiDelegationDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - id string + id string } func (r ApiDelegationDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ DelegationDelete Moves the Delegation object to Recyclebin. Use this method to move a Delegation object to Recyclebin. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ func (a *DelegationAPIService) DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest { return ApiDelegationDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *DelegationAPIService) DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationDelete") @@ -331,49 +331,49 @@ func (a *DelegationAPIService) DelegationDeleteExecute(r ApiDelegationDeleteRequ } type ApiDelegationListRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDelegationListRequest) Fields(fields string) ApiDelegationListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDelegationListRequest) Filter(filter string) ApiDelegationListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDelegationListRequest) Offset(offset int32) ApiDelegationListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDelegationListRequest) Limit(limit int32) ApiDelegationListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDelegationListRequest) PageToken(pageToken string) ApiDelegationListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDelegationListRequest) OrderBy(orderBy string) ApiDelegationListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ DelegationList List Delegation objects. Use this method to list Delegation objects. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ func (a *DelegationAPIService) DelegationList(ctx context.Context) ApiDelegationListRequest { return ApiDelegationListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListDelegationResponse +// +// @return ConfigListDelegationResponse func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListDelegationResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationList") @@ -518,13 +519,13 @@ func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) } type ApiDelegationReadRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDelegationReadRequest) Fields(fields string) ApiDelegationReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ DelegationRead Read the Delegation object. Use this method to read a Delegation object. This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ func (a *DelegationAPIService) DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest { return ApiDelegationReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadDelegationResponse +// +// @return ConfigReadDelegationResponse func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadDelegationResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationRead") @@ -639,10 +641,10 @@ func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) } type ApiDelegationUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService DelegationAPI - id string - body *ConfigDelegation + id string + body *ConfigDelegation } func (r ApiDelegationUpdateRequest) Body(body ConfigDelegation) ApiDelegationUpdateRequest { @@ -660,26 +662,27 @@ DelegationUpdate Update the Delegation object. Use this method to update a Delegation object. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ func (a *DelegationAPIService) DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest { return ApiDelegationUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateDelegationResponse +// +// @return ConfigUpdateDelegationResponse func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequest) (*ConfigUpdateDelegationResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateDelegationResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateDelegationResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DelegationAPIService.DelegationUpdate") @@ -714,16 +717,16 @@ func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_forward_nsg.go b/dns_config/api_forward_nsg.go index 7fa7bbe..8d33d4b 100644 --- a/dns_config/api_forward_nsg.go +++ b/dns_config/api_forward_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ForwardNsgAPI interface { /* - ForwardNsgCreate Create the ForwardNSG object. + ForwardNsgCreate Create the ForwardNSG object. - Use this method to create a ForwardNSG object. -The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to create a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest @@ -38,27 +37,27 @@ The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward z // @return ConfigCreateForwardNSGResponse ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) /* - ForwardNsgDelete Move the ForwardNSG object to Recyclebin. + ForwardNsgDelete Move the ForwardNSG object to Recyclebin. - Use this method to move a ForwardNSG object to Recyclebin. -The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to move a ForwardNSG object to Recyclebin. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest // ForwardNsgDeleteExecute executes the request ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) /* - ForwardNsgList List ForwardNSG objects. + ForwardNsgList List ForwardNSG objects. - Use this method to list ForwardNSG objects. -The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to list ForwardNSG objects. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest @@ -66,14 +65,14 @@ The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward z // @return ConfigListForwardNSGResponse ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) /* - ForwardNsgRead Read the ForwardNSG object. + ForwardNsgRead Read the ForwardNSG object. - Use this method to read a ForwardNSG object. -The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to read a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest @@ -81,14 +80,14 @@ The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward z // @return ConfigReadForwardNSGResponse ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) /* - ForwardNsgUpdate Update the ForwardNSG object. + ForwardNsgUpdate Update the ForwardNSG object. - Use this method to update a ForwardNSG object. -The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to update a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest @@ -101,9 +100,9 @@ The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward z type ForwardNsgAPIService internal.Service type ApiForwardNsgCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - body *ConfigForwardNSG + body *ConfigForwardNSG } func (r ApiForwardNsgCreateRequest) Body(body ConfigForwardNSG) ApiForwardNsgCreateRequest { @@ -121,24 +120,25 @@ ForwardNsgCreate Create the ForwardNSG object. Use this method to create a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ func (a *ForwardNsgAPIService) ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest { return ApiForwardNsgCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateForwardNSGResponse +// +// @return ConfigCreateForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateForwardNSGResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgCreate") @@ -172,16 +172,16 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ } type ApiForwardNsgDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - id string + id string } func (r ApiForwardNsgDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ ForwardNsgDelete Move the ForwardNSG object to Recyclebin. Use this method to move a ForwardNSG object to Recyclebin. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ func (a *ForwardNsgAPIService) ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest { return ApiForwardNsgDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ForwardNsgAPIService) ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgDelete") @@ -331,49 +331,49 @@ func (a *ForwardNsgAPIService) ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequ } type ApiForwardNsgListRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardNsgListRequest) Fields(fields string) ApiForwardNsgListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiForwardNsgListRequest) Filter(filter string) ApiForwardNsgListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiForwardNsgListRequest) Offset(offset int32) ApiForwardNsgListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiForwardNsgListRequest) Limit(limit int32) ApiForwardNsgListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiForwardNsgListRequest) PageToken(pageToken string) ApiForwardNsgListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiForwardNsgListRequest) OrderBy(orderBy string) ApiForwardNsgListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ ForwardNsgList List ForwardNSG objects. Use this method to list ForwardNSG objects. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ func (a *ForwardNsgAPIService) ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest { return ApiForwardNsgListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListForwardNSGResponse +// +// @return ConfigListForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListForwardNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgList") @@ -518,13 +519,13 @@ func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) } type ApiForwardNsgReadRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardNsgReadRequest) Fields(fields string) ApiForwardNsgReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ ForwardNsgRead Read the ForwardNSG object. Use this method to read a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ func (a *ForwardNsgAPIService) ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest { return ApiForwardNsgReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadForwardNSGResponse +// +// @return ConfigReadForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadForwardNSGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgRead") @@ -639,10 +641,10 @@ func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) } type ApiForwardNsgUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardNsgAPI - id string - body *ConfigForwardNSG + id string + body *ConfigForwardNSG } func (r ApiForwardNsgUpdateRequest) Body(body ConfigForwardNSG) ApiForwardNsgUpdateRequest { @@ -660,26 +662,27 @@ ForwardNsgUpdate Update the ForwardNSG object. Use this method to update a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ func (a *ForwardNsgAPIService) ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest { return ApiForwardNsgUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateForwardNSGResponse +// +// @return ConfigUpdateForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequest) (*ConfigUpdateForwardNSGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateForwardNSGResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateForwardNSGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardNsgAPIService.ForwardNsgUpdate") @@ -714,16 +717,16 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_forward_zone.go b/dns_config/api_forward_zone.go index ba142f5..762417b 100644 --- a/dns_config/api_forward_zone.go +++ b/dns_config/api_forward_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ForwardZoneAPI interface { /* - ForwardZoneCopy Copies the __ForwardZone__ object. + ForwardZoneCopy Copies the __ForwardZone__ object. - Use this method to copy an __ForwardZone__ object to a different __View__. -This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to copy an __ForwardZone__ object to a different __View__. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest @@ -38,13 +37,13 @@ This object (_dns/forward_zone_) represents a forwarding zone. // @return ConfigCopyForwardZoneResponse ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) /* - ForwardZoneCreate Create the ForwardZone object. + ForwardZoneCreate Create the ForwardZone object. - Use this method to create a ForwardZone object. -This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to create a ForwardZone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest @@ -52,27 +51,27 @@ This object (_dns/forward_zone_) represents a forwarding zone. // @return ConfigCreateForwardZoneResponse ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) /* - ForwardZoneDelete Move the Forward Zone object to Recyclebin. + ForwardZoneDelete Move the Forward Zone object to Recyclebin. - Use this method to move a Forward Zone object to Recyclebin. -This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to move a Forward Zone object to Recyclebin. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest // ForwardZoneDeleteExecute executes the request ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) /* - ForwardZoneList List Forward Zone objects. + ForwardZoneList List Forward Zone objects. - Use this method to list Forward Zone objects. -This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to list Forward Zone objects. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest @@ -80,14 +79,14 @@ This object (_dns/forward_zone_) represents a forwarding zone. // @return ConfigListForwardZoneResponse ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) /* - ForwardZoneRead Read the Forward Zone object. + ForwardZoneRead Read the Forward Zone object. - Use this method to read a Forward Zone object. -This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to read a Forward Zone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest @@ -95,14 +94,14 @@ This object (_dns/forward_zone_) represents a forwarding zone. // @return ConfigReadForwardZoneResponse ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) /* - ForwardZoneUpdate Update the Forward Zone object. + ForwardZoneUpdate Update the Forward Zone object. - Use this method to update a Forward Zone object. -This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to update a Forward Zone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest @@ -115,9 +114,9 @@ This object (_dns/forward_zone_) represents a forwarding zone. type ForwardZoneAPIService internal.Service type ApiForwardZoneCopyRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - body *ConfigCopyForwardZone + body *ConfigCopyForwardZone } func (r ApiForwardZoneCopyRequest) Body(body ConfigCopyForwardZone) ApiForwardZoneCopyRequest { @@ -135,24 +134,25 @@ ForwardZoneCopy Copies the __ForwardZone__ object. Use this method to copy an __ForwardZone__ object to a different __View__. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ func (a *ForwardZoneAPIService) ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest { return ApiForwardZoneCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCopyForwardZoneResponse +// +// @return ConfigCopyForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCopyForwardZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCopyForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneCopy") @@ -186,8 +186,8 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -233,9 +233,9 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque } type ApiForwardZoneCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - body *ConfigForwardZone + body *ConfigForwardZone } func (r ApiForwardZoneCreateRequest) Body(body ConfigForwardZone) ApiForwardZoneCreateRequest { @@ -253,24 +253,25 @@ ForwardZoneCreate Create the ForwardZone object. Use this method to create a ForwardZone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ func (a *ForwardZoneAPIService) ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest { return ApiForwardZoneCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateForwardZoneResponse +// +// @return ConfigCreateForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateForwardZoneResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneCreate") @@ -304,16 +305,16 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -359,9 +360,9 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR } type ApiForwardZoneDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - id string + id string } func (r ApiForwardZoneDeleteRequest) Execute() (*http.Response, error) { @@ -374,24 +375,24 @@ ForwardZoneDelete Move the Forward Zone object to Recyclebin. Use this method to move a Forward Zone object to Recyclebin. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ func (a *ForwardZoneAPIService) ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest { return ApiForwardZoneDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ForwardZoneAPIService) ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneDelete") @@ -463,49 +464,49 @@ func (a *ForwardZoneAPIService) ForwardZoneDeleteExecute(r ApiForwardZoneDeleteR } type ApiForwardZoneListRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardZoneListRequest) Fields(fields string) ApiForwardZoneListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiForwardZoneListRequest) Filter(filter string) ApiForwardZoneListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiForwardZoneListRequest) Offset(offset int32) ApiForwardZoneListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiForwardZoneListRequest) Limit(limit int32) ApiForwardZoneListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiForwardZoneListRequest) PageToken(pageToken string) ApiForwardZoneListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiForwardZoneListRequest) OrderBy(orderBy string) ApiForwardZoneListRequest { r.orderBy = &orderBy return r @@ -533,24 +534,25 @@ ForwardZoneList List Forward Zone objects. Use this method to list Forward Zone objects. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ func (a *ForwardZoneAPIService) ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest { return ApiForwardZoneListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListForwardZoneResponse +// +// @return ConfigListForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListForwardZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneList") @@ -650,13 +652,13 @@ func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListReque } type ApiForwardZoneReadRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardZoneReadRequest) Fields(fields string) ApiForwardZoneReadRequest { r.fields = &fields return r @@ -672,26 +674,27 @@ ForwardZoneRead Read the Forward Zone object. Use this method to read a Forward Zone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ func (a *ForwardZoneAPIService) ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest { return ApiForwardZoneReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadForwardZoneResponse +// +// @return ConfigReadForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadForwardZoneResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneRead") @@ -771,10 +774,10 @@ func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadReque } type ApiForwardZoneUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ForwardZoneAPI - id string - body *ConfigForwardZone + id string + body *ConfigForwardZone } func (r ApiForwardZoneUpdateRequest) Body(body ConfigForwardZone) ApiForwardZoneUpdateRequest { @@ -792,26 +795,27 @@ ForwardZoneUpdate Update the Forward Zone object. Use this method to update a Forward Zone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ func (a *ForwardZoneAPIService) ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest { return ApiForwardZoneUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateForwardZoneResponse +// +// @return ConfigUpdateForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateRequest) (*ConfigUpdateForwardZoneResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateForwardZoneResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateForwardZoneResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ForwardZoneAPIService.ForwardZoneUpdate") @@ -846,16 +850,16 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_global.go b/dns_config/api_global.go index d9dcd14..736b322 100644 --- a/dns_config/api_global.go +++ b/dns_config/api_global.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type GlobalAPI interface { /* - GlobalRead Read the Global configuration object. + GlobalRead Read the Global configuration object. - Use this method to read the Global configuration object. -Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest @@ -38,14 +37,14 @@ Service operates on Global singleton object that represents parent configuration // @return ConfigReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) /* - GlobalRead2 Read the Global configuration object. + GlobalRead2 Read the Global configuration object. - Use this method to read the Global configuration object. -Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request @@ -53,13 +52,13 @@ Service operates on Global singleton object that represents parent configuration // @return ConfigReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) /* - GlobalUpdate Update the Global configuration object. + GlobalUpdate Update the Global configuration object. - Use this method to update the Global configuration object. -Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest @@ -67,14 +66,14 @@ Service operates on Global singleton object that represents parent configuration // @return ConfigUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) /* - GlobalUpdate2 Update the Global configuration object. + GlobalUpdate2 Update the Global configuration object. - Use this method to update the Global configuration object. -Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request @@ -87,12 +86,12 @@ Service operates on Global singleton object that represents parent configuration type GlobalAPIService internal.Service type ApiGlobalReadRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - fields *string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalReadRequest) Fields(fields string) ApiGlobalReadRequest { r.fields = &fields return r @@ -108,24 +107,25 @@ GlobalRead Read the Global configuration object. Use this method to read the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest { return ApiGlobalReadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigReadGlobalResponse +// +// @return ConfigReadGlobalResponse func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead") @@ -204,13 +204,13 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigRea } type ApiGlobalRead2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalRead2Request) Fields(fields string) ApiGlobalRead2Request { r.fields = &fields return r @@ -226,26 +226,27 @@ GlobalRead2 Read the Global configuration object. Use this method to read the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request { return ApiGlobalRead2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadGlobalResponse +// +// @return ConfigReadGlobalResponse func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead2") @@ -325,9 +326,9 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigR } type ApiGlobalUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - body *ConfigGlobal + body *ConfigGlobal } func (r ApiGlobalUpdateRequest) Body(body ConfigGlobal) ApiGlobalUpdateRequest { @@ -345,24 +346,25 @@ GlobalUpdate Update the Global configuration object. Use this method to update the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest { return ApiGlobalUpdateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigUpdateGlobalResponse +// +// @return ConfigUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate") @@ -396,8 +398,8 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -443,10 +445,10 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi } type ApiGlobalUpdate2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - body *ConfigGlobal + id string + body *ConfigGlobal } func (r ApiGlobalUpdate2Request) Body(body ConfigGlobal) ApiGlobalUpdate2Request { @@ -464,26 +466,27 @@ GlobalUpdate2 Update the Global configuration object. Use this method to update the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request { return ApiGlobalUpdate2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateGlobalResponse +// +// @return ConfigUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*ConfigUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate2") @@ -518,8 +521,8 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Con if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_host.go b/dns_config/api_host.go index c458362..fbef892 100644 --- a/dns_config/api_host.go +++ b/dns_config/api_host.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type HostAPI interface { /* - HostList List DNS Host objects. + HostList List DNS Host objects. - Use this method to list DNS Host objects. -A DNS Host object associates DNS configuration with hosts. + Use this method to list DNS Host objects. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ HostList(ctx context.Context) ApiHostListRequest @@ -38,14 +37,14 @@ A DNS Host object associates DNS configuration with hosts. // @return ConfigListHostResponse HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) /* - HostRead Read the DNS Host object. + HostRead Read the DNS Host object. - Use this method to read a DNS Host object. -A DNS Host object associates DNS configuration with hosts. + Use this method to read a DNS Host object. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ HostRead(ctx context.Context, id string) ApiHostReadRequest @@ -53,14 +52,14 @@ A DNS Host object associates DNS configuration with hosts. // @return ConfigReadHostResponse HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) /* - HostUpdate Update the DNS Host object. + HostUpdate Update the DNS Host object. - Use this method to update a DNS Host object. -A DNS Host object associates DNS configuration with hosts. + Use this method to update a DNS Host object. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest @@ -73,50 +72,50 @@ A DNS Host object associates DNS configuration with hosts. type HostAPIService internal.Service type ApiHostListRequest struct { - ctx context.Context + ctx context.Context ApiService HostAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostListRequest) Fields(fields string) ApiHostListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHostListRequest) Filter(filter string) ApiHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHostListRequest) Offset(offset int32) ApiHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHostListRequest) Limit(limit int32) ApiHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHostListRequest) PageToken(pageToken string) ApiHostListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHostListRequest) OrderBy(orderBy string) ApiHostListRequest { r.orderBy = &orderBy return r @@ -150,24 +149,25 @@ HostList List DNS Host objects. Use this method to list DNS Host objects. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ func (a *HostAPIService) HostList(ctx context.Context) ApiHostListRequest { return ApiHostListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListHostResponse +// +// @return ConfigListHostResponse func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostAPIService.HostList") @@ -270,14 +270,14 @@ func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostR } type ApiHostReadRequest struct { - ctx context.Context + ctx context.Context ApiService HostAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostReadRequest) Fields(fields string) ApiHostReadRequest { r.fields = &fields return r @@ -299,26 +299,27 @@ HostRead Read the DNS Host object. Use this method to read a DNS Host object. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ func (a *HostAPIService) HostRead(ctx context.Context, id string) ApiHostReadRequest { return ApiHostReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadHostResponse +// +// @return ConfigReadHostResponse func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostAPIService.HostRead") @@ -401,11 +402,11 @@ func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostR } type ApiHostUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HostAPI - id string - body *ConfigHost - inherit *string + id string + body *ConfigHost + inherit *string } func (r ApiHostUpdateRequest) Body(body ConfigHost) ApiHostUpdateRequest { @@ -429,26 +430,27 @@ HostUpdate Update the DNS Host object. Use this method to update a DNS Host object. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ func (a *HostAPIService) HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest { return ApiHostUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateHostResponse +// +// @return ConfigUpdateHostResponse func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateHostResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostAPIService.HostUpdate") @@ -486,16 +488,16 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_lbdn.go b/dns_config/api_lbdn.go index 56ff81a..33c2318 100644 --- a/dns_config/api_lbdn.go +++ b/dns_config/api_lbdn.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,17 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type LbdnAPI interface { /* - LbdnCreate Create the __LBDN__ object. + LbdnCreate Create the __LBDN__ object. - Use this method to create a __LBDN__ object. + Use this method to create a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnCreateRequest */ LbdnCreate(ctx context.Context) ApiLbdnCreateRequest @@ -37,25 +36,25 @@ type LbdnAPI interface { // @return ConfigCreateLBDNResponse LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) /* - LbdnDelete Delete the __LBDN__ object. + LbdnDelete Delete the __LBDN__ object. - Use this method to delete a __LBDN__ object. + Use this method to delete a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnDeleteRequest */ LbdnDelete(ctx context.Context, id string) ApiLbdnDeleteRequest // LbdnDeleteExecute executes the request LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Response, error) /* - LbdnList List __LBDN__ objects. + LbdnList List __LBDN__ objects. - Use this method to list __LBDN__ objects. + Use this method to list __LBDN__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnListRequest */ LbdnList(ctx context.Context) ApiLbdnListRequest @@ -63,13 +62,13 @@ type LbdnAPI interface { // @return ConfigListLBDNResponse LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) /* - LbdnRead Read the __LBDN__ object. + LbdnRead Read the __LBDN__ object. - Use this method to read a __LBDN__ object. + Use this method to read a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnReadRequest */ LbdnRead(ctx context.Context, id string) ApiLbdnReadRequest @@ -77,13 +76,13 @@ type LbdnAPI interface { // @return ConfigReadLBDNResponse LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) /* - LbdnUpdate Update the __LBDN__ object. + LbdnUpdate Update the __LBDN__ object. - Use this method to update a __LBDN__ object. + Use this method to update a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnUpdateRequest */ LbdnUpdate(ctx context.Context, id string) ApiLbdnUpdateRequest @@ -96,9 +95,9 @@ type LbdnAPI interface { type LbdnAPIService internal.Service type ApiLbdnCreateRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - body *ConfigLBDN + body *ConfigLBDN } func (r ApiLbdnCreateRequest) Body(body ConfigLBDN) ApiLbdnCreateRequest { @@ -115,24 +114,25 @@ LbdnCreate Create the __LBDN__ object. Use this method to create a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnCreateRequest */ func (a *LbdnAPIService) LbdnCreate(ctx context.Context) ApiLbdnCreateRequest { return ApiLbdnCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateLBDNResponse +// +// @return ConfigCreateLBDNResponse func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateLBDNResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnCreate") @@ -166,16 +166,16 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -221,9 +221,9 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat } type ApiLbdnDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - id string + id string } func (r ApiLbdnDeleteRequest) Execute() (*http.Response, error) { @@ -235,24 +235,24 @@ LbdnDelete Delete the __LBDN__ object. Use this method to delete a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnDeleteRequest */ func (a *LbdnAPIService) LbdnDelete(ctx context.Context, id string) ApiLbdnDeleteRequest { return ApiLbdnDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *LbdnAPIService) LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnDelete") @@ -324,49 +324,49 @@ func (a *LbdnAPIService) LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Respon } type ApiLbdnListRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiLbdnListRequest) Fields(fields string) ApiLbdnListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiLbdnListRequest) Filter(filter string) ApiLbdnListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiLbdnListRequest) Offset(offset int32) ApiLbdnListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiLbdnListRequest) Limit(limit int32) ApiLbdnListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiLbdnListRequest) PageToken(pageToken string) ApiLbdnListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiLbdnListRequest) OrderBy(orderBy string) ApiLbdnListRequest { r.orderBy = &orderBy return r @@ -393,24 +393,25 @@ LbdnList List __LBDN__ objects. Use this method to list __LBDN__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnListRequest */ func (a *LbdnAPIService) LbdnList(ctx context.Context) ApiLbdnListRequest { return ApiLbdnListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListLBDNResponse +// +// @return ConfigListLBDNResponse func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListLBDNResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnList") @@ -510,13 +511,13 @@ func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNR } type ApiLbdnReadRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiLbdnReadRequest) Fields(fields string) ApiLbdnReadRequest { r.fields = &fields return r @@ -531,26 +532,27 @@ LbdnRead Read the __LBDN__ object. Use this method to read a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnReadRequest */ func (a *LbdnAPIService) LbdnRead(ctx context.Context, id string) ApiLbdnReadRequest { return ApiLbdnReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadLBDNResponse +// +// @return ConfigReadLBDNResponse func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadLBDNResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnRead") @@ -630,10 +632,10 @@ func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNR } type ApiLbdnUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService LbdnAPI - id string - body *ConfigLBDN + id string + body *ConfigLBDN } func (r ApiLbdnUpdateRequest) Body(body ConfigLBDN) ApiLbdnUpdateRequest { @@ -650,26 +652,27 @@ LbdnUpdate Update the __LBDN__ object. Use this method to update a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnUpdateRequest */ func (a *LbdnAPIService) LbdnUpdate(ctx context.Context, id string) ApiLbdnUpdateRequest { return ApiLbdnUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateLBDNResponse +// +// @return ConfigUpdateLBDNResponse func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdateLBDNResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateLBDNResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateLBDNResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LbdnAPIService.LbdnUpdate") @@ -704,16 +707,16 @@ func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_server.go b/dns_config/api_server.go index 10af03f..f759fa5 100644 --- a/dns_config/api_server.go +++ b/dns_config/api_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ServerAPI interface { /* - ServerCreate Create the Server object. + ServerCreate Create the Server object. - Use this method to create a Server object. -A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest @@ -38,27 +37,27 @@ A DNS Config Profile is a named configuration profile that can be shared for spe // @return ConfigCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) /* - ServerDelete Move the Server object to Recyclebin. + ServerDelete Move the Server object to Recyclebin. - Use this method to move a Server object to Recyclebin. -A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a Server object to Recyclebin. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) /* - ServerList List Server objects. + ServerList List Server objects. - Use this method to list Server objects. -A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to list Server objects. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest @@ -66,14 +65,14 @@ A DNS Config Profile is a named configuration profile that can be shared for spe // @return ConfigListServerResponse ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) /* - ServerRead Read the Server object. + ServerRead Read the Server object. - Use this method to read a Server object. -A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to read a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest @@ -81,14 +80,14 @@ A DNS Config Profile is a named configuration profile that can be shared for spe // @return ConfigReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) /* - ServerUpdate Update the Server object. + ServerUpdate Update the Server object. - Use this method to update a Server object. -A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest @@ -101,10 +100,10 @@ A DNS Config Profile is a named configuration profile that can be shared for spe type ServerAPIService internal.Service type ApiServerCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - body *ConfigServer - inherit *string + body *ConfigServer + inherit *string } func (r ApiServerCreateRequest) Body(body ConfigServer) ApiServerCreateRequest { @@ -128,24 +127,25 @@ ServerCreate Create the Server object. Use this method to create a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequest { return ApiServerCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateServerResponse +// +// @return ConfigCreateServerResponse func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateServerResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerCreate") @@ -182,16 +182,16 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -237,9 +237,9 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi } type ApiServerDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string + id string } func (r ApiServerDeleteRequest) Execute() (*http.Response, error) { @@ -252,24 +252,24 @@ ServerDelete Move the Server object to Recyclebin. Use this method to move a Server object to Recyclebin. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ func (a *ServerAPIService) ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest { return ApiServerDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerDelete") @@ -341,50 +341,50 @@ func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http. } type ApiServerListRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerListRequest) Fields(fields string) ApiServerListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServerListRequest) Filter(filter string) ApiServerListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServerListRequest) Offset(offset int32) ApiServerListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServerListRequest) Limit(limit int32) ApiServerListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServerListRequest) PageToken(pageToken string) ApiServerListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServerListRequest) OrderBy(orderBy string) ApiServerListRequest { r.orderBy = &orderBy return r @@ -418,24 +418,25 @@ ServerList List Server objects. Use this method to list Server objects. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest { return ApiServerListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListServerResponse +// +// @return ConfigListServerResponse func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerList") @@ -538,14 +539,14 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigLis } type ApiServerReadRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerReadRequest) Fields(fields string) ApiServerReadRequest { r.fields = &fields return r @@ -567,26 +568,27 @@ ServerRead Read the Server object. Use this method to read a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerReadRequest { return ApiServerReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadServerResponse +// +// @return ConfigReadServerResponse func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerRead") @@ -669,11 +671,11 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigRea } type ApiServerUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - body *ConfigServer - inherit *string + id string + body *ConfigServer + inherit *string } func (r ApiServerUpdateRequest) Body(body ConfigServer) ApiServerUpdateRequest { @@ -697,26 +699,27 @@ ServerUpdate Update the Server object. Use this method to update a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest { return ApiServerUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateServerResponse +// +// @return ConfigUpdateServerResponse func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*ConfigUpdateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateServerResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerUpdate") @@ -754,16 +757,16 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/api_view.go b/dns_config/api_view.go index c501003..5bd8d32 100644 --- a/dns_config/api_view.go +++ b/dns_config/api_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,20 +18,19 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ViewAPI interface { /* - ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. + ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. - Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. -The __AuthZone__ object represents an authoritative zone. -The __ForwardZone__ object represents a forwarding zone. + Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. + The __AuthZone__ object represents an authoritative zone. + The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest @@ -39,13 +38,13 @@ The __ForwardZone__ object represents a forwarding zone. // @return ConfigBulkCopyResponse ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) /* - ViewCreate Create the View object. + ViewCreate Create the View object. - Use this method to create a View object. -Named collection of DNS View settings. + Use this method to create a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ ViewCreate(ctx context.Context) ApiViewCreateRequest @@ -53,27 +52,27 @@ Named collection of DNS View settings. // @return ConfigCreateViewResponse ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) /* - ViewDelete Move the View object to Recyclebin. + ViewDelete Move the View object to Recyclebin. - Use this method to move a View object to Recyclebin. -Named collection of DNS View settings. + Use this method to move a View object to Recyclebin. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest // ViewDeleteExecute executes the request ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) /* - ViewList List View objects. + ViewList List View objects. - Use this method to list View objects. -Named collection of DNS View settings. + Use this method to list View objects. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ ViewList(ctx context.Context) ApiViewListRequest @@ -81,14 +80,14 @@ Named collection of DNS View settings. // @return ConfigListViewResponse ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) /* - ViewRead Read the View object. + ViewRead Read the View object. - Use this method to read a View object. -Named collection of DNS View settings. + Use this method to read a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ ViewRead(ctx context.Context, id string) ApiViewReadRequest @@ -96,14 +95,14 @@ Named collection of DNS View settings. // @return ConfigReadViewResponse ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) /* - ViewUpdate Update the View object. + ViewUpdate Update the View object. - Use this method to update a View object. -Named collection of DNS View settings. + Use this method to update a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest @@ -116,9 +115,9 @@ Named collection of DNS View settings. type ViewAPIService internal.Service type ApiViewBulkCopyRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - body *ConfigBulkCopyView + body *ConfigBulkCopyView } func (r ApiViewBulkCopyRequest) Body(body ConfigBulkCopyView) ApiViewBulkCopyRequest { @@ -137,24 +136,25 @@ Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one _ The __AuthZone__ object represents an authoritative zone. The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ func (a *ViewAPIService) ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest { return ApiViewBulkCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigBulkCopyResponse +// +// @return ConfigBulkCopyResponse func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigBulkCopyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigBulkCopyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewBulkCopy") @@ -188,8 +188,8 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -235,10 +235,10 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB } type ApiViewCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - body *ConfigView - inherit *string + body *ConfigView + inherit *string } func (r ApiViewCreateRequest) Body(body ConfigView) ApiViewCreateRequest { @@ -262,24 +262,25 @@ ViewCreate Create the View object. Use this method to create a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ func (a *ViewAPIService) ViewCreate(ctx context.Context) ApiViewCreateRequest { return ApiViewCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigCreateViewResponse +// +// @return ConfigCreateViewResponse func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigCreateViewResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigCreateViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewCreate") @@ -316,16 +317,16 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -371,9 +372,9 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat } type ApiViewDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - id string + id string } func (r ApiViewDeleteRequest) Execute() (*http.Response, error) { @@ -386,24 +387,24 @@ ViewDelete Move the View object to Recyclebin. Use this method to move a View object to Recyclebin. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ func (a *ViewAPIService) ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest { return ApiViewDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ViewAPIService) ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewDelete") @@ -475,50 +476,50 @@ func (a *ViewAPIService) ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Respon } type ApiViewListRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiViewListRequest) Fields(fields string) ApiViewListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiViewListRequest) Filter(filter string) ApiViewListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiViewListRequest) Offset(offset int32) ApiViewListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiViewListRequest) Limit(limit int32) ApiViewListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiViewListRequest) PageToken(pageToken string) ApiViewListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiViewListRequest) OrderBy(orderBy string) ApiViewListRequest { r.orderBy = &orderBy return r @@ -552,24 +553,25 @@ ViewList List View objects. Use this method to list View objects. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ func (a *ViewAPIService) ViewList(ctx context.Context) ApiViewListRequest { return ApiViewListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ConfigListViewResponse +// +// @return ConfigListViewResponse func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigListViewResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigListViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewList") @@ -672,14 +674,14 @@ func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewR } type ApiViewReadRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiViewReadRequest) Fields(fields string) ApiViewReadRequest { r.fields = &fields return r @@ -701,26 +703,27 @@ ViewRead Read the View object. Use this method to read a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ func (a *ViewAPIService) ViewRead(ctx context.Context, id string) ApiViewReadRequest { return ApiViewReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigReadViewResponse +// +// @return ConfigReadViewResponse func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigReadViewResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigReadViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewRead") @@ -803,11 +806,11 @@ func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewR } type ApiViewUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ViewAPI - id string - body *ConfigView - inherit *string + id string + body *ConfigView + inherit *string } func (r ApiViewUpdateRequest) Body(body ConfigView) ApiViewUpdateRequest { @@ -831,26 +834,27 @@ ViewUpdate Update the View object. Use this method to update a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ func (a *ViewAPIService) ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest { return ApiViewUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return ConfigUpdateViewResponse +// +// @return ConfigUpdateViewResponse func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdateViewResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *ConfigUpdateViewResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *ConfigUpdateViewResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ViewAPIService.ViewUpdate") @@ -888,16 +892,16 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_config/client.go b/dns_config/client.go index 2df6699..95b6d87 100644 --- a/dns_config/client.go +++ b/dns_config/client.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package dns_config import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,30 +19,30 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DNS Configuration API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - AclAPI AclAPI - AuthNsgAPI AuthNsgAPI - AuthZoneAPI AuthZoneAPI - CacheFlushAPI CacheFlushAPI + AclAPI AclAPI + AuthNsgAPI AuthNsgAPI + AuthZoneAPI AuthZoneAPI + CacheFlushAPI CacheFlushAPI ConvertDomainNameAPI ConvertDomainNameAPI - ConvertRnameAPI ConvertRnameAPI - DelegationAPI DelegationAPI - ForwardNsgAPI ForwardNsgAPI - ForwardZoneAPI ForwardZoneAPI - GlobalAPI GlobalAPI - HostAPI HostAPI - LbdnAPI LbdnAPI - ServerAPI ServerAPI - ViewAPI ViewAPI + ConvertRnameAPI ConvertRnameAPI + DelegationAPI DelegationAPI + ForwardNsgAPI ForwardNsgAPI + ForwardZoneAPI ForwardZoneAPI + GlobalAPI GlobalAPI + HostAPI HostAPI + LbdnAPI LbdnAPI + ServerAPI ServerAPI + ViewAPI ViewAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.AclAPI = (*AclAPIService)(&c.Common) diff --git a/dns_config/model_auth_zone_external_provider.go b/dns_config/model_auth_zone_external_provider.go index 6c4d4de..1ba81d5 100644 --- a/dns_config/model_auth_zone_external_provider.go +++ b/dns_config/model_auth_zone_external_provider.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *AuthZoneExternalProvider) SetType(v string) { } func (o AuthZoneExternalProvider) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableAuthZoneExternalProvider) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_acl.go b/dns_config/model_config_acl.go index 4b072bb..fd163a8 100644 --- a/dns_config/model_config_acl.go +++ b/dns_config/model_config_acl.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -206,7 +206,7 @@ func (o *ConfigACL) SetTags(v map[string]interface{}) { } func (o ConfigACL) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -244,10 +244,10 @@ func (o *ConfigACL) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -303,5 +303,3 @@ func (v *NullableConfigACL) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_acl_item.go b/dns_config/model_config_acl_item.go index c562e89..7270502 100644 --- a/dns_config/model_config_acl_item.go +++ b/dns_config/model_config_acl_item.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -28,7 +28,7 @@ type ConfigACLItem struct { // Optional. Data for _ip_ _element_. Must be empty if _element_ is not _ip_. Address *string `json:"address,omitempty"` // Type of element. Allowed values: * _any_, * _ip_, * _acl_, * _tsig_key_. - Element string `json:"element"` + Element string `json:"element"` TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` } @@ -198,7 +198,7 @@ func (o *ConfigACLItem) SetTsigKey(v ConfigTSIGKey) { } func (o ConfigACLItem) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -235,10 +235,10 @@ func (o *ConfigACLItem) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -294,5 +294,3 @@ func (v *NullableConfigACLItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_auth_nsg.go b/dns_config/model_config_auth_nsg.go index 2fddf64..4ee3bdd 100644 --- a/dns_config/model_config_auth_nsg.go +++ b/dns_config/model_config_auth_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -308,7 +308,7 @@ func (o *ConfigAuthNSG) SetTags(v map[string]interface{}) { } func (o ConfigAuthNSG) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -355,10 +355,10 @@ func (o *ConfigAuthNSG) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -414,5 +414,3 @@ func (v *NullableConfigAuthNSG) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_auth_zone.go b/dns_config/model_config_auth_zone.go index 49c197a..4aa8f3d 100644 --- a/dns_config/model_config_auth_zone.go +++ b/dns_config/model_config_auth_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -40,7 +40,7 @@ type ConfigAuthZone struct { Id *string `json:"id,omitempty"` // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []Inheritance2AssignedHost `json:"inheritance_assigned_hosts,omitempty"` - InheritanceSources *ConfigAuthZoneInheritance `json:"inheritance_sources,omitempty"` + InheritanceSources *ConfigAuthZoneInheritance `json:"inheritance_sources,omitempty"` // On-create-only. SOA serial is allowed to be set when the authoritative zone is created. InitialSoaSerial *int64 `json:"initial_soa_serial,omitempty"` // Optional. BloxOne DDI hosts acting as internal secondaries. Order is not significant. @@ -74,7 +74,7 @@ type ConfigAuthZone struct { // The resource identifier. View *string `json:"view,omitempty"` // The list of an auth zone warnings. - Warnings []ConfigWarning `json:"warnings,omitempty"` + Warnings []ConfigWarning `json:"warnings,omitempty"` ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } @@ -1024,7 +1024,7 @@ func (o *ConfigAuthZone) SetZoneAuthority(v ConfigZoneAuthority) { } func (o ConfigAuthZone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1158,5 +1158,3 @@ func (v *NullableConfigAuthZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_auth_zone_config.go b/dns_config/model_config_auth_zone_config.go index 97ccf6e..59bcd04 100644 --- a/dns_config/model_config_auth_zone_config.go +++ b/dns_config/model_config_auth_zone_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigAuthZoneConfig) SetNsgs(v []string) { } func (o ConfigAuthZoneConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableConfigAuthZoneConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_auth_zone_inheritance.go b/dns_config/model_config_auth_zone_inheritance.go index 3c18d71..5154ca8 100644 --- a/dns_config/model_config_auth_zone_inheritance.go +++ b/dns_config/model_config_auth_zone_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,13 +19,13 @@ var _ MappedNullable = &ConfigAuthZoneInheritance{} // ConfigAuthZoneInheritance struct for ConfigAuthZoneInheritance type ConfigAuthZoneInheritance struct { - GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` - Notify *Inheritance2InheritedBool `json:"notify,omitempty"` - QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` - TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` - UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` - UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` - ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` + GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` + Notify *Inheritance2InheritedBool `json:"notify,omitempty"` + QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` + TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` + UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` + UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` + ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` } // NewConfigAuthZoneInheritance instantiates a new ConfigAuthZoneInheritance object @@ -270,7 +270,7 @@ func (o *ConfigAuthZoneInheritance) SetZoneAuthority(v ConfigInheritedZoneAuthor } func (o ConfigAuthZoneInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -338,5 +338,3 @@ func (v *NullableConfigAuthZoneInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_bulk_copy_error.go b/dns_config/model_config_bulk_copy_error.go index 4e34f5a..d33825f 100644 --- a/dns_config/model_config_bulk_copy_error.go +++ b/dns_config/model_config_bulk_copy_error.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigBulkCopyError) SetMessage(v string) { } func (o ConfigBulkCopyError) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableConfigBulkCopyError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_bulk_copy_response.go b/dns_config/model_config_bulk_copy_response.go index d7b6100..a0d1ee0 100644 --- a/dns_config/model_config_bulk_copy_response.go +++ b/dns_config/model_config_bulk_copy_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,8 +19,8 @@ var _ MappedNullable = &ConfigBulkCopyResponse{} // ConfigBulkCopyResponse struct for ConfigBulkCopyResponse type ConfigBulkCopyResponse struct { - Errors []ConfigBulkCopyError `json:"errors,omitempty"` - Results []ConfigCopyResponse `json:"results,omitempty"` + Errors []ConfigBulkCopyError `json:"errors,omitempty"` + Results []ConfigCopyResponse `json:"results,omitempty"` } // NewConfigBulkCopyResponse instantiates a new ConfigBulkCopyResponse object @@ -105,7 +105,7 @@ func (o *ConfigBulkCopyResponse) SetResults(v []ConfigCopyResponse) { } func (o ConfigBulkCopyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableConfigBulkCopyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_bulk_copy_view.go b/dns_config/model_config_bulk_copy_view.go index 214e688..f4a5d9c 100644 --- a/dns_config/model_config_bulk_copy_view.go +++ b/dns_config/model_config_bulk_copy_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -21,12 +21,12 @@ var _ MappedNullable = &ConfigBulkCopyView{} // ConfigBulkCopyView struct for ConfigBulkCopyView type ConfigBulkCopyView struct { - AuthZoneConfig *ConfigAuthZoneConfig `json:"auth_zone_config,omitempty"` + AuthZoneConfig *ConfigAuthZoneConfig `json:"auth_zone_config,omitempty"` ForwardZoneConfig *ConfigForwardZoneConfig `json:"forward_zone_config,omitempty"` // Indicates whether child objects should be copied or not. Defaults to _false_. Reserved for future use. Recursive *bool `json:"recursive,omitempty"` // The resource identifier. - Resources []string `json:"resources"` + Resources []string `json:"resources"` SecondaryZoneConfig *ConfigAuthZoneConfig `json:"secondary_zone_config,omitempty"` // Indicates whether copying should skip object in case of error and continue with next, or abort copying in case of error. Defaults to _false_. SkipOnError *bool `json:"skip_on_error,omitempty"` @@ -264,7 +264,7 @@ func (o *ConfigBulkCopyView) SetTarget(v string) { } func (o ConfigBulkCopyView) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -307,10 +307,10 @@ func (o *ConfigBulkCopyView) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -366,5 +366,3 @@ func (v *NullableConfigBulkCopyView) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_cache_flush.go b/dns_config/model_config_cache_flush.go index 3a4205a..7a2d37f 100644 --- a/dns_config/model_config_cache_flush.go +++ b/dns_config/model_config_cache_flush.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -243,7 +243,7 @@ func (o *ConfigCacheFlush) SetViewName(v string) { } func (o ConfigCacheFlush) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,5 +308,3 @@ func (v *NullableConfigCacheFlush) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_convert_domain_name.go b/dns_config/model_config_convert_domain_name.go index a3dda8c..567cc33 100644 --- a/dns_config/model_config_convert_domain_name.go +++ b/dns_config/model_config_convert_domain_name.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigConvertDomainName) SetPunycode(v string) { } func (o ConfigConvertDomainName) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableConfigConvertDomainName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_convert_domain_name_response.go b/dns_config/model_config_convert_domain_name_response.go index 586f5a1..57bdce8 100644 --- a/dns_config/model_config_convert_domain_name_response.go +++ b/dns_config/model_config_convert_domain_name_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigConvertDomainNameResponse) SetResult(v ConfigConvertDomainName) { } func (o ConfigConvertDomainNameResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigConvertDomainNameResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_convert_r_name_response.go b/dns_config/model_config_convert_r_name_response.go index 85f475a..8e81294 100644 --- a/dns_config/model_config_convert_r_name_response.go +++ b/dns_config/model_config_convert_r_name_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigConvertRNameResponse) SetRname(v string) { } func (o ConfigConvertRNameResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigConvertRNameResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_copy_auth_zone.go b/dns_config/model_config_copy_auth_zone.go index fcf99dc..a76e929 100644 --- a/dns_config/model_config_copy_auth_zone.go +++ b/dns_config/model_config_copy_auth_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -342,7 +342,7 @@ func (o *ConfigCopyAuthZone) SetTargetView(v string) { } func (o ConfigCopyAuthZone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -392,10 +392,10 @@ func (o *ConfigCopyAuthZone) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -451,5 +451,3 @@ func (v *NullableConfigCopyAuthZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_copy_auth_zone_response.go b/dns_config/model_config_copy_auth_zone_response.go index ac3dc47..12714b7 100644 --- a/dns_config/model_config_copy_auth_zone_response.go +++ b/dns_config/model_config_copy_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCopyAuthZoneResponse) SetResult(v ConfigCopyResponse) { } func (o ConfigCopyAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCopyAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_copy_forward_zone.go b/dns_config/model_config_copy_forward_zone.go index 866cdf1..7060b8f 100644 --- a/dns_config/model_config_copy_forward_zone.go +++ b/dns_config/model_config_copy_forward_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -342,7 +342,7 @@ func (o *ConfigCopyForwardZone) SetTargetView(v string) { } func (o ConfigCopyForwardZone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -392,10 +392,10 @@ func (o *ConfigCopyForwardZone) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -451,5 +451,3 @@ func (v *NullableConfigCopyForwardZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_copy_forward_zone_response.go b/dns_config/model_config_copy_forward_zone_response.go index 8269c0c..cda894f 100644 --- a/dns_config/model_config_copy_forward_zone_response.go +++ b/dns_config/model_config_copy_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCopyForwardZoneResponse) SetResult(v ConfigCopyResponse) { } func (o ConfigCopyForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCopyForwardZoneResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_copy_response.go b/dns_config/model_config_copy_response.go index 3685b51..97b19ba 100644 --- a/dns_config/model_config_copy_response.go +++ b/dns_config/model_config_copy_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigCopyResponse) SetJobId(v string) { } func (o ConfigCopyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableConfigCopyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_acl_response.go b/dns_config/model_config_create_acl_response.go index 42f4984..155a419 100644 --- a/dns_config/model_config_create_acl_response.go +++ b/dns_config/model_config_create_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateACLResponse) SetResult(v ConfigACL) { } func (o ConfigCreateACLResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_auth_nsg_response.go b/dns_config/model_config_create_auth_nsg_response.go index 8768a90..4e9a6ec 100644 --- a/dns_config/model_config_create_auth_nsg_response.go +++ b/dns_config/model_config_create_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateAuthNSGResponse) SetResult(v ConfigAuthNSG) { } func (o ConfigCreateAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_auth_zone_response.go b/dns_config/model_config_create_auth_zone_response.go index 988a9eb..21a2ec5 100644 --- a/dns_config/model_config_create_auth_zone_response.go +++ b/dns_config/model_config_create_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateAuthZoneResponse) SetResult(v ConfigAuthZone) { } func (o ConfigCreateAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_delegation_response.go b/dns_config/model_config_create_delegation_response.go index b6af249..a736bc6 100644 --- a/dns_config/model_config_create_delegation_response.go +++ b/dns_config/model_config_create_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateDelegationResponse) SetResult(v ConfigDelegation) { } func (o ConfigCreateDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateDelegationResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_forward_nsg_response.go b/dns_config/model_config_create_forward_nsg_response.go index fa0c6e5..79edea3 100644 --- a/dns_config/model_config_create_forward_nsg_response.go +++ b/dns_config/model_config_create_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateForwardNSGResponse) SetResult(v ConfigForwardNSG) { } func (o ConfigCreateForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateForwardNSGResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_forward_zone_response.go b/dns_config/model_config_create_forward_zone_response.go index 1aa6e9b..e6e9b71 100644 --- a/dns_config/model_config_create_forward_zone_response.go +++ b/dns_config/model_config_create_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateForwardZoneResponse) SetResult(v ConfigForwardZone) { } func (o ConfigCreateForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateForwardZoneResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_lbdn_response.go b/dns_config/model_config_create_lbdn_response.go index e90b528..8759109 100644 --- a/dns_config/model_config_create_lbdn_response.go +++ b/dns_config/model_config_create_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateLBDNResponse) SetResult(v ConfigLBDN) { } func (o ConfigCreateLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_server_response.go b/dns_config/model_config_create_server_response.go index 97c8949..c4e0082 100644 --- a/dns_config/model_config_create_server_response.go +++ b/dns_config/model_config_create_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateServerResponse) SetResult(v ConfigServer) { } func (o ConfigCreateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_create_view_response.go b/dns_config/model_config_create_view_response.go index 60de033..5b1f213 100644 --- a/dns_config/model_config_create_view_response.go +++ b/dns_config/model_config_create_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigCreateViewResponse) SetResult(v ConfigView) { } func (o ConfigCreateViewResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigCreateViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_custom_root_ns_block.go b/dns_config/model_config_custom_root_ns_block.go index 2ba30c8..73074a8 100644 --- a/dns_config/model_config_custom_root_ns_block.go +++ b/dns_config/model_config_custom_root_ns_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigCustomRootNSBlock) SetCustomRootNsEnabled(v bool) { } func (o ConfigCustomRootNSBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableConfigCustomRootNSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_delegation.go b/dns_config/model_config_delegation.go index 3f8983b..ce8b1a1 100644 --- a/dns_config/model_config_delegation.go +++ b/dns_config/model_config_delegation.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -345,7 +345,7 @@ func (o *ConfigDelegation) SetView(v string) { } func (o ConfigDelegation) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -419,5 +419,3 @@ func (v *NullableConfigDelegation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_delegation_server.go b/dns_config/model_config_delegation_server.go index d918682..84641ae 100644 --- a/dns_config/model_config_delegation_server.go +++ b/dns_config/model_config_delegation_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -138,7 +138,7 @@ func (o *ConfigDelegationServer) SetProtocolFqdn(v string) { } func (o ConfigDelegationServer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -170,10 +170,10 @@ func (o *ConfigDelegationServer) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -229,5 +229,3 @@ func (v *NullableConfigDelegationServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_display_view.go b/dns_config/model_config_display_view.go index 0f30047..5c189ee 100644 --- a/dns_config/model_config_display_view.go +++ b/dns_config/model_config_display_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigDisplayView) SetView(v string) { } func (o ConfigDisplayView) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableConfigDisplayView) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_dnssec_validation_block.go b/dns_config/model_config_dnssec_validation_block.go index 17b4d78..3447c2c 100644 --- a/dns_config/model_config_dnssec_validation_block.go +++ b/dns_config/model_config_dnssec_validation_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigDNSSECValidationBlock) SetDnssecValidateExpiry(v bool) { } func (o ConfigDNSSECValidationBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableConfigDNSSECValidationBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_dtc_config.go b/dns_config/model_config_dtc_config.go index a3e4f99..f116a1a 100644 --- a/dns_config/model_config_dtc_config.go +++ b/dns_config/model_config_dtc_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigDTCConfig) SetDefaultTtl(v int64) { } func (o ConfigDTCConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigDTCConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_dtc_policy.go b/dns_config/model_config_dtc_policy.go index 66ac85f..9956a2c 100644 --- a/dns_config/model_config_dtc_policy.go +++ b/dns_config/model_config_dtc_policy.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigDTCPolicy) SetPolicyId(v string) { } func (o ConfigDTCPolicy) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableConfigDTCPolicy) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_ecs_block.go b/dns_config/model_config_ecs_block.go index 7b42f20..00d06bd 100644 --- a/dns_config/model_config_ecs_block.go +++ b/dns_config/model_config_ecs_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -209,7 +209,7 @@ func (o *ConfigECSBlock) SetEcsZones(v []ConfigECSZone) { } func (o ConfigECSBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -271,5 +271,3 @@ func (v *NullableConfigECSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_ecs_zone.go b/dns_config/model_config_ecs_zone.go index f6d1243..f24d088 100644 --- a/dns_config/model_config_ecs_zone.go +++ b/dns_config/model_config_ecs_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -131,7 +131,7 @@ func (o *ConfigECSZone) SetProtocolFqdn(v string) { } func (o ConfigECSZone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -162,10 +162,10 @@ func (o *ConfigECSZone) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -221,5 +221,3 @@ func (v *NullableConfigECSZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_external_primary.go b/dns_config/model_config_external_primary.go index f1008f9..56da227 100644 --- a/dns_config/model_config_external_primary.go +++ b/dns_config/model_config_external_primary.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -30,8 +30,8 @@ type ConfigExternalPrimary struct { // FQDN of nameserver in punycode. ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` // Optional. If enabled, secondaries will use the configured TSIG key when requesting a zone transfer from this primary. - TsigEnabled *bool `json:"tsig_enabled,omitempty"` - TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` + TsigEnabled *bool `json:"tsig_enabled,omitempty"` + TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` // Allowed values: * _nsg_, * _primary_. Type string `json:"type"` } @@ -273,7 +273,7 @@ func (o *ConfigExternalPrimary) SetType(v string) { } func (o ConfigExternalPrimary) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -317,10 +317,10 @@ func (o *ConfigExternalPrimary) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -376,5 +376,3 @@ func (v *NullableConfigExternalPrimary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_external_secondary.go b/dns_config/model_config_external_secondary.go index 51a6b29..87468cd 100644 --- a/dns_config/model_config_external_secondary.go +++ b/dns_config/model_config_external_secondary.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -30,8 +30,8 @@ type ConfigExternalSecondary struct { // If enabled, the NS record and glue record will NOT be automatically generated according to secondaries nameserver assignment. Default: _false_ Stealth *bool `json:"stealth,omitempty"` // If enabled, secondaries will use the configured TSIG key when requesting a zone transfer. Default: _false_ - TsigEnabled *bool `json:"tsig_enabled,omitempty"` - TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` + TsigEnabled *bool `json:"tsig_enabled,omitempty"` + TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` } type _ConfigExternalSecondary ConfigExternalSecondary @@ -232,7 +232,7 @@ func (o *ConfigExternalSecondary) SetTsigKey(v ConfigTSIGKey) { } func (o ConfigExternalSecondary) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -272,10 +272,10 @@ func (o *ConfigExternalSecondary) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,5 +331,3 @@ func (v *NullableConfigExternalSecondary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_forward_nsg.go b/dns_config/model_config_forward_nsg.go index 4405a51..1480409 100644 --- a/dns_config/model_config_forward_nsg.go +++ b/dns_config/model_config_forward_nsg.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -342,7 +342,7 @@ func (o *ConfigForwardNSG) SetTags(v map[string]interface{}) { } func (o ConfigForwardNSG) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -392,10 +392,10 @@ func (o *ConfigForwardNSG) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -451,5 +451,3 @@ func (v *NullableConfigForwardNSG) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_forward_zone.go b/dns_config/model_config_forward_zone.go index 0ac1c10..0858df6 100644 --- a/dns_config/model_config_forward_zone.go +++ b/dns_config/model_config_forward_zone.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -652,7 +652,7 @@ func (o *ConfigForwardZone) SetWarnings(v []ConfigWarning) { } func (o ConfigForwardZone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -753,5 +753,3 @@ func (v *NullableConfigForwardZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_forward_zone_config.go b/dns_config/model_config_forward_zone_config.go index 3400151..b98659d 100644 --- a/dns_config/model_config_forward_zone_config.go +++ b/dns_config/model_config_forward_zone_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigForwardZoneConfig) SetNsgs(v []string) { } func (o ConfigForwardZoneConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableConfigForwardZoneConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_forwarder.go b/dns_config/model_config_forwarder.go index 055461f..2a455ee 100644 --- a/dns_config/model_config_forwarder.go +++ b/dns_config/model_config_forwarder.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -138,7 +138,7 @@ func (o *ConfigForwarder) SetProtocolFqdn(v string) { } func (o ConfigForwarder) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -170,10 +170,10 @@ func (o *ConfigForwarder) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -229,5 +229,3 @@ func (v *NullableConfigForwarder) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_forwarders_block.go b/dns_config/model_config_forwarders_block.go index 89dbc9b..2e010b9 100644 --- a/dns_config/model_config_forwarders_block.go +++ b/dns_config/model_config_forwarders_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigForwardersBlock) SetUseRootForwardersForLocalResolutionWithB1td(v } func (o ConfigForwardersBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableConfigForwardersBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_global.go b/dns_config/model_config_global.go index 88ab4d8..59f31ae 100644 --- a/dns_config/model_config_global.go +++ b/dns_config/model_config_global.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -36,8 +36,8 @@ type ConfigGlobal struct { // Optional. DNSSEC trust anchors. Error if there are list items with duplicate (_zone_, _sep_, _algorithm_) combinations. Defaults to empty. DnssecTrustAnchors []ConfigTrustAnchor `json:"dnssec_trust_anchors,omitempty"` // Optional. _true_ to reject expired DNSSEC keys. Ignored if either _dnssec_enabled_ or _dnssec_enable_validation_ is _false_. Defaults to _true_. - DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` - DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` + DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` + DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` // Optional. _true_ to enable EDNS client subnet for recursive queries. Other _ecs_*_ fields are ignored if this field is not enabled. Defaults to _false_. EcsEnabled *bool `json:"ecs_enabled,omitempty"` // Optional. _true_ to enable ECS options in outbound queries. This functionality has additional overhead so it is disabled by default. Defaults to _false_. @@ -107,8 +107,8 @@ type ConfigGlobal struct { // Optional. Use default forwarders to resolve queries for subzones. Defaults to _true_. UseForwardersForSubzones *bool `json:"use_forwarders_for_subzones,omitempty"` // _use_root_forwarders_for_local_resolution_with_b1td_ allows DNS recursive queries sent to root forwarders for local resolution when deployed alongside BloxOne Thread Defense. Defaults to _false_. - UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` - ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` + UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` + ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } type _ConfigGlobal ConfigGlobal @@ -1564,7 +1564,7 @@ func (o *ConfigGlobal) SetZoneAuthority(v ConfigZoneAuthority) { } func (o ConfigGlobal) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1722,10 +1722,10 @@ func (o *ConfigGlobal) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1781,5 +1781,3 @@ func (v *NullableConfigGlobal) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_host.go b/dns_config/model_config_host.go index c5349be..ef3dcbf 100644 --- a/dns_config/model_config_host.go +++ b/dns_config/model_config_host.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,7 +24,7 @@ type ConfigHost struct { // Host's primary IP Address. Address *string `json:"address,omitempty"` // Anycast address configured to the host. Order is not significant. - AnycastAddresses []string `json:"anycast_addresses,omitempty"` + AnycastAddresses []string `json:"anycast_addresses,omitempty"` AssociatedServer *ConfigHostAssociatedServer `json:"associated_server,omitempty"` // Host description. Comment *string `json:"comment,omitempty"` @@ -35,7 +35,7 @@ type ConfigHost struct { // DFP service indicates whether or not BloxOne DDI DNS and BloxOne TD DFP are both active on the host. If so, BloxOne DDI DNS will augment recursive queries and forward them to BloxOne TD DFP. Allowed values: * _unavailable_: BloxOne TD DFP application is not available, * _enabled_: BloxOne TD DFP application is available and enabled, * _disabled_: BloxOne TD DFP application is available but disabled. DfpService *string `json:"dfp_service,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigHostInheritance `json:"inheritance_sources,omitempty"` // Optional. _kerberos_keys_ contains a list of keys for GSS-TSIG signed dynamic updates. Defaults to empty. KerberosKeys []ConfigKerberosKey `json:"kerberos_keys,omitempty"` @@ -683,7 +683,7 @@ func (o *ConfigHost) SetType(v string) { } func (o ConfigHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -787,5 +787,3 @@ func (v *NullableConfigHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_host_associated_server.go b/dns_config/model_config_host_associated_server.go index f3e97a1..c99631f 100644 --- a/dns_config/model_config_host_associated_server.go +++ b/dns_config/model_config_host_associated_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigHostAssociatedServer) SetName(v string) { } func (o ConfigHostAssociatedServer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableConfigHostAssociatedServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_host_inheritance.go b/dns_config/model_config_host_inheritance.go index 92bde3a..9b3771c 100644 --- a/dns_config/model_config_host_inheritance.go +++ b/dns_config/model_config_host_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigHostInheritance) SetKerberosKeys(v ConfigInheritedKerberosKeys) { } func (o ConfigHostInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigHostInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_acl_items.go b/dns_config/model_config_inherited_acl_items.go index 08f2ddc..f3d07ec 100644 --- a/dns_config/model_config_inherited_acl_items.go +++ b/dns_config/model_config_inherited_acl_items.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigInheritedACLItems) SetValue(v []ConfigACLItem) { } func (o ConfigInheritedACLItems) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableConfigInheritedACLItems) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_custom_root_ns_block.go b/dns_config/model_config_inherited_custom_root_ns_block.go index 76cba91..a2e4ef4 100644 --- a/dns_config/model_config_inherited_custom_root_ns_block.go +++ b/dns_config/model_config_inherited_custom_root_ns_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedCustomRootNSBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigCustomRootNSBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigCustomRootNSBlock `json:"value,omitempty"` } // NewConfigInheritedCustomRootNSBlock instantiates a new ConfigInheritedCustomRootNSBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedCustomRootNSBlock) SetValue(v ConfigCustomRootNSBlock) { } func (o ConfigInheritedCustomRootNSBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableConfigInheritedCustomRootNSBlock) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_dnssec_validation_block.go b/dns_config/model_config_inherited_dnssec_validation_block.go index e6c9aee..957dc11 100644 --- a/dns_config/model_config_inherited_dnssec_validation_block.go +++ b/dns_config/model_config_inherited_dnssec_validation_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedDNSSECValidationBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigDNSSECValidationBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigDNSSECValidationBlock `json:"value,omitempty"` } // NewConfigInheritedDNSSECValidationBlock instantiates a new ConfigInheritedDNSSECValidationBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedDNSSECValidationBlock) SetValue(v ConfigDNSSECValidation } func (o ConfigInheritedDNSSECValidationBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableConfigInheritedDNSSECValidationBlock) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_dtc_config.go b/dns_config/model_config_inherited_dtc_config.go index 32aac6d..6018d4d 100644 --- a/dns_config/model_config_inherited_dtc_config.go +++ b/dns_config/model_config_inherited_dtc_config.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigInheritedDtcConfig) SetDefaultTtl(v Inheritance2InheritedUInt32) } func (o ConfigInheritedDtcConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigInheritedDtcConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_ecs_block.go b/dns_config/model_config_inherited_ecs_block.go index d8dd038..1a9dfb4 100644 --- a/dns_config/model_config_inherited_ecs_block.go +++ b/dns_config/model_config_inherited_ecs_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedECSBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigECSBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigECSBlock `json:"value,omitempty"` } // NewConfigInheritedECSBlock instantiates a new ConfigInheritedECSBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedECSBlock) SetValue(v ConfigECSBlock) { } func (o ConfigInheritedECSBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableConfigInheritedECSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_forwarders_block.go b/dns_config/model_config_inherited_forwarders_block.go index 471441c..93cb417 100644 --- a/dns_config/model_config_inherited_forwarders_block.go +++ b/dns_config/model_config_inherited_forwarders_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedForwardersBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigForwardersBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigForwardersBlock `json:"value,omitempty"` } // NewConfigInheritedForwardersBlock instantiates a new ConfigInheritedForwardersBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedForwardersBlock) SetValue(v ConfigForwardersBlock) { } func (o ConfigInheritedForwardersBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableConfigInheritedForwardersBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_kerberos_keys.go b/dns_config/model_config_inherited_kerberos_keys.go index dfe1c36..b902b51 100644 --- a/dns_config/model_config_inherited_kerberos_keys.go +++ b/dns_config/model_config_inherited_kerberos_keys.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigInheritedKerberosKeys) SetValue(v []ConfigKerberosKey) { } func (o ConfigInheritedKerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableConfigInheritedKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_sort_list_items.go b/dns_config/model_config_inherited_sort_list_items.go index a12a2b0..43d7e3f 100644 --- a/dns_config/model_config_inherited_sort_list_items.go +++ b/dns_config/model_config_inherited_sort_list_items.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *ConfigInheritedSortListItems) SetValue(v []ConfigSortListItem) { } func (o ConfigInheritedSortListItems) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableConfigInheritedSortListItems) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_zone_authority.go b/dns_config/model_config_inherited_zone_authority.go index e28a12b..c4f0c63 100644 --- a/dns_config/model_config_inherited_zone_authority.go +++ b/dns_config/model_config_inherited_zone_authority.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,14 +19,14 @@ var _ MappedNullable = &ConfigInheritedZoneAuthority{} // ConfigInheritedZoneAuthority Inheritance configuration for a field of type _ZoneAuthority_. type ConfigInheritedZoneAuthority struct { - DefaultTtl *Inheritance2InheritedUInt32 `json:"default_ttl,omitempty"` - Expire *Inheritance2InheritedUInt32 `json:"expire,omitempty"` - MnameBlock *ConfigInheritedZoneAuthorityMNameBlock `json:"mname_block,omitempty"` - NegativeTtl *Inheritance2InheritedUInt32 `json:"negative_ttl,omitempty"` - ProtocolRname *Inheritance2InheritedString `json:"protocol_rname,omitempty"` - Refresh *Inheritance2InheritedUInt32 `json:"refresh,omitempty"` - Retry *Inheritance2InheritedUInt32 `json:"retry,omitempty"` - Rname *Inheritance2InheritedString `json:"rname,omitempty"` + DefaultTtl *Inheritance2InheritedUInt32 `json:"default_ttl,omitempty"` + Expire *Inheritance2InheritedUInt32 `json:"expire,omitempty"` + MnameBlock *ConfigInheritedZoneAuthorityMNameBlock `json:"mname_block,omitempty"` + NegativeTtl *Inheritance2InheritedUInt32 `json:"negative_ttl,omitempty"` + ProtocolRname *Inheritance2InheritedString `json:"protocol_rname,omitempty"` + Refresh *Inheritance2InheritedUInt32 `json:"refresh,omitempty"` + Retry *Inheritance2InheritedUInt32 `json:"retry,omitempty"` + Rname *Inheritance2InheritedString `json:"rname,omitempty"` } // NewConfigInheritedZoneAuthority instantiates a new ConfigInheritedZoneAuthority object @@ -303,7 +303,7 @@ func (o *ConfigInheritedZoneAuthority) SetRname(v Inheritance2InheritedString) { } func (o ConfigInheritedZoneAuthority) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -374,5 +374,3 @@ func (v *NullableConfigInheritedZoneAuthority) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_inherited_zone_authority_m_name_block.go b/dns_config/model_config_inherited_zone_authority_m_name_block.go index e851b2c..1d1eb0f 100644 --- a/dns_config/model_config_inherited_zone_authority_m_name_block.go +++ b/dns_config/model_config_inherited_zone_authority_m_name_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -24,8 +24,8 @@ type ConfigInheritedZoneAuthorityMNameBlock struct { // Human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *ConfigZoneAuthorityMNameBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *ConfigZoneAuthorityMNameBlock `json:"value,omitempty"` } // NewConfigInheritedZoneAuthorityMNameBlock instantiates a new ConfigInheritedZoneAuthorityMNameBlock object @@ -174,7 +174,7 @@ func (o *ConfigInheritedZoneAuthorityMNameBlock) SetValue(v ConfigZoneAuthorityM } func (o ConfigInheritedZoneAuthorityMNameBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableConfigInheritedZoneAuthorityMNameBlock) UnmarshalJSON(src []byt v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_internal_secondary.go b/dns_config/model_config_internal_secondary.go index 1afb00d..57af484 100644 --- a/dns_config/model_config_internal_secondary.go +++ b/dns_config/model_config_internal_secondary.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -70,7 +70,7 @@ func (o *ConfigInternalSecondary) SetHost(v string) { } func (o ConfigInternalSecondary) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -96,10 +96,10 @@ func (o *ConfigInternalSecondary) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -155,5 +155,3 @@ func (v *NullableConfigInternalSecondary) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_kerberos_key.go b/dns_config/model_config_kerberos_key.go index e233897..34d5290 100644 --- a/dns_config/model_config_kerberos_key.go +++ b/dns_config/model_config_kerberos_key.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -240,7 +240,7 @@ func (o *ConfigKerberosKey) SetVersion(v int64) { } func (o ConfigKerberosKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -281,10 +281,10 @@ func (o *ConfigKerberosKey) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -340,5 +340,3 @@ func (v *NullableConfigKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_lbdn.go b/dns_config/model_config_lbdn.go index 7d7e26b..91c97a7 100644 --- a/dns_config/model_config_lbdn.go +++ b/dns_config/model_config_lbdn.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -24,10 +24,10 @@ type ConfigLBDN struct { // Optional. Comment for __LBDN__. Comment *string `json:"comment,omitempty"` // Optional. _true_ to disable object. A disabled object is effectively non-existent when generating configuration. - Disabled *bool `json:"disabled,omitempty"` + Disabled *bool `json:"disabled,omitempty"` DtcPolicy *ConfigDTCPolicy `json:"dtc_policy,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigTTLInheritance `json:"inheritance_sources,omitempty"` // Name of __LBDN__. Name string `json:"name"` @@ -367,7 +367,7 @@ func (o *ConfigLBDN) SetView(v string) { } func (o ConfigLBDN) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -419,10 +419,10 @@ func (o *ConfigLBDN) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -478,5 +478,3 @@ func (v *NullableConfigLBDN) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_acl_response.go b/dns_config/model_config_list_acl_response.go index 35ea487..130df31 100644 --- a/dns_config/model_config_list_acl_response.go +++ b/dns_config/model_config_list_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListACLResponse) SetResults(v []ConfigACL) { } func (o ConfigListACLResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_auth_nsg_response.go b/dns_config/model_config_list_auth_nsg_response.go index f780c1d..f8629a3 100644 --- a/dns_config/model_config_list_auth_nsg_response.go +++ b/dns_config/model_config_list_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListAuthNSGResponse) SetResults(v []ConfigAuthNSG) { } func (o ConfigListAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_auth_zone_response.go b/dns_config/model_config_list_auth_zone_response.go index c81b849..32df2cd 100644 --- a/dns_config/model_config_list_auth_zone_response.go +++ b/dns_config/model_config_list_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListAuthZoneResponse) SetResults(v []ConfigAuthZone) { } func (o ConfigListAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_delegation_response.go b/dns_config/model_config_list_delegation_response.go index 621be8e..7627700 100644 --- a/dns_config/model_config_list_delegation_response.go +++ b/dns_config/model_config_list_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListDelegationResponse) SetResults(v []ConfigDelegation) { } func (o ConfigListDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListDelegationResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_forward_nsg_response.go b/dns_config/model_config_list_forward_nsg_response.go index c419240..349e995 100644 --- a/dns_config/model_config_list_forward_nsg_response.go +++ b/dns_config/model_config_list_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListForwardNSGResponse) SetResults(v []ConfigForwardNSG) { } func (o ConfigListForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListForwardNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_forward_zone_response.go b/dns_config/model_config_list_forward_zone_response.go index 244f7fa..763f0a5 100644 --- a/dns_config/model_config_list_forward_zone_response.go +++ b/dns_config/model_config_list_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListForwardZoneResponse) SetResults(v []ConfigForwardZone) { } func (o ConfigListForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListForwardZoneResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_host_response.go b/dns_config/model_config_list_host_response.go index e6f424a..8992946 100644 --- a/dns_config/model_config_list_host_response.go +++ b/dns_config/model_config_list_host_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListHostResponse) SetResults(v []ConfigHost) { } func (o ConfigListHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_lbdn_response.go b/dns_config/model_config_list_lbdn_response.go index e54de42..ea04f2f 100644 --- a/dns_config/model_config_list_lbdn_response.go +++ b/dns_config/model_config_list_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListLBDNResponse) SetResults(v []ConfigLBDN) { } func (o ConfigListLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_server_response.go b/dns_config/model_config_list_server_response.go index 87f340f..458c5c5 100644 --- a/dns_config/model_config_list_server_response.go +++ b/dns_config/model_config_list_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListServerResponse) SetResults(v []ConfigServer) { } func (o ConfigListServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_list_view_response.go b/dns_config/model_config_list_view_response.go index 68d85ad..c165dfb 100644 --- a/dns_config/model_config_list_view_response.go +++ b/dns_config/model_config_list_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ConfigListViewResponse) SetResults(v []ConfigView) { } func (o ConfigListViewResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableConfigListViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_acl_response.go b/dns_config/model_config_read_acl_response.go index 3bfe6be..d46fae3 100644 --- a/dns_config/model_config_read_acl_response.go +++ b/dns_config/model_config_read_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadACLResponse) SetResult(v ConfigACL) { } func (o ConfigReadACLResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_auth_nsg_response.go b/dns_config/model_config_read_auth_nsg_response.go index aa337f4..0fb4cf4 100644 --- a/dns_config/model_config_read_auth_nsg_response.go +++ b/dns_config/model_config_read_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadAuthNSGResponse) SetResult(v ConfigAuthNSG) { } func (o ConfigReadAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_auth_zone_response.go b/dns_config/model_config_read_auth_zone_response.go index 0e5fce4..e93b2fd 100644 --- a/dns_config/model_config_read_auth_zone_response.go +++ b/dns_config/model_config_read_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadAuthZoneResponse) SetResult(v ConfigAuthZone) { } func (o ConfigReadAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_delegation_response.go b/dns_config/model_config_read_delegation_response.go index e570fa0..27f7724 100644 --- a/dns_config/model_config_read_delegation_response.go +++ b/dns_config/model_config_read_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadDelegationResponse) SetResult(v ConfigDelegation) { } func (o ConfigReadDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadDelegationResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_forward_nsg_response.go b/dns_config/model_config_read_forward_nsg_response.go index 468d9f1..2e052cd 100644 --- a/dns_config/model_config_read_forward_nsg_response.go +++ b/dns_config/model_config_read_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadForwardNSGResponse) SetResult(v ConfigForwardNSG) { } func (o ConfigReadForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadForwardNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_forward_zone_response.go b/dns_config/model_config_read_forward_zone_response.go index 16aebf5..8f1f4ff 100644 --- a/dns_config/model_config_read_forward_zone_response.go +++ b/dns_config/model_config_read_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadForwardZoneResponse) SetResult(v ConfigForwardZone) { } func (o ConfigReadForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadForwardZoneResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_global_response.go b/dns_config/model_config_read_global_response.go index 5b816c6..207606b 100644 --- a/dns_config/model_config_read_global_response.go +++ b/dns_config/model_config_read_global_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadGlobalResponse) SetResult(v ConfigGlobal) { } func (o ConfigReadGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_host_response.go b/dns_config/model_config_read_host_response.go index 7e6eeb4..1ac52eb 100644 --- a/dns_config/model_config_read_host_response.go +++ b/dns_config/model_config_read_host_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadHostResponse) SetResult(v ConfigHost) { } func (o ConfigReadHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_lbdn_response.go b/dns_config/model_config_read_lbdn_response.go index 93fd7fc..e32076d 100644 --- a/dns_config/model_config_read_lbdn_response.go +++ b/dns_config/model_config_read_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadLBDNResponse) SetResult(v ConfigLBDN) { } func (o ConfigReadLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_server_response.go b/dns_config/model_config_read_server_response.go index bb88f40..99254a6 100644 --- a/dns_config/model_config_read_server_response.go +++ b/dns_config/model_config_read_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadServerResponse) SetResult(v ConfigServer) { } func (o ConfigReadServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_read_view_response.go b/dns_config/model_config_read_view_response.go index 10ac6ab..35dd8dc 100644 --- a/dns_config/model_config_read_view_response.go +++ b/dns_config/model_config_read_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigReadViewResponse) SetResult(v ConfigView) { } func (o ConfigReadViewResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigReadViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_root_ns.go b/dns_config/model_config_root_ns.go index b1cbdc7..231ec7c 100644 --- a/dns_config/model_config_root_ns.go +++ b/dns_config/model_config_root_ns.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -131,7 +131,7 @@ func (o *ConfigRootNS) SetProtocolFqdn(v string) { } func (o ConfigRootNS) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -162,10 +162,10 @@ func (o *ConfigRootNS) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -221,5 +221,3 @@ func (v *NullableConfigRootNS) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_server.go b/dns_config/model_config_server.go index a931281..987980a 100644 --- a/dns_config/model_config_server.go +++ b/dns_config/model_config_server.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,10 +11,10 @@ API version: v1 package dns_config import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the ConfigServer type satisfies the MappedNullable interface at compile time @@ -65,7 +65,7 @@ type ConfigServer struct { // _gss_tsig_enabled_ enables/disables GSS-TSIG signed dynamic updates. Defaults to _false_. GssTsigEnabled *bool `json:"gss_tsig_enabled,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigServerInheritance `json:"inheritance_sources,omitempty"` // _kerberos_keys_ contains a list of keys for GSS-TSIG signed dynamic updates. Defaults to empty. KerberosKeys []ConfigKerberosKey `json:"kerberos_keys,omitempty"` @@ -1702,7 +1702,7 @@ func (o *ConfigServer) SetViews(v []ConfigDisplayView) { } func (o ConfigServer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1872,10 +1872,10 @@ func (o *ConfigServer) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1931,5 +1931,3 @@ func (v *NullableConfigServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_server_inheritance.go b/dns_config/model_config_server_inheritance.go index 93205d5..f8e445f 100644 --- a/dns_config/model_config_server_inheritance.go +++ b/dns_config/model_config_server_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,35 +19,35 @@ var _ MappedNullable = &ConfigServerInheritance{} // ConfigServerInheritance Inheritance configuration specifies how and which fields _Server_ object inherits from _Global_ parent. type ConfigServerInheritance struct { - AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` - CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` - DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` - EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` - FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` - FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` - ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` - GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` - KerberosKeys *ConfigInheritedKerberosKeys `json:"kerberos_keys,omitempty"` - LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` - LogQueryResponse *Inheritance2InheritedBool `json:"log_query_response,omitempty"` - MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` - MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` - MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` - MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` - Notify *Inheritance2InheritedBool `json:"notify,omitempty"` - QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` - QueryPort *Inheritance2InheritedUInt32 `json:"query_port,omitempty"` - RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` - RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` - RecursiveClients *Inheritance2InheritedUInt32 `json:"recursive_clients,omitempty"` - ResolverQueryTimeout *Inheritance2InheritedUInt32 `json:"resolver_query_timeout,omitempty"` - SecondaryAxfrQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_axfr_query_limit,omitempty"` - SecondarySoaQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_soa_query_limit,omitempty"` - SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` - SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` - TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` - UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` - UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` + AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` + CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` + DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` + EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` + FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` + FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` + ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` + GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` + KerberosKeys *ConfigInheritedKerberosKeys `json:"kerberos_keys,omitempty"` + LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` + LogQueryResponse *Inheritance2InheritedBool `json:"log_query_response,omitempty"` + MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` + MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` + MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` + MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` + Notify *Inheritance2InheritedBool `json:"notify,omitempty"` + QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` + QueryPort *Inheritance2InheritedUInt32 `json:"query_port,omitempty"` + RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` + RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` + RecursiveClients *Inheritance2InheritedUInt32 `json:"recursive_clients,omitempty"` + ResolverQueryTimeout *Inheritance2InheritedUInt32 `json:"resolver_query_timeout,omitempty"` + SecondaryAxfrQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_axfr_query_limit,omitempty"` + SecondarySoaQueryLimit *Inheritance2InheritedUInt32 `json:"secondary_soa_query_limit,omitempty"` + SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` + SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` + TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` + UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` + UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` } // NewConfigServerInheritance instantiates a new ConfigServerInheritance object @@ -996,7 +996,7 @@ func (o *ConfigServerInheritance) SetUseForwardersForSubzones(v Inheritance2Inhe } func (o ConfigServerInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1130,5 +1130,3 @@ func (v *NullableConfigServerInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_sort_list_item.go b/dns_config/model_config_sort_list_item.go index 3a37ffa..c22808f 100644 --- a/dns_config/model_config_sort_list_item.go +++ b/dns_config/model_config_sort_list_item.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -172,7 +172,7 @@ func (o *ConfigSortListItem) SetSource(v string) { } func (o ConfigSortListItem) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -207,10 +207,10 @@ func (o *ConfigSortListItem) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -266,5 +266,3 @@ func (v *NullableConfigSortListItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_trust_anchor.go b/dns_config/model_config_trust_anchor.go index cbdff08..6448af1 100644 --- a/dns_config/model_config_trust_anchor.go +++ b/dns_config/model_config_trust_anchor.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package dns_config import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -191,7 +191,7 @@ func (o *ConfigTrustAnchor) SetZone(v string) { } func (o ConfigTrustAnchor) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -227,10 +227,10 @@ func (o *ConfigTrustAnchor) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -286,5 +286,3 @@ func (v *NullableConfigTrustAnchor) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_tsig_key.go b/dns_config/model_config_tsig_key.go index 6623cc2..503c738 100644 --- a/dns_config/model_config_tsig_key.go +++ b/dns_config/model_config_tsig_key.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -243,7 +243,7 @@ func (o *ConfigTSIGKey) SetSecret(v string) { } func (o ConfigTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,5 +308,3 @@ func (v *NullableConfigTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_ttl_inheritance.go b/dns_config/model_config_ttl_inheritance.go index 11164ab..5eeef0b 100644 --- a/dns_config/model_config_ttl_inheritance.go +++ b/dns_config/model_config_ttl_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigTTLInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o ConfigTTLInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigTTLInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_acl_response.go b/dns_config/model_config_update_acl_response.go index 378fddd..3be6a0b 100644 --- a/dns_config/model_config_update_acl_response.go +++ b/dns_config/model_config_update_acl_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateACLResponse) SetResult(v ConfigACL) { } func (o ConfigUpdateACLResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateACLResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_auth_nsg_response.go b/dns_config/model_config_update_auth_nsg_response.go index 97d8c14..8c5b968 100644 --- a/dns_config/model_config_update_auth_nsg_response.go +++ b/dns_config/model_config_update_auth_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateAuthNSGResponse) SetResult(v ConfigAuthNSG) { } func (o ConfigUpdateAuthNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateAuthNSGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_auth_zone_response.go b/dns_config/model_config_update_auth_zone_response.go index 8b63f17..a537e46 100644 --- a/dns_config/model_config_update_auth_zone_response.go +++ b/dns_config/model_config_update_auth_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateAuthZoneResponse) SetResult(v ConfigAuthZone) { } func (o ConfigUpdateAuthZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateAuthZoneResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_delegation_response.go b/dns_config/model_config_update_delegation_response.go index 0c949be..2a1920a 100644 --- a/dns_config/model_config_update_delegation_response.go +++ b/dns_config/model_config_update_delegation_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateDelegationResponse) SetResult(v ConfigDelegation) { } func (o ConfigUpdateDelegationResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateDelegationResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_forward_nsg_response.go b/dns_config/model_config_update_forward_nsg_response.go index 56bf296..01ab8ab 100644 --- a/dns_config/model_config_update_forward_nsg_response.go +++ b/dns_config/model_config_update_forward_nsg_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateForwardNSGResponse) SetResult(v ConfigForwardNSG) { } func (o ConfigUpdateForwardNSGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateForwardNSGResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_forward_zone_response.go b/dns_config/model_config_update_forward_zone_response.go index 66ebf84..669d072 100644 --- a/dns_config/model_config_update_forward_zone_response.go +++ b/dns_config/model_config_update_forward_zone_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateForwardZoneResponse) SetResult(v ConfigForwardZone) { } func (o ConfigUpdateForwardZoneResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateForwardZoneResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_global_response.go b/dns_config/model_config_update_global_response.go index a079a14..7745385 100644 --- a/dns_config/model_config_update_global_response.go +++ b/dns_config/model_config_update_global_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateGlobalResponse) SetResult(v ConfigGlobal) { } func (o ConfigUpdateGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_host_response.go b/dns_config/model_config_update_host_response.go index e1d6646..9515620 100644 --- a/dns_config/model_config_update_host_response.go +++ b/dns_config/model_config_update_host_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateHostResponse) SetResult(v ConfigHost) { } func (o ConfigUpdateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_lbdn_response.go b/dns_config/model_config_update_lbdn_response.go index c486881..633c797 100644 --- a/dns_config/model_config_update_lbdn_response.go +++ b/dns_config/model_config_update_lbdn_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateLBDNResponse) SetResult(v ConfigLBDN) { } func (o ConfigUpdateLBDNResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateLBDNResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_server_response.go b/dns_config/model_config_update_server_response.go index 7474b9d..16e6a88 100644 --- a/dns_config/model_config_update_server_response.go +++ b/dns_config/model_config_update_server_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateServerResponse) SetResult(v ConfigServer) { } func (o ConfigUpdateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_update_view_response.go b/dns_config/model_config_update_view_response.go index 6bcc7bd..a5356b5 100644 --- a/dns_config/model_config_update_view_response.go +++ b/dns_config/model_config_update_view_response.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *ConfigUpdateViewResponse) SetResult(v ConfigView) { } func (o ConfigUpdateViewResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableConfigUpdateViewResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_view.go b/dns_config/model_config_view.go index 93618a6..643fefb 100644 --- a/dns_config/model_config_view.go +++ b/dns_config/model_config_view.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,10 +11,10 @@ API version: v1 package dns_config import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the ConfigView type satisfies the MappedNullable interface at compile time @@ -43,8 +43,8 @@ type ConfigView struct { // Optional. DNSSEC trust anchors. Error if there are list items with duplicate (_zone_, _sep_, _algorithm_) combinations. Defaults to empty. DnssecTrustAnchors []ConfigTrustAnchor `json:"dnssec_trust_anchors,omitempty"` // Optional. _true_ to reject expired DNSSEC keys. Ignored if either _dnssec_enabled_ or _dnssec_enable_validation_ is _false_. Defaults to _true_. - DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` - DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` + DnssecValidateExpiry *bool `json:"dnssec_validate_expiry,omitempty"` + DtcConfig *ConfigDTCConfig `json:"dtc_config,omitempty"` // Optional. _true_ to enable EDNS client subnet for recursive queries. Other _ecs_*_ fields are ignored if this field is not enabled. Defaults to _false-. EcsEnabled *bool `json:"ecs_enabled,omitempty"` // Optional. _true_ to enable ECS options in outbound queries. This functionality has additional overhead so it is disabled by default. Defaults to _false_. @@ -68,7 +68,7 @@ type ConfigView struct { // _gss_tsig_enabled_ enables/disables GSS-TSIG signed dynamic updates. Defaults to _false_. GssTsigEnabled *bool `json:"gss_tsig_enabled,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *ConfigViewInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpSpaces []string `json:"ip_spaces,omitempty"` @@ -113,8 +113,8 @@ type ConfigView struct { // Optional. Use default forwarders to resolve queries for subzones. Defaults to _true_. UseForwardersForSubzones *bool `json:"use_forwarders_for_subzones,omitempty"` // _use_root_forwarders_for_local_resolution_with_b1td_ allows DNS recursive queries sent to root forwarders for local resolution when deployed alongside BloxOne Thread Defense. Defaults to _false_. - UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` - ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` + UseRootForwardersForLocalResolutionWithB1td *bool `json:"use_root_forwarders_for_local_resolution_with_b1td,omitempty"` + ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } type _ConfigView ConfigView @@ -1666,7 +1666,7 @@ func (o *ConfigView) SetZoneAuthority(v ConfigZoneAuthority) { } func (o ConfigView) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1833,10 +1833,10 @@ func (o *ConfigView) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1892,5 +1892,3 @@ func (v *NullableConfigView) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_view_inheritance.go b/dns_config/model_config_view_inheritance.go index 188122b..07bfb14 100644 --- a/dns_config/model_config_view_inheritance.go +++ b/dns_config/model_config_view_inheritance.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -19,32 +19,32 @@ var _ MappedNullable = &ConfigViewInheritance{} // ConfigViewInheritance Inheritance configuration specifies how and which fields _View_ object inherits from [ _Global_, _Server_ ] parent. type ConfigViewInheritance struct { - AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` - CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` - DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` - DtcConfig *ConfigInheritedDtcConfig `json:"dtc_config,omitempty"` - EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` - EdnsUdpSize *Inheritance2InheritedUInt32 `json:"edns_udp_size,omitempty"` - FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` - FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` - ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` - GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` - LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` - MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` - MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` - MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` - MaxUdpSize *Inheritance2InheritedUInt32 `json:"max_udp_size,omitempty"` - MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` - Notify *Inheritance2InheritedBool `json:"notify,omitempty"` - QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` - RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` - RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` - SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` - SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` - TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` - UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` - UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` - ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` + AddEdnsOptionInOutgoingQuery *Inheritance2InheritedBool `json:"add_edns_option_in_outgoing_query,omitempty"` + CustomRootNsBlock *ConfigInheritedCustomRootNSBlock `json:"custom_root_ns_block,omitempty"` + DnssecValidationBlock *ConfigInheritedDNSSECValidationBlock `json:"dnssec_validation_block,omitempty"` + DtcConfig *ConfigInheritedDtcConfig `json:"dtc_config,omitempty"` + EcsBlock *ConfigInheritedECSBlock `json:"ecs_block,omitempty"` + EdnsUdpSize *Inheritance2InheritedUInt32 `json:"edns_udp_size,omitempty"` + FilterAaaaAcl *ConfigInheritedACLItems `json:"filter_aaaa_acl,omitempty"` + FilterAaaaOnV4 *Inheritance2InheritedString `json:"filter_aaaa_on_v4,omitempty"` + ForwardersBlock *ConfigInheritedForwardersBlock `json:"forwarders_block,omitempty"` + GssTsigEnabled *Inheritance2InheritedBool `json:"gss_tsig_enabled,omitempty"` + LameTtl *Inheritance2InheritedUInt32 `json:"lame_ttl,omitempty"` + MatchRecursiveOnly *Inheritance2InheritedBool `json:"match_recursive_only,omitempty"` + MaxCacheTtl *Inheritance2InheritedUInt32 `json:"max_cache_ttl,omitempty"` + MaxNegativeTtl *Inheritance2InheritedUInt32 `json:"max_negative_ttl,omitempty"` + MaxUdpSize *Inheritance2InheritedUInt32 `json:"max_udp_size,omitempty"` + MinimalResponses *Inheritance2InheritedBool `json:"minimal_responses,omitempty"` + Notify *Inheritance2InheritedBool `json:"notify,omitempty"` + QueryAcl *ConfigInheritedACLItems `json:"query_acl,omitempty"` + RecursionAcl *ConfigInheritedACLItems `json:"recursion_acl,omitempty"` + RecursionEnabled *Inheritance2InheritedBool `json:"recursion_enabled,omitempty"` + SortList *ConfigInheritedSortListItems `json:"sort_list,omitempty"` + SynthesizeAddressRecordsFromHttps *Inheritance2InheritedBool `json:"synthesize_address_records_from_https,omitempty"` + TransferAcl *ConfigInheritedACLItems `json:"transfer_acl,omitempty"` + UpdateAcl *ConfigInheritedACLItems `json:"update_acl,omitempty"` + UseForwardersForSubzones *Inheritance2InheritedBool `json:"use_forwarders_for_subzones,omitempty"` + ZoneAuthority *ConfigInheritedZoneAuthority `json:"zone_authority,omitempty"` } // NewConfigViewInheritance instantiates a new ConfigViewInheritance object @@ -897,7 +897,7 @@ func (o *ConfigViewInheritance) SetZoneAuthority(v ConfigInheritedZoneAuthority) } func (o ConfigViewInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1022,5 +1022,3 @@ func (v *NullableConfigViewInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_warning.go b/dns_config/model_config_warning.go index 65b8324..1f42dc7 100644 --- a/dns_config/model_config_warning.go +++ b/dns_config/model_config_warning.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -107,7 +107,7 @@ func (o *ConfigWarning) SetName(v string) { } func (o ConfigWarning) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableConfigWarning) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_zone_authority.go b/dns_config/model_config_zone_authority.go index 84accf1..49881ff 100644 --- a/dns_config/model_config_zone_authority.go +++ b/dns_config/model_config_zone_authority.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -379,7 +379,7 @@ func (o *ConfigZoneAuthority) SetUseDefaultMname(v bool) { } func (o ConfigZoneAuthority) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -456,5 +456,3 @@ func (v *NullableConfigZoneAuthority) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_config_zone_authority_m_name_block.go b/dns_config/model_config_zone_authority_m_name_block.go index 9598885..5686183 100644 --- a/dns_config/model_config_zone_authority_m_name_block.go +++ b/dns_config/model_config_zone_authority_m_name_block.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *ConfigZoneAuthorityMNameBlock) SetUseDefaultMname(v bool) { } func (o ConfigZoneAuthorityMNameBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableConfigZoneAuthorityMNameBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_inheritance2_assigned_host.go b/dns_config/model_inheritance2_assigned_host.go index caca775..e7de2eb 100644 --- a/dns_config/model_inheritance2_assigned_host.go +++ b/dns_config/model_inheritance2_assigned_host.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -141,7 +141,7 @@ func (o *Inheritance2AssignedHost) SetOphid(v string) { } func (o Inheritance2AssignedHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableInheritance2AssignedHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_inheritance2_inherited_bool.go b/dns_config/model_inheritance2_inherited_bool.go index 6028dbd..e32cc64 100644 --- a/dns_config/model_inheritance2_inherited_bool.go +++ b/dns_config/model_inheritance2_inherited_bool.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedBool) SetValue(v bool) { } func (o Inheritance2InheritedBool) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritance2InheritedBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_inheritance2_inherited_string.go b/dns_config/model_inheritance2_inherited_string.go index 59f48f4..b0b72a1 100644 --- a/dns_config/model_inheritance2_inherited_string.go +++ b/dns_config/model_inheritance2_inherited_string.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedString) SetValue(v string) { } func (o Inheritance2InheritedString) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritance2InheritedString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/model_inheritance2_inherited_u_int32.go b/dns_config/model_inheritance2_inherited_u_int32.go index 84d89e9..dcdb24e 100644 --- a/dns_config/model_inheritance2_inherited_u_int32.go +++ b/dns_config/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_config/utils.go b/dns_config/utils.go index 6a1c960..dd2f56a 100644 --- a/dns_config/utils.go +++ b/dns_config/utils.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ diff --git a/dns_data/api_record.go b/dns_data/api_record.go index 91c8712..3400bef 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type RecordAPI interface { /* - RecordCreate Create the DNS resource record. + RecordCreate Create the DNS resource record. - Use this method to create a DNS __Record__ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to create a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ RecordCreate(ctx context.Context) ApiRecordCreateRequest @@ -38,27 +37,27 @@ A __Record__ object represents a DNS resource record in an authoritative zone. // @return DataCreateRecordResponse RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) /* - RecordDelete Move the DNS resource record to recycle bin. + RecordDelete Move the DNS resource record to recycle bin. - Use this method to move a DNS __Record__ object to the recycle bin. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to move a DNS __Record__ object to the recycle bin. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest // RecordDeleteExecute executes the request RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) /* - RecordList Retrieve DNS resource records. + RecordList Retrieve DNS resource records. - Use this method to retrieve DNS __Record__ objects. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve DNS __Record__ objects. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ RecordList(ctx context.Context) ApiRecordListRequest @@ -66,14 +65,14 @@ A __Record__ object represents a DNS resource record in an authoritative zone. // @return DataListRecordResponse RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) /* - RecordRead Retrieve the DNS resource record. + RecordRead Retrieve the DNS resource record. - Use this method to retrieve a DNS __Record__ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ RecordRead(ctx context.Context, id string) ApiRecordReadRequest @@ -81,14 +80,14 @@ A __Record__ object represents a DNS resource record in an authoritative zone. // @return DataReadRecordResponse RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) /* - RecordSOASerialIncrement Increment serial number for the SOA record. + RecordSOASerialIncrement Increment serial number for the SOA record. - Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest @@ -96,14 +95,14 @@ A __Record__ object represents a DNS resource record in an authoritative zone. // @return DataSOASerialIncrementResponse RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) /* - RecordUpdate Update the DNS resource record. + RecordUpdate Update the DNS resource record. - Use this method to update a DNS __Record__ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to update a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest @@ -116,10 +115,10 @@ A __Record__ object represents a DNS resource record in an authoritative zone. type RecordAPIService internal.Service type ApiRecordCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - body *DataRecord - inherit *string + body *DataRecord + inherit *string } func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { @@ -143,24 +142,25 @@ RecordCreate Create the DNS resource record. Use this method to create a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequest { return ApiRecordCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return DataCreateRecordResponse +// +// @return DataCreateRecordResponse func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataCreateRecordResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataCreateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordCreate") @@ -197,16 +197,16 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -252,9 +252,9 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC } type ApiRecordDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string + id string } func (r ApiRecordDeleteRequest) Execute() (*http.Response, error) { @@ -267,24 +267,24 @@ RecordDelete Move the DNS resource record to recycle bin. Use this method to move a DNS __Record__ object to the recycle bin. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ func (a *RecordAPIService) RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest { return ApiRecordDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordDelete") @@ -356,50 +356,50 @@ func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http. } type ApiRecordListRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordListRequest) Fields(fields string) ApiRecordListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRecordListRequest) Filter(filter string) ApiRecordListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRecordListRequest) Offset(offset int32) ApiRecordListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRecordListRequest) Limit(limit int32) ApiRecordListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRecordListRequest) PageToken(pageToken string) ApiRecordListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRecordListRequest) OrderBy(orderBy string) ApiRecordListRequest { r.orderBy = &orderBy return r @@ -433,24 +433,25 @@ RecordList Retrieve DNS resource records. Use this method to retrieve DNS __Record__ objects. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest { return ApiRecordListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return DataListRecordResponse +// +// @return DataListRecordResponse func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataListRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataListRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordList") @@ -553,14 +554,14 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR } type ApiRecordReadRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordReadRequest) Fields(fields string) ApiRecordReadRequest { r.fields = &fields return r @@ -582,26 +583,27 @@ RecordRead Retrieve the DNS resource record. Use this method to retrieve a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordReadRequest { return ApiRecordReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return DataReadRecordResponse +// +// @return DataReadRecordResponse func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataReadRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataReadRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordRead") @@ -684,10 +686,10 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR } type ApiRecordSOASerialIncrementRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataSOASerialIncrementRequest + id string + body *DataSOASerialIncrementRequest } func (r ApiRecordSOASerialIncrementRequest) Body(body DataSOASerialIncrementRequest) ApiRecordSOASerialIncrementRequest { @@ -705,26 +707,27 @@ RecordSOASerialIncrement Increment serial number for the SOA record. Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest { return ApiRecordSOASerialIncrementRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return DataSOASerialIncrementResponse +// +// @return DataSOASerialIncrementResponse func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataSOASerialIncrementResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataSOASerialIncrementResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordSOASerialIncrement") @@ -759,8 +762,8 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -806,11 +809,11 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI } type ApiRecordUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataRecord - inherit *string + id string + body *DataRecord + inherit *string } func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { @@ -834,26 +837,27 @@ RecordUpdate Update the DNS resource record. Use this method to update a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest { return ApiRecordUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return DataUpdateRecordResponse +// +// @return DataUpdateRecordResponse func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataUpdateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataUpdateRecordResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataUpdateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordUpdate") @@ -891,16 +895,16 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/dns_data/client.go b/dns_data/client.go index 086bb57..5c1c0ee 100644 --- a/dns_data/client.go +++ b/dns_data/client.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package dns_data import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,7 +19,7 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DNS Data API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services RecordAPI RecordAPI @@ -29,7 +29,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.RecordAPI = (*RecordAPIService)(&c.Common) diff --git a/dns_data/model_data_create_record_response.go b/dns_data/model_data_create_record_response.go index 2914142..870d899 100644 --- a/dns_data/model_data_create_record_response.go +++ b/dns_data/model_data_create_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataCreateRecordResponse) SetResult(v DataRecord) { } func (o DataCreateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataCreateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_list_record_response.go b/dns_data/model_data_list_record_response.go index 8ce789e..e633b11 100644 --- a/dns_data/model_data_list_record_response.go +++ b/dns_data/model_data_list_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *DataListRecordResponse) SetResults(v []DataRecord) { } func (o DataListRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableDataListRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_read_record_response.go b/dns_data/model_data_read_record_response.go index 57ccdab..7541c04 100644 --- a/dns_data/model_data_read_record_response.go +++ b/dns_data/model_data_read_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataReadRecordResponse) SetResult(v DataRecord) { } func (o DataReadRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataReadRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_record.go b/dns_data/model_data_record.go index 19ea0bd..58b63d6 100644 --- a/dns_data/model_data_record.go +++ b/dns_data/model_data_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,10 +11,10 @@ API version: v1 package dns_data import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the DataRecord type satisfies the MappedNullable interface at compile time @@ -43,7 +43,7 @@ type DataRecord struct { // The DNS protocol textual representation of the DNS resource record data. DnsRdata *string `json:"dns_rdata,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *DataRecordInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpamHost *string `json:"ipam_host,omitempty"` @@ -920,7 +920,7 @@ func (o *DataRecord) SetZone(v string) { } func (o DataRecord) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1021,10 +1021,10 @@ func (o *DataRecord) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1080,5 +1080,3 @@ func (v *NullableDataRecord) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_record_inheritance.go b/dns_data/model_data_record_inheritance.go index 88f08ec..55e5209 100644 --- a/dns_data/model_data_record_inheritance.go +++ b/dns_data/model_data_record_inheritance.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataRecordInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o DataRecordInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataRecordInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_soa_serial_increment_request.go b/dns_data/model_data_soa_serial_increment_request.go index 2ae5f8c..ce4dabf 100644 --- a/dns_data/model_data_soa_serial_increment_request.go +++ b/dns_data/model_data_soa_serial_increment_request.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -140,7 +140,7 @@ func (o *DataSOASerialIncrementRequest) SetSerialIncrement(v int64) { } func (o DataSOASerialIncrementRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,5 +196,3 @@ func (v *NullableDataSOASerialIncrementRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_soa_serial_increment_response.go b/dns_data/model_data_soa_serial_increment_response.go index cc83af7..352d117 100644 --- a/dns_data/model_data_soa_serial_increment_response.go +++ b/dns_data/model_data_soa_serial_increment_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataSOASerialIncrementResponse) SetResult(v DataRecord) { } func (o DataSOASerialIncrementResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataSOASerialIncrementResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_update_record_response.go b/dns_data/model_data_update_record_response.go index ac6d08d..aca7ee5 100644 --- a/dns_data/model_data_update_record_response.go +++ b/dns_data/model_data_update_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataUpdateRecordResponse) SetResult(v DataRecord) { } func (o DataUpdateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataUpdateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_inheritance2_inherited_u_int32.go b/dns_data/model_inheritance2_inherited_u_int32.go index 9d2885f..c23f897 100644 --- a/dns_data/model_inheritance2_inherited_u_int32.go +++ b/dns_data/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_protobuf_field_mask.go b/dns_data/model_protobuf_field_mask.go index 21401df..17ded5d 100644 --- a/dns_data/model_protobuf_field_mask.go +++ b/dns_data/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/utils.go b/dns_data/utils.go index 3e34cc6..9e6e1a0 100644 --- a/dns_data/utils.go +++ b/dns_data/utils.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ diff --git a/infra_mgmt/api_detail.go b/infra_mgmt/api_detail.go index dcedbf2..5f04bf8 100644 --- a/infra_mgmt/api_detail.go +++ b/infra_mgmt/api_detail.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -17,16 +17,15 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type DetailAPI interface { /* - DetailHostsList List all the Hosts along with its associated Services (applications). + DetailHostsList List all the Hosts along with its associated Services (applications). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailHostsListRequest */ DetailHostsList(ctx context.Context) ApiDetailHostsListRequest @@ -34,10 +33,10 @@ type DetailAPI interface { // @return InfraListDetailHostsResponse DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) /* - DetailServicesList List all the Services (applications) along with its associated Hosts. + DetailServicesList List all the Services (applications) along with its associated Hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailServicesListRequest */ DetailServicesList(ctx context.Context) ApiDetailServicesListRequest @@ -50,49 +49,49 @@ type DetailAPI interface { type DetailAPIService internal.Service type ApiDetailHostsListRequest struct { - ctx context.Context + ctx context.Context ApiService DetailAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDetailHostsListRequest) Filter(filter string) ApiDetailHostsListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDetailHostsListRequest) OrderBy(orderBy string) ApiDetailHostsListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDetailHostsListRequest) Offset(offset int32) ApiDetailHostsListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDetailHostsListRequest) Limit(limit int32) ApiDetailHostsListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDetailHostsListRequest) PageToken(pageToken string) ApiDetailHostsListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDetailHostsListRequest) Fields(fields string) ApiDetailHostsListRequest { r.fields = &fields return r @@ -117,24 +116,25 @@ func (r ApiDetailHostsListRequest) Execute() (*InfraListDetailHostsResponse, *ht /* DetailHostsList List all the Hosts along with its associated Services (applications). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailHostsListRequest */ func (a *DetailAPIService) DetailHostsList(ctx context.Context) ApiDetailHostsListRequest { return ApiDetailHostsListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraListDetailHostsResponse +// +// @return InfraListDetailHostsResponse func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListDetailHostsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListDetailHostsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DetailAPIService.DetailHostsList") @@ -234,49 +234,49 @@ func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) ( } type ApiDetailServicesListRequest struct { - ctx context.Context + ctx context.Context ApiService DetailAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDetailServicesListRequest) Filter(filter string) ApiDetailServicesListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDetailServicesListRequest) OrderBy(orderBy string) ApiDetailServicesListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDetailServicesListRequest) Offset(offset int32) ApiDetailServicesListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDetailServicesListRequest) Limit(limit int32) ApiDetailServicesListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDetailServicesListRequest) PageToken(pageToken string) ApiDetailServicesListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDetailServicesListRequest) Fields(fields string) ApiDetailServicesListRequest { r.fields = &fields return r @@ -301,24 +301,25 @@ func (r ApiDetailServicesListRequest) Execute() (*InfraListDetailServicesRespons /* DetailServicesList List all the Services (applications) along with its associated Hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailServicesListRequest */ func (a *DetailAPIService) DetailServicesList(ctx context.Context) ApiDetailServicesListRequest { return ApiDetailServicesListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraListDetailServicesResponse +// +// @return InfraListDetailServicesResponse func (a *DetailAPIService) DetailServicesListExecute(r ApiDetailServicesListRequest) (*InfraListDetailServicesResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListDetailServicesResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListDetailServicesResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DetailAPIService.DetailServicesList") diff --git a/infra_mgmt/api_hosts.go b/infra_mgmt/api_hosts.go index 9c763b5..159f42a 100644 --- a/infra_mgmt/api_hosts.go +++ b/infra_mgmt/api_hosts.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -18,20 +18,19 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type HostsAPI interface { /* - HostsAssignTags Assign tags for list of hosts. + HostsAssignTags Assign tags for list of hosts. - Validation: -- "ids" is required. -- "tags" is required. + Validation: + - "ids" is required. + - "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest @@ -39,13 +38,13 @@ type HostsAPI interface { // @return map[string]interface{} HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) /* - HostsCreate Create a Host resource. + HostsCreate Create a Host resource. - Validation: -- "display_name" is required and should be unique. + Validation: + - "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ HostsCreate(ctx context.Context) ApiHostsCreateRequest @@ -53,27 +52,27 @@ type HostsAPI interface { // @return InfraCreateHostResponse HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) /* - HostsDelete Delete a Host resource. + HostsDelete Delete a Host resource. - Validation: -- "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest // HostsDeleteExecute executes the request HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Response, error) /* - HostsDisconnect Disconnect a Host by resource ID. + HostsDisconnect Disconnect a Host by resource ID. - The user can disconnect the host from the cloud (for example, if in case a host is compromised). + The user can disconnect the host from the cloud (for example, if in case a host is compromised). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDisconnectRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDisconnectRequest */ HostsDisconnect(ctx context.Context, id string) ApiHostsDisconnectRequest @@ -81,10 +80,10 @@ type HostsAPI interface { // @return map[string]interface{} HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) /* - HostsList List all the Host resources for an account. + HostsList List all the Host resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsListRequest */ HostsList(ctx context.Context) ApiHostsListRequest @@ -92,14 +91,14 @@ type HostsAPI interface { // @return InfraListHostResponse HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) /* - HostsRead Get a Host resource. + HostsRead Get a Host resource. - Validation: -- "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ HostsRead(ctx context.Context, id string) ApiHostsReadRequest @@ -107,12 +106,12 @@ type HostsAPI interface { // @return InfraGetHostResponse HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) /* - HostsReplace Migrate a Host's configuration from one to another. + HostsReplace Migrate a Host's configuration from one to another. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fromResourceId An application specific resource identity of a resource - @param toResourceId An application specific resource identity of a resource - @return ApiHostsReplaceRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fromResourceId An application specific resource identity of a resource + @param toResourceId An application specific resource identity of a resource + @return ApiHostsReplaceRequest */ HostsReplace(ctx context.Context, fromResourceId string, toResourceId string) ApiHostsReplaceRequest @@ -120,14 +119,14 @@ type HostsAPI interface { // @return map[string]interface{} HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) /* - HostsUnassignTags Unassign tag for the list hosts. + HostsUnassignTags Unassign tag for the list hosts. - Validation: -- "ids" is required. -- "keys" is required. + Validation: + - "ids" is required. + - "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest @@ -135,16 +134,16 @@ type HostsAPI interface { // @return map[string]interface{} HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) /* - HostsUpdate Update a Host resource. + HostsUpdate Update a Host resource. - Validation: -- "id" is required. -- "display_name" is required and should be unique. -- "pool_id" is required. + Validation: + - "id" is required. + - "display_name" is required and should be unique. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest @@ -157,9 +156,9 @@ type HostsAPI interface { type HostsAPIService internal.Service type ApiHostsAssignTagsRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - body *InfraAssignTagsRequest + body *InfraAssignTagsRequest } func (r ApiHostsAssignTagsRequest) Body(body InfraAssignTagsRequest) ApiHostsAssignTagsRequest { @@ -178,24 +177,25 @@ Validation: - "ids" is required. - "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ func (a *HostsAPIService) HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest { return ApiHostsAssignTagsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsAssignTags") @@ -229,16 +229,16 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -284,9 +284,9 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m } type ApiHostsCreateRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - body *InfraHost + body *InfraHost } func (r ApiHostsCreateRequest) Body(body InfraHost) ApiHostsCreateRequest { @@ -304,24 +304,25 @@ HostsCreate Create a Host resource. Validation: - "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ func (a *HostsAPIService) HostsCreate(ctx context.Context) ApiHostsCreateRequest { return ApiHostsCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraCreateHostResponse +// +// @return InfraCreateHostResponse func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraCreateHostResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraCreateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsCreate") @@ -355,16 +356,16 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -410,9 +411,9 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre } type ApiHostsDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string + id string } func (r ApiHostsDeleteRequest) Execute() (*http.Response, error) { @@ -425,24 +426,24 @@ HostsDelete Delete a Host resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ func (a *HostsAPIService) HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest { return ApiHostsDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *HostsAPIService) HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsDelete") @@ -514,10 +515,10 @@ func (a *HostsAPIService) HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Res } type ApiHostsDisconnectRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string - body *InfraDisconnectRequest + id string + body *InfraDisconnectRequest } func (r ApiHostsDisconnectRequest) Body(body InfraDisconnectRequest) ApiHostsDisconnectRequest { @@ -534,26 +535,27 @@ HostsDisconnect Disconnect a Host by resource ID. The user can disconnect the host from the cloud (for example, if in case a host is compromised). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDisconnectRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDisconnectRequest */ func (a *HostsAPIService) HostsDisconnect(ctx context.Context, id string) ApiHostsDisconnectRequest { return ApiHostsDisconnectRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsDisconnect") @@ -588,8 +590,8 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -635,49 +637,49 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m } type ApiHostsListRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHostsListRequest) Filter(filter string) ApiHostsListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHostsListRequest) OrderBy(orderBy string) ApiHostsListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHostsListRequest) Offset(offset int32) ApiHostsListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHostsListRequest) Limit(limit int32) ApiHostsListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHostsListRequest) PageToken(pageToken string) ApiHostsListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostsListRequest) Fields(fields string) ApiHostsListRequest { r.fields = &fields return r @@ -702,24 +704,25 @@ func (r ApiHostsListRequest) Execute() (*InfraListHostResponse, *http.Response, /* HostsList List all the Host resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsListRequest */ func (a *HostsAPIService) HostsList(ctx context.Context) ApiHostsListRequest { return ApiHostsListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraListHostResponse +// +// @return InfraListHostResponse func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsList") @@ -819,9 +822,9 @@ func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHos } type ApiHostsReadRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string + id string } func (r ApiHostsReadRequest) Execute() (*InfraGetHostResponse, *http.Response, error) { @@ -834,26 +837,27 @@ HostsRead Get a Host resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ func (a *HostsAPIService) HostsRead(ctx context.Context, id string) ApiHostsReadRequest { return ApiHostsReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return InfraGetHostResponse +// +// @return InfraGetHostResponse func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraGetHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraGetHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsRead") @@ -930,11 +934,11 @@ func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHost } type ApiHostsReplaceRequest struct { - ctx context.Context - ApiService HostsAPI + ctx context.Context + ApiService HostsAPI fromResourceId string - toResourceId string - body *InfraReplaceHostRequest + toResourceId string + body *InfraReplaceHostRequest } func (r ApiHostsReplaceRequest) Body(body InfraReplaceHostRequest) ApiHostsReplaceRequest { @@ -949,28 +953,29 @@ func (r ApiHostsReplaceRequest) Execute() (map[string]interface{}, *http.Respons /* HostsReplace Migrate a Host's configuration from one to another. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fromResourceId An application specific resource identity of a resource - @param toResourceId An application specific resource identity of a resource - @return ApiHostsReplaceRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fromResourceId An application specific resource identity of a resource + @param toResourceId An application specific resource identity of a resource + @return ApiHostsReplaceRequest */ func (a *HostsAPIService) HostsReplace(ctx context.Context, fromResourceId string, toResourceId string) ApiHostsReplaceRequest { return ApiHostsReplaceRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, fromResourceId: fromResourceId, - toResourceId: toResourceId, + toResourceId: toResourceId, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsReplace") @@ -1006,8 +1011,8 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -1053,9 +1058,9 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str } type ApiHostsUnassignTagsRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - body *InfraUnassignTagsRequest + body *InfraUnassignTagsRequest } func (r ApiHostsUnassignTagsRequest) Body(body InfraUnassignTagsRequest) ApiHostsUnassignTagsRequest { @@ -1074,24 +1079,25 @@ Validation: - "ids" is required. - "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ func (a *HostsAPIService) HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest { return ApiHostsUnassignTagsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsUnassignTags") @@ -1125,8 +1131,8 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -1172,10 +1178,10 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest } type ApiHostsUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HostsAPI - id string - body *InfraHost + id string + body *InfraHost } func (r ApiHostsUpdateRequest) Body(body InfraHost) ApiHostsUpdateRequest { @@ -1195,26 +1201,27 @@ Validation: - "display_name" is required and should be unique. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ func (a *HostsAPIService) HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest { return ApiHostsUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return InfraUpdateHostResponse +// +// @return InfraUpdateHostResponse func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpdateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraUpdateHostResponse + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraUpdateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HostsAPIService.HostsUpdate") @@ -1249,16 +1256,16 @@ func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpd if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_mgmt/api_services.go b/infra_mgmt/api_services.go index 90e0b0b..0de1c2d 100644 --- a/infra_mgmt/api_services.go +++ b/infra_mgmt/api_services.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -18,18 +18,17 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ServicesAPI interface { /* - ServicesApplications List applications (Service types) for a particular account. + ServicesApplications List applications (Service types) for a particular account. - Used in order to retrieve available applications (Service types) for a particular account. + Used in order to retrieve available applications (Service types) for a particular account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesApplicationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesApplicationsRequest */ ServicesApplications(ctx context.Context) ApiServicesApplicationsRequest @@ -37,15 +36,15 @@ type ServicesAPI interface { // @return InfraApplicationsResponse ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) /* - ServicesCreate Create a Service resource. + ServicesCreate Create a Service resource. - Validation: -- "name" is required and should be unique. -- "service_type" is required. -- "pool_id" is required. + Validation: + - "name" is required and should be unique. + - "service_type" is required. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ ServicesCreate(ctx context.Context) ApiServicesCreateRequest @@ -53,24 +52,24 @@ type ServicesAPI interface { // @return InfraCreateServiceResponse ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) /* - ServicesDelete Delete a Service resource. + ServicesDelete Delete a Service resource. - Validation: -- "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest // ServicesDeleteExecute executes the request ServicesDeleteExecute(r ApiServicesDeleteRequest) (*http.Response, error) /* - ServicesList List all the Service resources for an account. + ServicesList List all the Service resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesListRequest */ ServicesList(ctx context.Context) ApiServicesListRequest @@ -78,14 +77,14 @@ type ServicesAPI interface { // @return InfraListServiceResponse ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) /* - ServicesRead Read a Service resource. + ServicesRead Read a Service resource. - Validation: -- "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ ServicesRead(ctx context.Context, id string) ApiServicesReadRequest @@ -93,17 +92,17 @@ type ServicesAPI interface { // @return InfraGetServiceResponse ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) /* - ServicesUpdate Update a Service resource. + ServicesUpdate Update a Service resource. - Validation: -- "id" is required. -- "name" is required and should be unique. -- "service_type" is required. -- "pool_id" is required. + Validation: + - "id" is required. + - "name" is required and should be unique. + - "service_type" is required. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest @@ -116,9 +115,9 @@ type ServicesAPI interface { type ServicesAPIService internal.Service type ApiServicesApplicationsRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - accountId *string + accountId *string } // Account ID. @@ -136,24 +135,25 @@ ServicesApplications List applications (Service types) for a particular account. Used in order to retrieve available applications (Service types) for a particular account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesApplicationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesApplicationsRequest */ func (a *ServicesAPIService) ServicesApplications(ctx context.Context) ApiServicesApplicationsRequest { return ApiServicesApplicationsRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraApplicationsResponse +// +// @return InfraApplicationsResponse func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraApplicationsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraApplicationsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesApplications") @@ -232,9 +232,9 @@ func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicatio } type ApiServicesCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - body *InfraService + body *InfraService } func (r ApiServicesCreateRequest) Body(body InfraService) ApiServicesCreateRequest { @@ -254,24 +254,25 @@ Validation: - "service_type" is required. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ func (a *ServicesAPIService) ServicesCreate(ctx context.Context) ApiServicesCreateRequest { return ApiServicesCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraCreateServiceResponse +// +// @return InfraCreateServiceResponse func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraCreateServiceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraCreateServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesCreate") @@ -305,16 +306,16 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -360,9 +361,9 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( } type ApiServicesDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - id string + id string } func (r ApiServicesDeleteRequest) Execute() (*http.Response, error) { @@ -375,24 +376,24 @@ ServicesDelete Delete a Service resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ func (a *ServicesAPIService) ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest { return ApiServicesDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ServicesAPIService) ServicesDeleteExecute(r ApiServicesDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesDelete") @@ -464,49 +465,49 @@ func (a *ServicesAPIService) ServicesDeleteExecute(r ApiServicesDeleteRequest) ( } type ApiServicesListRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - fields *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + fields *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServicesListRequest) Filter(filter string) ApiServicesListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServicesListRequest) OrderBy(orderBy string) ApiServicesListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServicesListRequest) Offset(offset int32) ApiServicesListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServicesListRequest) Limit(limit int32) ApiServicesListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServicesListRequest) PageToken(pageToken string) ApiServicesListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServicesListRequest) Fields(fields string) ApiServicesListRequest { r.fields = &fields return r @@ -531,24 +532,25 @@ func (r ApiServicesListRequest) Execute() (*InfraListServiceResponse, *http.Resp /* ServicesList List all the Service resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesListRequest */ func (a *ServicesAPIService) ServicesList(ctx context.Context) ApiServicesListRequest { return ApiServicesListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return InfraListServiceResponse +// +// @return InfraListServiceResponse func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraListServiceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraListServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesList") @@ -648,9 +650,9 @@ func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*Inf } type ApiServicesReadRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - id string + id string } func (r ApiServicesReadRequest) Execute() (*InfraGetServiceResponse, *http.Response, error) { @@ -663,26 +665,27 @@ ServicesRead Read a Service resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ func (a *ServicesAPIService) ServicesRead(ctx context.Context, id string) ApiServicesReadRequest { return ApiServicesReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return InfraGetServiceResponse +// +// @return InfraGetServiceResponse func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraGetServiceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraGetServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesRead") @@ -759,10 +762,10 @@ func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*Inf } type ApiServicesUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ServicesAPI - id string - body *InfraService + id string + body *InfraService } func (r ApiServicesUpdateRequest) Body(body InfraService) ApiServicesUpdateRequest { @@ -783,26 +786,27 @@ Validation: - "service_type" is required. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ func (a *ServicesAPIService) ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest { return ApiServicesUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return InfraUpdateServiceResponse +// +// @return InfraUpdateServiceResponse func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) (*InfraUpdateServiceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *InfraUpdateServiceResponse + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *InfraUpdateServiceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServicesAPIService.ServicesUpdate") @@ -837,16 +841,16 @@ func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_mgmt/client.go b/infra_mgmt/client.go index 8b6562e..5f9de49 100644 --- a/infra_mgmt/client.go +++ b/infra_mgmt/client.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package infra_mgmt import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/infra/v1" @@ -19,11 +19,11 @@ var ServiceBasePath = "/api/infra/v1" // APIClient manages communication with the Infrastructure Management API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - DetailAPI DetailAPI - HostsAPI HostsAPI + DetailAPI DetailAPI + HostsAPI HostsAPI ServicesAPI ServicesAPI } @@ -31,7 +31,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.DetailAPI = (*DetailAPIService)(&c.Common) diff --git a/infra_mgmt/model_api_page_info.go b/infra_mgmt/model_api_page_info.go index 8c12daf..b038f4a 100644 --- a/infra_mgmt/model_api_page_info.go +++ b/infra_mgmt/model_api_page_info.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -141,7 +141,7 @@ func (o *ApiPageInfo) SetSize(v int32) { } func (o ApiPageInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableApiPageInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_applications.go b/infra_mgmt/model_infra_applications.go index 48c7086..fb39675 100644 --- a/infra_mgmt/model_infra_applications.go +++ b/infra_mgmt/model_infra_applications.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraApplications) SetApplications(v []string) { } func (o InfraApplications) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraApplications) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_applications_response.go b/infra_mgmt/model_infra_applications_response.go index 302b407..9dd9f32 100644 --- a/infra_mgmt/model_infra_applications_response.go +++ b/infra_mgmt/model_infra_applications_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraApplicationsResponse) SetResults(v InfraApplications) { } func (o InfraApplicationsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraApplicationsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_assign_tags_request.go b/infra_mgmt/model_infra_assign_tags_request.go index 2f3a060..ee77638 100644 --- a/infra_mgmt/model_infra_assign_tags_request.go +++ b/infra_mgmt/model_infra_assign_tags_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -20,9 +20,9 @@ var _ MappedNullable = &InfraAssignTagsRequest{} // InfraAssignTagsRequest struct for InfraAssignTagsRequest type InfraAssignTagsRequest struct { // The resource identifier. - Ids []string `json:"ids,omitempty"` - Override *bool `json:"override,omitempty"` - Tags map[string]interface{} `json:"tags,omitempty"` + Ids []string `json:"ids,omitempty"` + Override *bool `json:"override,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` } // NewInfraAssignTagsRequest instantiates a new InfraAssignTagsRequest object @@ -139,7 +139,7 @@ func (o *InfraAssignTagsRequest) SetTags(v map[string]interface{}) { } func (o InfraAssignTagsRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -195,5 +195,3 @@ func (v *NullableInfraAssignTagsRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_create_host_response.go b/infra_mgmt/model_infra_create_host_response.go index bb51565..aae5b74 100644 --- a/infra_mgmt/model_infra_create_host_response.go +++ b/infra_mgmt/model_infra_create_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraCreateHostResponse) SetResult(v InfraHost) { } func (o InfraCreateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraCreateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_create_service_response.go b/infra_mgmt/model_infra_create_service_response.go index 0da0945..5d12e15 100644 --- a/infra_mgmt/model_infra_create_service_response.go +++ b/infra_mgmt/model_infra_create_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraCreateServiceResponse) SetResult(v InfraService) { } func (o InfraCreateServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraCreateServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_detail_host.go b/infra_mgmt/model_infra_detail_host.go index f39d0e5..23c91b7 100644 --- a/infra_mgmt/model_infra_detail_host.go +++ b/infra_mgmt/model_infra_detail_host.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -23,8 +23,8 @@ type InfraDetailHost struct { // Composite Status of this Host (`online`, `degraded`, `error`, `offline`, `pending`, `awaiting approval`). CompositeStatus *string `json:"composite_status,omitempty"` // The list of Host-specific configurations for each Service deployed on this Host. - Configs []InfraDetailHostServiceConfig `json:"configs,omitempty"` - ConnectivityMonitor map[string]interface{} `json:"connectivity_monitor,omitempty"` + Configs []InfraDetailHostServiceConfig `json:"configs,omitempty"` + ConnectivityMonitor map[string]interface{} `json:"connectivity_monitor,omitempty"` // The timestamp of creation of Host. CreatedAt *time.Time `json:"created_at,omitempty"` // The description of the Host. @@ -33,7 +33,7 @@ type InfraDetailHost struct { DisplayName *string `json:"display_name,omitempty"` // The sub-type of a specific Host type. Example: For Host type BloxOne Appliance, sub-type could be \"B105\" or \"VEP1425\" HostSubtype *string `json:"host_subtype,omitempty"` - HostType *string `json:"host_type,omitempty"` + HostType *string `json:"host_type,omitempty"` // The version of the Host platform services. HostVersion *string `json:"host_version,omitempty"` // The resource identifier. @@ -43,16 +43,16 @@ type InfraDetailHost struct { // The IP Space of the Host. IpSpace *string `json:"ip_space,omitempty"` // The legacy Host object identifier. - LegacyId *string `json:"legacy_id,omitempty"` + LegacyId *string `json:"legacy_id,omitempty"` Location *InfraDetailLocation `json:"location,omitempty"` // The MAC address of the Host. - MacAddress *string `json:"mac_address,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` MaintenanceMode *string `json:"maintenance_mode,omitempty"` // The NAT IP address of the Host. NatIp *string `json:"nat_ip,omitempty"` // The unique On-Prem Host ID generated by the On-Prem device and assigned to the Host once it is registered and logged into the Infoblox Cloud. - Ophid *string `json:"ophid,omitempty"` - Pool *InfraPoolInfo `json:"pool,omitempty"` + Ophid *string `json:"ophid,omitempty"` + Pool *InfraPoolInfo `json:"pool,omitempty"` // The unique serial number of the Host. SerialNumber *string `json:"serial_number,omitempty"` // The list of Services deployed on this Host. @@ -885,7 +885,7 @@ func (o *InfraDetailHost) SetUpdatedAt(v time.Time) { } func (o InfraDetailHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1007,5 +1007,3 @@ func (v *NullableInfraDetailHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_detail_host_service_config.go b/infra_mgmt/model_infra_detail_host_service_config.go index f8f038b..a6ad087 100644 --- a/infra_mgmt/model_infra_detail_host_service_config.go +++ b/infra_mgmt/model_infra_detail_host_service_config.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -27,8 +27,8 @@ type InfraDetailHostServiceConfig struct { // The name of the Service. ServiceName *string `json:"service_name,omitempty"` // The type of the Service deployed on the Host (`dns`, `cdc`, etc.). - ServiceType *string `json:"service_type,omitempty"` - Status *InfraShortServiceStatus `json:"status,omitempty"` + ServiceType *string `json:"service_type,omitempty"` + Status *InfraShortServiceStatus `json:"status,omitempty"` // The timestamp of the latest upgrade of the Host-specific Service configuration. UpgradedAt *time.Time `json:"upgraded_at,omitempty"` } @@ -243,7 +243,7 @@ func (o *InfraDetailHostServiceConfig) SetUpgradedAt(v time.Time) { } func (o InfraDetailHostServiceConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,5 +308,3 @@ func (v *NullableInfraDetailHostServiceConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_detail_location.go b/infra_mgmt/model_infra_detail_location.go index 083ff6a..91dbcea 100644 --- a/infra_mgmt/model_infra_detail_location.go +++ b/infra_mgmt/model_infra_detail_location.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -209,7 +209,7 @@ func (o *InfraDetailLocation) SetMetadata(v map[string]interface{}) { } func (o InfraDetailLocation) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -271,5 +271,3 @@ func (v *NullableInfraDetailLocation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_detail_service.go b/infra_mgmt/model_infra_detail_service.go index 6f020d5..95bdf23 100644 --- a/infra_mgmt/model_infra_detail_service.go +++ b/infra_mgmt/model_infra_detail_service.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -39,10 +39,10 @@ type InfraDetailService struct { // The resource identifier. Id *string `json:"id,omitempty"` // List of interfaces on which this Service can operate. - InterfaceLabels []string `json:"interface_labels,omitempty"` - Location *InfraDetailLocation `json:"location,omitempty"` + InterfaceLabels []string `json:"interface_labels,omitempty"` + Location *InfraDetailLocation `json:"location,omitempty"` // The name of the Service. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` Pool *InfraPoolInfo `json:"pool,omitempty"` // The type of the Service deployed on the Host (`dns`, `cdc`, etc.). ServiceType *string `json:"service_type,omitempty"` @@ -582,7 +582,7 @@ func (o *InfraDetailService) SetUpdatedAt(v time.Time) { } func (o InfraDetailService) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -677,5 +677,3 @@ func (v *NullableInfraDetailService) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_detail_service_host.go b/infra_mgmt/model_infra_detail_service_host.go index 067ef4b..8edd987 100644 --- a/infra_mgmt/model_infra_detail_service_host.go +++ b/infra_mgmt/model_infra_detail_service_host.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -20,8 +20,8 @@ var _ MappedNullable = &InfraDetailServiceHost{} // InfraDetailServiceHost struct for InfraDetailServiceHost type InfraDetailServiceHost struct { // Composite Status of the Host (`online`, `degraded`, `error`, `offline`, `pending`, `awaiting approval`). - CompositeStatus *string `json:"composite_status,omitempty"` - Config *InfraDetailServiceHostConfig `json:"config,omitempty"` + CompositeStatus *string `json:"composite_status,omitempty"` + Config *InfraDetailServiceHostConfig `json:"config,omitempty"` // The name of the Host (unique). DisplayName *string `json:"display_name,omitempty"` // The resource identifier. @@ -29,7 +29,7 @@ type InfraDetailServiceHost struct { // The IP address of the Host. IpAddress *string `json:"ip_address,omitempty"` // The legacy Host object identifier. - LegacyId *string `json:"legacy_id,omitempty"` + LegacyId *string `json:"legacy_id,omitempty"` MaintenanceMode *string `json:"maintenance_mode,omitempty"` // The unique On-Prem Host ID generated by the On-Prem device and assigned to the Host once it is registered and logged into the Infoblox Cloud. Ophid *string `json:"ophid,omitempty"` @@ -309,7 +309,7 @@ func (o *InfraDetailServiceHost) SetOphid(v string) { } func (o InfraDetailServiceHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -380,5 +380,3 @@ func (v *NullableInfraDetailServiceHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_detail_service_host_config.go b/infra_mgmt/model_infra_detail_service_host_config.go index 1a6089f..45212f5 100644 --- a/infra_mgmt/model_infra_detail_service_host_config.go +++ b/infra_mgmt/model_infra_detail_service_host_config.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -21,9 +21,9 @@ var _ MappedNullable = &InfraDetailServiceHostConfig{} // InfraDetailServiceHostConfig struct for InfraDetailServiceHostConfig type InfraDetailServiceHostConfig struct { // The current version of the Service deployed on the Host. - CurrentVersion *string `json:"current_version,omitempty"` - Status *InfraShortServiceStatus `json:"status,omitempty"` - UpgradedAt *time.Time `json:"upgraded_at,omitempty"` + CurrentVersion *string `json:"current_version,omitempty"` + Status *InfraShortServiceStatus `json:"status,omitempty"` + UpgradedAt *time.Time `json:"upgraded_at,omitempty"` } // NewInfraDetailServiceHostConfig instantiates a new InfraDetailServiceHostConfig object @@ -140,7 +140,7 @@ func (o *InfraDetailServiceHostConfig) SetUpgradedAt(v time.Time) { } func (o InfraDetailServiceHostConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,5 +196,3 @@ func (v *NullableInfraDetailServiceHostConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_disconnect_request.go b/infra_mgmt/model_infra_disconnect_request.go index ba267fa..17e96df 100644 --- a/infra_mgmt/model_infra_disconnect_request.go +++ b/infra_mgmt/model_infra_disconnect_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -73,7 +73,7 @@ func (o *InfraDisconnectRequest) SetId(v string) { } func (o InfraDisconnectRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableInfraDisconnectRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_get_host_response.go b/infra_mgmt/model_infra_get_host_response.go index 59d2ef4..82afb21 100644 --- a/infra_mgmt/model_infra_get_host_response.go +++ b/infra_mgmt/model_infra_get_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraGetHostResponse) SetResult(v InfraHost) { } func (o InfraGetHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraGetHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_get_service_response.go b/infra_mgmt/model_infra_get_service_response.go index 7eab350..9b40323 100644 --- a/infra_mgmt/model_infra_get_service_response.go +++ b/infra_mgmt/model_infra_get_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraGetServiceResponse) SetResult(v InfraService) { } func (o InfraGetServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraGetServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_host.go b/infra_mgmt/model_infra_host.go index 4987fdc..4f30cd6 100644 --- a/infra_mgmt/model_infra_host.go +++ b/infra_mgmt/model_infra_host.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -11,10 +11,10 @@ API version: v1 package infra_mgmt import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the InfraHost type satisfies the MappedNullable interface at compile time @@ -51,7 +51,7 @@ type InfraHost struct { // The resource identifier. LocationId *string `json:"location_id,omitempty"` // The MAC address of the Host. - MacAddress *string `json:"mac_address,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` MaintenanceMode *string `json:"maintenance_mode,omitempty"` // The NAT IP address of the Host. NatIp *string `json:"nat_ip,omitempty"` @@ -852,7 +852,7 @@ func (o *InfraHost) SetUpdatedAt(v time.Time) { } func (o InfraHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -947,10 +947,10 @@ func (o *InfraHost) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1006,5 +1006,3 @@ func (v *NullableInfraHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_list_detail_hosts_response.go b/infra_mgmt/model_infra_list_detail_hosts_response.go index c02d914..02a3af8 100644 --- a/infra_mgmt/model_infra_list_detail_hosts_response.go +++ b/infra_mgmt/model_infra_list_detail_hosts_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,7 +19,7 @@ var _ MappedNullable = &InfraListDetailHostsResponse{} // InfraListDetailHostsResponse struct for InfraListDetailHostsResponse type InfraListDetailHostsResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []InfraDetailHost `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *InfraListDetailHostsResponse) SetResults(v []InfraDetailHost) { } func (o InfraListDetailHostsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableInfraListDetailHostsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_list_detail_services_response.go b/infra_mgmt/model_infra_list_detail_services_response.go index 8d5052a..47a1b49 100644 --- a/infra_mgmt/model_infra_list_detail_services_response.go +++ b/infra_mgmt/model_infra_list_detail_services_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,7 +19,7 @@ var _ MappedNullable = &InfraListDetailServicesResponse{} // InfraListDetailServicesResponse struct for InfraListDetailServicesResponse type InfraListDetailServicesResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []InfraDetailService `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *InfraListDetailServicesResponse) SetResults(v []InfraDetailService) { } func (o InfraListDetailServicesResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableInfraListDetailServicesResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_list_host_response.go b/infra_mgmt/model_infra_list_host_response.go index b33f8ba..c7d23c3 100644 --- a/infra_mgmt/model_infra_list_host_response.go +++ b/infra_mgmt/model_infra_list_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,8 +19,8 @@ var _ MappedNullable = &InfraListHostResponse{} // InfraListHostResponse struct for InfraListHostResponse type InfraListHostResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` - Results []InfraHost `json:"results,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` + Results []InfraHost `json:"results,omitempty"` } // NewInfraListHostResponse instantiates a new InfraListHostResponse object @@ -105,7 +105,7 @@ func (o *InfraListHostResponse) SetResults(v []InfraHost) { } func (o InfraListHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableInfraListHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_list_service_response.go b/infra_mgmt/model_infra_list_service_response.go index cd671e5..5368ffb 100644 --- a/infra_mgmt/model_infra_list_service_response.go +++ b/infra_mgmt/model_infra_list_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -19,7 +19,7 @@ var _ MappedNullable = &InfraListServiceResponse{} // InfraListServiceResponse struct for InfraListServiceResponse type InfraListServiceResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []InfraService `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *InfraListServiceResponse) SetResults(v []InfraService) { } func (o InfraListServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableInfraListServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_pool_info.go b/infra_mgmt/model_infra_pool_info.go index 7b5158e..f0d1c12 100644 --- a/infra_mgmt/model_infra_pool_info.go +++ b/infra_mgmt/model_infra_pool_info.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -141,7 +141,7 @@ func (o *InfraPoolInfo) SetPoolName(v string) { } func (o InfraPoolInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableInfraPoolInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_replace_host_request.go b/infra_mgmt/model_infra_replace_host_request.go index 9d3a6da..14fd61a 100644 --- a/infra_mgmt/model_infra_replace_host_request.go +++ b/infra_mgmt/model_infra_replace_host_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -107,7 +107,7 @@ func (o *InfraReplaceHostRequest) SetTo(v string) { } func (o InfraReplaceHostRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableInfraReplaceHostRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_service.go b/infra_mgmt/model_infra_service.go index 5b0c180..e6e7e35 100644 --- a/infra_mgmt/model_infra_service.go +++ b/infra_mgmt/model_infra_service.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -11,10 +11,10 @@ API version: v1 package infra_mgmt import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the InfraService type satisfies the MappedNullable interface at compile time @@ -431,7 +431,7 @@ func (o *InfraService) SetUpdatedAt(v time.Time) { } func (o InfraService) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -488,10 +488,10 @@ func (o *InfraService) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -547,5 +547,3 @@ func (v *NullableInfraService) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_service_host_config.go b/infra_mgmt/model_infra_service_host_config.go index b183662..7478916 100644 --- a/infra_mgmt/model_infra_service_host_config.go +++ b/infra_mgmt/model_infra_service_host_config.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -278,7 +278,7 @@ func (o *InfraServiceHostConfig) SetUpgradedAt(v time.Time) { } func (o InfraServiceHostConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -346,5 +346,3 @@ func (v *NullableInfraServiceHostConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_short_service_status.go b/infra_mgmt/model_infra_short_service_status.go index cba90c9..058694e 100644 --- a/infra_mgmt/model_infra_short_service_status.go +++ b/infra_mgmt/model_infra_short_service_status.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -142,7 +142,7 @@ func (o *InfraShortServiceStatus) SetUpdatedAt(v time.Time) { } func (o InfraShortServiceStatus) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -198,5 +198,3 @@ func (v *NullableInfraShortServiceStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_unassign_tags_request.go b/infra_mgmt/model_infra_unassign_tags_request.go index 441a032..06d4f97 100644 --- a/infra_mgmt/model_infra_unassign_tags_request.go +++ b/infra_mgmt/model_infra_unassign_tags_request.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -20,7 +20,7 @@ var _ MappedNullable = &InfraUnassignTagsRequest{} // InfraUnassignTagsRequest struct for InfraUnassignTagsRequest type InfraUnassignTagsRequest struct { // The resource identifier. - Ids []string `json:"ids,omitempty"` + Ids []string `json:"ids,omitempty"` Keys []string `json:"keys,omitempty"` } @@ -106,7 +106,7 @@ func (o *InfraUnassignTagsRequest) SetKeys(v []string) { } func (o InfraUnassignTagsRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,5 +159,3 @@ func (v *NullableInfraUnassignTagsRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_update_host_response.go b/infra_mgmt/model_infra_update_host_response.go index 9098325..c672f41 100644 --- a/infra_mgmt/model_infra_update_host_response.go +++ b/infra_mgmt/model_infra_update_host_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraUpdateHostResponse) SetResult(v InfraHost) { } func (o InfraUpdateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraUpdateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/model_infra_update_service_response.go b/infra_mgmt/model_infra_update_service_response.go index 7d5bfe2..8022ecb 100644 --- a/infra_mgmt/model_infra_update_service_response.go +++ b/infra_mgmt/model_infra_update_service_response.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -72,7 +72,7 @@ func (o *InfraUpdateServiceResponse) SetResult(v InfraService) { } func (o InfraUpdateServiceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableInfraUpdateServiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/utils.go b/infra_mgmt/utils.go index d25ee9d..55d2f04 100644 --- a/infra_mgmt/utils.go +++ b/infra_mgmt/utils.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ diff --git a/infra_provision/api_ui_join_token.go b/infra_provision/api_ui_join_token.go index 756686a..7b25b49 100644 --- a/infra_provision/api_ui_join_token.go +++ b/infra_provision/api_ui_join_token.go @@ -18,20 +18,19 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type UIJoinTokenAPI interface { /* - UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. + UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. - Validation: -- "name" is required and should be unique. -- "description" is optioanl. + Validation: + - "name" is required and should be unique. + - "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest @@ -39,33 +38,33 @@ type UIJoinTokenAPI interface { // @return HostactivationCreateJoinTokenResponse UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) /* - UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. + UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenDeleteRequest */ UIJoinTokenDelete(ctx context.Context, id string) ApiUIJoinTokenDeleteRequest // UIJoinTokenDeleteExecute executes the request UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteRequest) (*http.Response, error) /* - UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. + UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenDeleteSetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenDeleteSetRequest */ UIJoinTokenDeleteSet(ctx context.Context) ApiUIJoinTokenDeleteSetRequest // UIJoinTokenDeleteSetExecute executes the request UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDeleteSetRequest) (*http.Response, error) /* - UIJoinTokenList User can list the join tokens for an account. + UIJoinTokenList User can list the join tokens for an account. - Both active and revoked join tokens are listed by default. + Both active and revoked join tokens are listed by default. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenListRequest */ UIJoinTokenList(ctx context.Context) ApiUIJoinTokenListRequest @@ -73,11 +72,11 @@ type UIJoinTokenAPI interface { // @return HostactivationListJoinTokenResponse UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) /* - UIJoinTokenRead User can get the join token providing its resource id in the parameter. + UIJoinTokenRead User can get the join token providing its resource id in the parameter. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenReadRequest */ UIJoinTokenRead(ctx context.Context, id string) ApiUIJoinTokenReadRequest @@ -85,15 +84,15 @@ type UIJoinTokenAPI interface { // @return HostactivationReadJoinTokenResponse UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) /* - UIJoinTokenUpdate User can modify the tags or expiration time of a join token. + UIJoinTokenUpdate User can modify the tags or expiration time of a join token. - Validation: Following fields is needed. Provide what needs to be -- "expires_at" -- "tags" + Validation: Following fields is needed. Provide what needs to be + - "expires_at" + - "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest @@ -106,9 +105,9 @@ type UIJoinTokenAPI interface { type UIJoinTokenAPIService internal.Service type ApiUIJoinTokenCreateRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - body *HostactivationJoinToken + body *HostactivationJoinToken } func (r ApiUIJoinTokenCreateRequest) Body(body HostactivationJoinToken) ApiUIJoinTokenCreateRequest { @@ -127,24 +126,25 @@ Validation: - "name" is required and should be unique. - "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest { return ApiUIJoinTokenCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return HostactivationCreateJoinTokenResponse +// +// @return HostactivationCreateJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationCreateJoinTokenResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationCreateJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenCreate") @@ -178,16 +178,16 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -233,9 +233,9 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR } type ApiUIJoinTokenDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - id string + id string } func (r ApiUIJoinTokenDeleteRequest) Execute() (*http.Response, error) { @@ -245,24 +245,24 @@ func (r ApiUIJoinTokenDeleteRequest) Execute() (*http.Response, error) { /* UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenDeleteRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenDelete(ctx context.Context, id string) ApiUIJoinTokenDeleteRequest { return ApiUIJoinTokenDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *UIJoinTokenAPIService) UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenDelete") @@ -334,9 +334,9 @@ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteR } type ApiUIJoinTokenDeleteSetRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - body *HostactivationDeleteJoinTokensRequest + body *HostactivationDeleteJoinTokensRequest } func (r ApiUIJoinTokenDeleteSetRequest) Body(body HostactivationDeleteJoinTokensRequest) ApiUIJoinTokenDeleteSetRequest { @@ -351,22 +351,22 @@ func (r ApiUIJoinTokenDeleteSetRequest) Execute() (*http.Response, error) { /* UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenDeleteSetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenDeleteSetRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSet(ctx context.Context) ApiUIJoinTokenDeleteSetRequest { return ApiUIJoinTokenDeleteSetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDeleteSetRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenDeleteSet") @@ -400,8 +400,8 @@ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDele if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -442,42 +442,42 @@ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDele } type ApiUIJoinTokenListRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiUIJoinTokenListRequest) Filter(filter string) ApiUIJoinTokenListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiUIJoinTokenListRequest) OrderBy(orderBy string) ApiUIJoinTokenListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiUIJoinTokenListRequest) Offset(offset int32) ApiUIJoinTokenListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiUIJoinTokenListRequest) Limit(limit int32) ApiUIJoinTokenListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiUIJoinTokenListRequest) PageToken(pageToken string) ApiUIJoinTokenListRequest { r.pageToken = &pageToken return r @@ -504,24 +504,25 @@ UIJoinTokenList User can list the join tokens for an account. Both active and revoked join tokens are listed by default. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenListRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenList(ctx context.Context) ApiUIJoinTokenListRequest { return ApiUIJoinTokenListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return HostactivationListJoinTokenResponse +// +// @return HostactivationListJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationListJoinTokenResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationListJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenList") @@ -618,13 +619,13 @@ func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListReque } type ApiUIJoinTokenReadRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiUIJoinTokenReadRequest) Fields(fields string) ApiUIJoinTokenReadRequest { r.fields = &fields return r @@ -637,26 +638,27 @@ func (r ApiUIJoinTokenReadRequest) Execute() (*HostactivationReadJoinTokenRespon /* UIJoinTokenRead User can get the join token providing its resource id in the parameter. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenReadRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenRead(ctx context.Context, id string) ApiUIJoinTokenReadRequest { return ApiUIJoinTokenReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return HostactivationReadJoinTokenResponse +// +// @return HostactivationReadJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationReadJoinTokenResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationReadJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenRead") @@ -736,10 +738,10 @@ func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadReque } type ApiUIJoinTokenUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService UIJoinTokenAPI - id string - body *HostactivationJoinToken + id string + body *HostactivationJoinToken } func (r ApiUIJoinTokenUpdateRequest) Body(body HostactivationJoinToken) ApiUIJoinTokenUpdateRequest { @@ -758,26 +760,27 @@ Validation: Following fields is needed. Provide what needs to be - "expires_at" - "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest { return ApiUIJoinTokenUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return HostactivationUpdateJoinTokenResponse +// +// @return HostactivationUpdateJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateRequest) (*HostactivationUpdateJoinTokenResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationUpdateJoinTokenResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationUpdateJoinTokenResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UIJoinTokenAPIService.UIJoinTokenUpdate") @@ -812,16 +815,16 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_provision/api_uicsr.go b/infra_provision/api_uicsr.go index 3c2e967..70c6546 100644 --- a/infra_provision/api_uicsr.go +++ b/infra_provision/api_uicsr.go @@ -18,17 +18,16 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type UICSRAPI interface { /* - UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. + UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRApproveRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRApproveRequest */ UICSRApprove(ctx context.Context, activationCode string) ApiUICSRApproveRequest @@ -36,11 +35,11 @@ type UICSRAPI interface { // @return map[string]interface{} UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) /* - UICSRDeny Marks the certificate signing request as denied. + UICSRDeny Marks the certificate signing request as denied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRDenyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRDenyRequest */ UICSRDeny(ctx context.Context, activationCode string) ApiUICSRDenyRequest @@ -48,10 +47,10 @@ type UICSRAPI interface { // @return map[string]interface{} UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) /* - UICSRList User can list the certificate signing requests for an account. + UICSRList User can list the certificate signing requests for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUICSRListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUICSRListRequest */ UICSRList(ctx context.Context) ApiUICSRListRequest @@ -59,16 +58,16 @@ type UICSRAPI interface { // @return HostactivationListCSRsResponse UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) /* - UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). -Validation: -- one of "cert_serial" or "ophid" should be provided -- "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). + Validation: + - one of "cert_serial" or "ophid" should be provided + - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest @@ -76,16 +75,16 @@ Validation: // @return map[string]interface{} UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) /* - UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). -Validation: -- one of "cert_serial" or "ophid" should be provided -- "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). + Validation: + - one of "cert_serial" or "ophid" should be provided + - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request @@ -98,10 +97,10 @@ Validation: type UICSRAPIService internal.Service type ApiUICSRApproveRequest struct { - ctx context.Context - ApiService UICSRAPI + ctx context.Context + ApiService UICSRAPI activationCode string - body *HostactivationApproveCSRRequest + body *HostactivationApproveCSRRequest } func (r ApiUICSRApproveRequest) Body(body HostactivationApproveCSRRequest) ApiUICSRApproveRequest { @@ -116,26 +115,27 @@ func (r ApiUICSRApproveRequest) Execute() (map[string]interface{}, *http.Respons /* UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRApproveRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRApproveRequest */ func (a *UICSRAPIService) UICSRApprove(ctx context.Context, activationCode string) ApiUICSRApproveRequest { return ApiUICSRApproveRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, activationCode: activationCode, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRApprove") @@ -170,8 +170,8 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -217,10 +217,10 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str } type ApiUICSRDenyRequest struct { - ctx context.Context - ApiService UICSRAPI + ctx context.Context + ApiService UICSRAPI activationCode string - body *HostactivationDenyCSRRequest + body *HostactivationDenyCSRRequest } func (r ApiUICSRDenyRequest) Body(body HostactivationDenyCSRRequest) ApiUICSRDenyRequest { @@ -235,26 +235,27 @@ func (r ApiUICSRDenyRequest) Execute() (map[string]interface{}, *http.Response, /* UICSRDeny Marks the certificate signing request as denied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRDenyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRDenyRequest */ func (a *UICSRAPIService) UICSRDeny(ctx context.Context, activationCode string) ApiUICSRDenyRequest { return ApiUICSRDenyRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, activationCode: activationCode, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRDeny") @@ -289,8 +290,8 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -336,42 +337,42 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in } type ApiUICSRListRequest struct { - ctx context.Context + ctx context.Context ApiService UICSRAPI - filter *string - orderBy *string - offset *int32 - limit *int32 - pageToken *string - tfilter *string - torderBy *string + filter *string + orderBy *string + offset *int32 + limit *int32 + pageToken *string + tfilter *string + torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiUICSRListRequest) Filter(filter string) ApiUICSRListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiUICSRListRequest) OrderBy(orderBy string) ApiUICSRListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiUICSRListRequest) Offset(offset int32) ApiUICSRListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiUICSRListRequest) Limit(limit int32) ApiUICSRListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiUICSRListRequest) PageToken(pageToken string) ApiUICSRListRequest { r.pageToken = &pageToken return r @@ -396,24 +397,25 @@ func (r ApiUICSRListRequest) Execute() (*HostactivationListCSRsResponse, *http.R /* UICSRList User can list the certificate signing requests for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUICSRListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUICSRListRequest */ func (a *UICSRAPIService) UICSRList(ctx context.Context) ApiUICSRListRequest { return ApiUICSRListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return HostactivationListCSRsResponse +// +// @return HostactivationListCSRsResponse func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *HostactivationListCSRsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *HostactivationListCSRsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRList") @@ -510,10 +512,10 @@ func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*Hostactivati } type ApiUICSRRevokeRequest struct { - ctx context.Context + ctx context.Context ApiService UICSRAPI certSerial string - body *HostactivationRevokeCertRequest + body *HostactivationRevokeCertRequest } func (r ApiUICSRRevokeRequest) Body(body HostactivationRevokeCertRequest) ApiUICSRRevokeRequest { @@ -533,26 +535,27 @@ Validation: - one of "cert_serial" or "ophid" should be provided - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ func (a *UICSRAPIService) UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest { return ApiUICSRRevokeRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, certSerial: certSerial, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRRevoke") @@ -587,8 +590,8 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -634,10 +637,10 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin } type ApiUICSRRevoke2Request struct { - ctx context.Context + ctx context.Context ApiService UICSRAPI - ophid string - body *HostactivationRevokeCertRequest + ophid string + body *HostactivationRevokeCertRequest } func (r ApiUICSRRevoke2Request) Body(body HostactivationRevokeCertRequest) ApiUICSRRevoke2Request { @@ -657,26 +660,27 @@ Validation: - one of "cert_serial" or "ophid" should be provided - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ func (a *UICSRAPIService) UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request { return ApiUICSRRevoke2Request{ ApiService: a, - ctx: ctx, - ophid: ophid, + ctx: ctx, + ophid: ophid, } } // Execute executes the request -// @return map[string]interface{} +// +// @return map[string]interface{} func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[string]interface{}, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue map[string]interface{} + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue map[string]interface{} ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UICSRAPIService.UICSRRevoke2") @@ -711,8 +715,8 @@ func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[str if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/infra_provision/client.go b/infra_provision/client.go index fc02639..fe18f4d 100644 --- a/infra_provision/client.go +++ b/infra_provision/client.go @@ -11,7 +11,7 @@ API version: v1 package infra_provision import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/host-activation/v1" @@ -19,10 +19,10 @@ var ServiceBasePath = "/host-activation/v1" // APIClient manages communication with the Host Activation Service API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - UICSRAPI UICSRAPI + UICSRAPI UICSRAPI UIJoinTokenAPI UIJoinTokenAPI } @@ -30,7 +30,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.UICSRAPI = (*UICSRAPIService)(&c.Common) diff --git a/infra_provision/model_api_page_info.go b/infra_provision/model_api_page_info.go index e36b961..b7306aa 100644 --- a/infra_provision/model_api_page_info.go +++ b/infra_provision/model_api_page_info.go @@ -141,7 +141,7 @@ func (o *ApiPageInfo) SetSize(v int32) { } func (o ApiPageInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableApiPageInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_approve_csr_request.go b/infra_provision/model_hostactivation_approve_csr_request.go index 04bbf97..738087d 100644 --- a/infra_provision/model_hostactivation_approve_csr_request.go +++ b/infra_provision/model_hostactivation_approve_csr_request.go @@ -72,7 +72,7 @@ func (o *HostactivationApproveCSRRequest) SetActivationCode(v string) { } func (o HostactivationApproveCSRRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableHostactivationApproveCSRRequest) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_create_join_token_response.go b/infra_provision/model_hostactivation_create_join_token_response.go index 2f9e110..928a3a4 100644 --- a/infra_provision/model_hostactivation_create_join_token_response.go +++ b/infra_provision/model_hostactivation_create_join_token_response.go @@ -19,8 +19,8 @@ var _ MappedNullable = &HostactivationCreateJoinTokenResponse{} // HostactivationCreateJoinTokenResponse struct for HostactivationCreateJoinTokenResponse type HostactivationCreateJoinTokenResponse struct { - JoinToken *string `json:"join_token,omitempty"` - Result *HostactivationJoinToken `json:"result,omitempty"` + JoinToken *string `json:"join_token,omitempty"` + Result *HostactivationJoinToken `json:"result,omitempty"` } // NewHostactivationCreateJoinTokenResponse instantiates a new HostactivationCreateJoinTokenResponse object @@ -105,7 +105,7 @@ func (o *HostactivationCreateJoinTokenResponse) SetResult(v HostactivationJoinTo } func (o HostactivationCreateJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableHostactivationCreateJoinTokenResponse) UnmarshalJSON(src []byte v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_csr.go b/infra_provision/model_hostactivation_csr.go index 1bf4d09..e0dfc54 100644 --- a/infra_provision/model_hostactivation_csr.go +++ b/infra_provision/model_hostactivation_csr.go @@ -20,19 +20,19 @@ var _ MappedNullable = &HostactivationCSR{} // HostactivationCSR Represents a certificate signing request from an on-prem host. type HostactivationCSR struct { - ActivationCode *string `json:"activation_code,omitempty"` - ClientIp *TypesInetValue `json:"client_ip,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Csr *string `json:"csr,omitempty"` - HostSerial *string `json:"host_serial,omitempty"` + ActivationCode *string `json:"activation_code,omitempty"` + ClientIp *TypesInetValue `json:"client_ip,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Csr *string `json:"csr,omitempty"` + HostSerial *string `json:"host_serial,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` JoinToken *HostactivationJoinToken `json:"join_token,omitempty"` - Ophid *string `json:"ophid,omitempty"` - Signature *string `json:"signature,omitempty"` - SrcIp *TypesInetValue `json:"src_ip,omitempty"` - State *HostactivationCSRState `json:"state,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + Ophid *string `json:"ophid,omitempty"` + Signature *string `json:"signature,omitempty"` + SrcIp *TypesInetValue `json:"src_ip,omitempty"` + State *HostactivationCSRState `json:"state,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` } // NewHostactivationCSR instantiates a new HostactivationCSR object @@ -441,7 +441,7 @@ func (o *HostactivationCSR) SetUpdatedAt(v time.Time) { } func (o HostactivationCSR) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -524,5 +524,3 @@ func (v *NullableHostactivationCSR) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_csr_state.go b/infra_provision/model_hostactivation_csr_state.go index 379e99c..d658147 100644 --- a/infra_provision/model_hostactivation_csr_state.go +++ b/infra_provision/model_hostactivation_csr_state.go @@ -20,12 +20,12 @@ type HostactivationCSRState string // List of hostactivationCSRState const ( - HOSTACTIVATIONCSRSTATE_UNKNOWN HostactivationCSRState = "UNKNOWN" - HOSTACTIVATIONCSRSTATE_NEW HostactivationCSRState = "NEW" + HOSTACTIVATIONCSRSTATE_UNKNOWN HostactivationCSRState = "UNKNOWN" + HOSTACTIVATIONCSRSTATE_NEW HostactivationCSRState = "NEW" HOSTACTIVATIONCSRSTATE_VERIFIED HostactivationCSRState = "VERIFIED" - HOSTACTIVATIONCSRSTATE_DENIED HostactivationCSRState = "DENIED" - HOSTACTIVATIONCSRSTATE_TIMEOUT HostactivationCSRState = "TIMEOUT" - HOSTACTIVATIONCSRSTATE_RENEWED HostactivationCSRState = "RENEWED" + HOSTACTIVATIONCSRSTATE_DENIED HostactivationCSRState = "DENIED" + HOSTACTIVATIONCSRSTATE_TIMEOUT HostactivationCSRState = "TIMEOUT" + HOSTACTIVATIONCSRSTATE_RENEWED HostactivationCSRState = "RENEWED" ) // All allowed values of HostactivationCSRState enum @@ -116,4 +116,3 @@ func (v *NullableHostactivationCSRState) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - diff --git a/infra_provision/model_hostactivation_delete_join_tokens_request.go b/infra_provision/model_hostactivation_delete_join_tokens_request.go index d100a35..939207d 100644 --- a/infra_provision/model_hostactivation_delete_join_tokens_request.go +++ b/infra_provision/model_hostactivation_delete_join_tokens_request.go @@ -73,7 +73,7 @@ func (o *HostactivationDeleteJoinTokensRequest) SetIds(v []string) { } func (o HostactivationDeleteJoinTokensRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableHostactivationDeleteJoinTokensRequest) UnmarshalJSON(src []byte v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_deny_csr_request.go b/infra_provision/model_hostactivation_deny_csr_request.go index a61da7a..b826ac3 100644 --- a/infra_provision/model_hostactivation_deny_csr_request.go +++ b/infra_provision/model_hostactivation_deny_csr_request.go @@ -72,7 +72,7 @@ func (o *HostactivationDenyCSRRequest) SetActivationCode(v string) { } func (o HostactivationDenyCSRRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableHostactivationDenyCSRRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_join_token.go b/infra_provision/model_hostactivation_join_token.go index e7cfa7e..af3343a 100644 --- a/infra_provision/model_hostactivation_join_token.go +++ b/infra_provision/model_hostactivation_join_token.go @@ -11,10 +11,10 @@ API version: v1 package infra_provision import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the HostactivationJoinToken type satisfies the MappedNullable interface at compile time @@ -22,18 +22,18 @@ var _ MappedNullable = &HostactivationJoinToken{} // HostactivationJoinToken struct for HostactivationJoinToken type HostactivationJoinToken struct { - DeletedAt *time.Time `json:"deleted_at,omitempty"` - Description *string `json:"description,omitempty"` - ExpiresAt *time.Time `json:"expires_at,omitempty"` + DeletedAt *time.Time `json:"deleted_at,omitempty"` + Description *string `json:"description,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` - LastUsedAt *time.Time `json:"last_used_at,omitempty"` - Name string `json:"name"` - Status *JoinTokenJoinTokenStatus `json:"status,omitempty"` - Tags map[string]interface{} `json:"tags,omitempty"` + Id *string `json:"id,omitempty"` + LastUsedAt *time.Time `json:"last_used_at,omitempty"` + Name string `json:"name"` + Status *JoinTokenJoinTokenStatus `json:"status,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` // first half of the token. - TokenId *string `json:"token_id,omitempty"` - UseCounter *int64 `json:"use_counter,omitempty"` + TokenId *string `json:"token_id,omitempty"` + UseCounter *int64 `json:"use_counter,omitempty"` } type _HostactivationJoinToken HostactivationJoinToken @@ -373,7 +373,7 @@ func (o *HostactivationJoinToken) SetUseCounter(v int64) { } func (o HostactivationJoinToken) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -426,10 +426,10 @@ func (o *HostactivationJoinToken) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -485,5 +485,3 @@ func (v *NullableHostactivationJoinToken) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_list_csrs_response.go b/infra_provision/model_hostactivation_list_csrs_response.go index 581aa50..6c76eeb 100644 --- a/infra_provision/model_hostactivation_list_csrs_response.go +++ b/infra_provision/model_hostactivation_list_csrs_response.go @@ -19,7 +19,7 @@ var _ MappedNullable = &HostactivationListCSRsResponse{} // HostactivationListCSRsResponse struct for HostactivationListCSRsResponse type HostactivationListCSRsResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []HostactivationCSR `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *HostactivationListCSRsResponse) SetResults(v []HostactivationCSR) { } func (o HostactivationListCSRsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableHostactivationListCSRsResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_list_join_token_response.go b/infra_provision/model_hostactivation_list_join_token_response.go index ac1bd69..3770180 100644 --- a/infra_provision/model_hostactivation_list_join_token_response.go +++ b/infra_provision/model_hostactivation_list_join_token_response.go @@ -19,7 +19,7 @@ var _ MappedNullable = &HostactivationListJoinTokenResponse{} // HostactivationListJoinTokenResponse struct for HostactivationListJoinTokenResponse type HostactivationListJoinTokenResponse struct { - Page *ApiPageInfo `json:"page,omitempty"` + Page *ApiPageInfo `json:"page,omitempty"` Results []HostactivationJoinToken `json:"results,omitempty"` } @@ -105,7 +105,7 @@ func (o *HostactivationListJoinTokenResponse) SetResults(v []HostactivationJoinT } func (o HostactivationListJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableHostactivationListJoinTokenResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_read_join_token_response.go b/infra_provision/model_hostactivation_read_join_token_response.go index cb93ba3..ad58d58 100644 --- a/infra_provision/model_hostactivation_read_join_token_response.go +++ b/infra_provision/model_hostactivation_read_join_token_response.go @@ -72,7 +72,7 @@ func (o *HostactivationReadJoinTokenResponse) SetResult(v HostactivationJoinToke } func (o HostactivationReadJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableHostactivationReadJoinTokenResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_revoke_cert_request.go b/infra_provision/model_hostactivation_revoke_cert_request.go index d73935f..f3ef47a 100644 --- a/infra_provision/model_hostactivation_revoke_cert_request.go +++ b/infra_provision/model_hostactivation_revoke_cert_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &HostactivationRevokeCertRequest{} type HostactivationRevokeCertRequest struct { CertSerial *string `json:"cert_serial,omitempty"` // On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - Ophid *string `json:"ophid,omitempty"` + Ophid *string `json:"ophid,omitempty"` RevokeReason *string `json:"revoke_reason,omitempty"` } @@ -139,7 +139,7 @@ func (o *HostactivationRevokeCertRequest) SetRevokeReason(v string) { } func (o HostactivationRevokeCertRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -195,5 +195,3 @@ func (v *NullableHostactivationRevokeCertRequest) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_hostactivation_update_join_token_response.go b/infra_provision/model_hostactivation_update_join_token_response.go index 08864f4..b103f2f 100644 --- a/infra_provision/model_hostactivation_update_join_token_response.go +++ b/infra_provision/model_hostactivation_update_join_token_response.go @@ -72,7 +72,7 @@ func (o *HostactivationUpdateJoinTokenResponse) SetResult(v HostactivationJoinTo } func (o HostactivationUpdateJoinTokenResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableHostactivationUpdateJoinTokenResponse) UnmarshalJSON(src []byte v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_join_token_join_token_status.go b/infra_provision/model_join_token_join_token_status.go index 7396c7d..80eb50a 100644 --- a/infra_provision/model_join_token_join_token_status.go +++ b/infra_provision/model_join_token_join_token_status.go @@ -21,7 +21,7 @@ type JoinTokenJoinTokenStatus string // List of JoinTokenJoinTokenStatus const ( JOINTOKENJOINTOKENSTATUS_UNKNOWN JoinTokenJoinTokenStatus = "UNKNOWN" - JOINTOKENJOINTOKENSTATUS_ACTIVE JoinTokenJoinTokenStatus = "ACTIVE" + JOINTOKENJOINTOKENSTATUS_ACTIVE JoinTokenJoinTokenStatus = "ACTIVE" JOINTOKENJOINTOKENSTATUS_EXPIRED JoinTokenJoinTokenStatus = "EXPIRED" JOINTOKENJOINTOKENSTATUS_REVOKED JoinTokenJoinTokenStatus = "REVOKED" ) @@ -112,4 +112,3 @@ func (v *NullableJoinTokenJoinTokenStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - diff --git a/infra_provision/model_types_inet_value.go b/infra_provision/model_types_inet_value.go index e08622c..ffe6812 100644 --- a/infra_provision/model_types_inet_value.go +++ b/infra_provision/model_types_inet_value.go @@ -72,7 +72,7 @@ func (o *TypesInetValue) SetValue(v string) { } func (o TypesInetValue) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableTypesInetValue) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_provision/model_types_json_value.go b/infra_provision/model_types_json_value.go index 75229b1..5a09701 100644 --- a/infra_provision/model_types_json_value.go +++ b/infra_provision/model_types_json_value.go @@ -72,7 +72,7 @@ func (o *TypesJSONValue) SetValue(v string) { } func (o TypesJSONValue) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableTypesJSONValue) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/api_address.go b/ipam/api_address.go index 38e890b..c8e8fc7 100644 --- a/ipam/api_address.go +++ b/ipam/api_address.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type AddressAPI interface { /* - AddressCreate Create the IP address. + AddressCreate Create the IP address. - Use this method to create an __Address__ object. -The __Address__ object represents any single IP address within a given IP space. + Use this method to create an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ AddressCreate(ctx context.Context) ApiAddressCreateRequest @@ -38,27 +37,27 @@ The __Address__ object represents any single IP address within a given IP space. // @return IpamsvcCreateAddressResponse AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) /* - AddressDelete Move the IP address to the recycle bin. + AddressDelete Move the IP address to the recycle bin. - Use this method to move an __Address__ object to the recycle bin. -The __Address__ object represents any single IP address within a given IP space. + Use this method to move an __Address__ object to the recycle bin. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest // AddressDeleteExecute executes the request AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) /* - AddressList Retrieve IP addresses. + AddressList Retrieve IP addresses. - Use this method to retrieve __Address__ objects. -The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve __Address__ objects. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ AddressList(ctx context.Context) ApiAddressListRequest @@ -66,14 +65,14 @@ The __Address__ object represents any single IP address within a given IP space. // @return IpamsvcListAddressResponse AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) /* - AddressRead Retrieve the IP address. + AddressRead Retrieve the IP address. - Use this method to retrieve an __Address__ object. -The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ AddressRead(ctx context.Context, id string) ApiAddressReadRequest @@ -81,14 +80,14 @@ The __Address__ object represents any single IP address within a given IP space. // @return IpamsvcReadAddressResponse AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) /* - AddressUpdate Update the IP address. + AddressUpdate Update the IP address. - Use this method to update an __Address__ object. -The __Address__ object represents any single IP address within a given IP space. + Use this method to update an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest @@ -101,9 +100,9 @@ The __Address__ object represents any single IP address within a given IP space. type AddressAPIService internal.Service type ApiAddressCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - body *IpamsvcAddress + body *IpamsvcAddress } func (r ApiAddressCreateRequest) Body(body IpamsvcAddress) ApiAddressCreateRequest { @@ -121,24 +120,25 @@ AddressCreate Create the IP address. Use this method to create an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ func (a *AddressAPIService) AddressCreate(ctx context.Context) ApiAddressCreateRequest { return ApiAddressCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateAddressResponse +// +// @return IpamsvcCreateAddressResponse func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateAddressResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressCreate") @@ -172,16 +172,16 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip } type ApiAddressDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - id string + id string } func (r ApiAddressDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ AddressDelete Move the IP address to the recycle bin. Use this method to move an __Address__ object to the recycle bin. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ func (a *AddressAPIService) AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest { return ApiAddressDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AddressAPIService) AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressDelete") @@ -331,51 +331,51 @@ func (a *AddressAPIService) AddressDeleteExecute(r ApiAddressDeleteRequest) (*ht } type ApiAddressListRequest struct { - ctx context.Context - ApiService AddressAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - scope *string + ctx context.Context + ApiService AddressAPI + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + scope *string addressState *string - torderBy *string - tfilter *string + torderBy *string + tfilter *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAddressListRequest) Filter(filter string) ApiAddressListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAddressListRequest) OrderBy(orderBy string) ApiAddressListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressListRequest) Fields(fields string) ApiAddressListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAddressListRequest) Offset(offset int32) ApiAddressListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAddressListRequest) Limit(limit int32) ApiAddressListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAddressListRequest) PageToken(pageToken string) ApiAddressListRequest { r.pageToken = &pageToken return r @@ -413,24 +413,25 @@ AddressList Retrieve IP addresses. Use this method to retrieve __Address__ objects. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ func (a *AddressAPIService) AddressList(ctx context.Context) ApiAddressListRequest { return ApiAddressListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListAddressResponse +// +// @return IpamsvcListAddressResponse func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressList") @@ -536,13 +537,13 @@ func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*Ipamsv } type ApiAddressReadRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressReadRequest) Fields(fields string) ApiAddressReadRequest { r.fields = &fields return r @@ -558,26 +559,27 @@ AddressRead Retrieve the IP address. Use this method to retrieve an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ func (a *AddressAPIService) AddressRead(ctx context.Context, id string) ApiAddressReadRequest { return ApiAddressReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadAddressResponse +// +// @return IpamsvcReadAddressResponse func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressRead") @@ -657,10 +659,10 @@ func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*Ipamsv } type ApiAddressUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressAPI - id string - body *IpamsvcAddress + id string + body *IpamsvcAddress } func (r ApiAddressUpdateRequest) Body(body IpamsvcAddress) ApiAddressUpdateRequest { @@ -678,26 +680,27 @@ AddressUpdate Update the IP address. Use this method to update an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ func (a *AddressAPIService) AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest { return ApiAddressUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateAddressResponse +// +// @return IpamsvcUpdateAddressResponse func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*IpamsvcUpdateAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateAddressResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressAPIService.AddressUpdate") @@ -732,16 +735,16 @@ func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_address_block.go b/ipam/api_address_block.go index cc3cf60..481539c 100644 --- a/ipam/api_address_block.go +++ b/ipam/api_address_block.go @@ -18,20 +18,19 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type AddressBlockAPI interface { /* - AddressBlockCopy Copy the address block. + AddressBlockCopy Copy the address block. - Use this method to copy an __AddressBlock__ object. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to copy an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest @@ -39,13 +38,13 @@ The __AddressBlock__ object allows a uniform representation of the address space // @return IpamsvcCopyAddressBlockResponse AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) /* - AddressBlockCreate Create the address block. + AddressBlockCreate Create the address block. - Use this method to create an __AddressBlock__ object. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to create an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest @@ -53,14 +52,14 @@ The __AddressBlock__ object allows a uniform representation of the address space // @return IpamsvcCreateAddressBlockResponse AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. + AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. - Use this method to create a Next Available __AddressBlock__ object. -The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to create a Next Available __AddressBlock__ object. + The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest @@ -68,14 +67,14 @@ The Next Available Address Block is a generator that allocates one or more _ipam // @return IpamsvcCreateNextAvailableABResponse AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableIP Allocate the next available IP address. + AddressBlockCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. -This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest @@ -83,14 +82,14 @@ This allocates one or more __Address__ (_ipam/address_) resource from available // @return IpamsvcCreateNextAvailableIPResponse AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. + AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. - Use this method to create a Next Available __Subnet__ object. -The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to create a Next Available __Subnet__ object. + The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest @@ -98,27 +97,27 @@ The Next Available Subnet is a generator that allocates one or more _ipam/subnet // @return IpamsvcCreateNextAvailableSubnetResponse AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) /* - AddressBlockDelete Move the address block to the recycle bin. + AddressBlockDelete Move the address block to the recycle bin. - Use this method to move an __AddressBlock__ object to the recycle bin. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to move an __AddressBlock__ object to the recycle bin. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest // AddressBlockDeleteExecute executes the request AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) /* - AddressBlockList Retrieve the address blocks. + AddressBlockList Retrieve the address blocks. - Use this method to retrieve __AddressBlock__ objects. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve __AddressBlock__ objects. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ AddressBlockList(ctx context.Context) ApiAddressBlockListRequest @@ -126,14 +125,14 @@ The __AddressBlock__ object allows a uniform representation of the address space // @return IpamsvcListAddressBlockResponse AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) /* - AddressBlockListNextAvailableAB List Next Available Address Block objects. + AddressBlockListNextAvailableAB List Next Available Address Block objects. - Use this method to list Next Available __AddressBlock__ objects. -The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to list Next Available __AddressBlock__ objects. + The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest @@ -141,14 +140,14 @@ The Next Available __AddressBlock__ is a generator that returns one or more _ipa // @return IpamsvcNextAvailableABResponse AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) /* - AddressBlockListNextAvailableIP Retrieve the next available IP address. + AddressBlockListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. -This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest @@ -156,14 +155,14 @@ This returns one or more __Address__ (_ipam/address_) resource from available ad // @return IpamsvcNextAvailableIPResponse AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - AddressBlockListNextAvailableSubnet List Next Available Subnet objects. + AddressBlockListNextAvailableSubnet List Next Available Subnet objects. - Use this method to list Next Available __Subnet__ objects. -The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to list Next Available __Subnet__ objects. + The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest @@ -171,14 +170,14 @@ The Next Available Address Block is a generator that returns one or more _ipam/s // @return IpamsvcNextAvailableSubnetResponse AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) /* - AddressBlockRead Retrieve the address block. + AddressBlockRead Retrieve the address block. - Use this method to retrieve an __AddressBlock__ object. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest @@ -186,14 +185,14 @@ The __AddressBlock__ object allows a uniform representation of the address space // @return IpamsvcReadAddressBlockResponse AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) /* - AddressBlockUpdate Update the address block. + AddressBlockUpdate Update the address block. - Use this method to update an __AddressBlock__ object. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to update an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest @@ -206,10 +205,10 @@ The __AddressBlock__ object allows a uniform representation of the address space type AddressBlockAPIService internal.Service type ApiAddressBlockCopyRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - body *IpamsvcCopyAddressBlock + id string + body *IpamsvcCopyAddressBlock } func (r ApiAddressBlockCopyRequest) Body(body IpamsvcCopyAddressBlock) ApiAddressBlockCopyRequest { @@ -227,26 +226,27 @@ AddressBlockCopy Copy the address block. Use this method to copy an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ func (a *AddressBlockAPIService) AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest { return ApiAddressBlockCopyRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCopyAddressBlockResponse +// +// @return IpamsvcCopyAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCopyAddressBlockResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCopyAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCopy") @@ -281,8 +281,8 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -328,10 +328,10 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe } type ApiAddressBlockCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - body *IpamsvcAddressBlock - inherit *string + body *IpamsvcAddressBlock + inherit *string } func (r ApiAddressBlockCreateRequest) Body(body IpamsvcAddressBlock) ApiAddressBlockCreateRequest { @@ -355,24 +355,25 @@ AddressBlockCreate Create the address block. Use this method to create an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ func (a *AddressBlockAPIService) AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest { return ApiAddressBlockCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateAddressBlockResponse +// +// @return IpamsvcCreateAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateAddressBlockResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreate") @@ -409,16 +410,16 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -464,13 +465,13 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea } type ApiAddressBlockCreateNextAvailableABRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string + id string + cidr *int32 + count *int32 + name *string + comment *string } // The cidr value of address blocks to be created. @@ -507,26 +508,27 @@ AddressBlockCreateNextAvailableAB Create the Next Available Address Block object Use this method to create a Next Available __AddressBlock__ object. The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest { return ApiAddressBlockCreateNextAvailableABRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCreateNextAvailableABResponse +// +// @return IpamsvcCreateNextAvailableABResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableABResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableABResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreateNextAvailableAB") @@ -619,11 +621,11 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiA } type ApiAddressBlockCreateNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -648,26 +650,27 @@ AddressBlockCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest { return ApiAddressBlockCreateNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCreateNextAvailableIPResponse +// +// @return IpamsvcCreateNextAvailableIPResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableIPResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreateNextAvailableIP") @@ -756,14 +759,14 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiA } type ApiAddressBlockCreateNextAvailableSubnetRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string - dhcpHost *string + id string + cidr *int32 + count *int32 + name *string + comment *string + dhcpHost *string } // The cidr value of subnets to be created. @@ -806,26 +809,27 @@ AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. Use this method to create a Next Available __Subnet__ object. The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest { return ApiAddressBlockCreateNextAvailableSubnetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCreateNextAvailableSubnetResponse +// +// @return IpamsvcCreateNextAvailableSubnetResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableSubnetResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockCreateNextAvailableSubnet") @@ -921,9 +925,9 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r } type ApiAddressBlockDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string + id string } func (r ApiAddressBlockDeleteRequest) Execute() (*http.Response, error) { @@ -936,24 +940,24 @@ AddressBlockDelete Move the address block to the recycle bin. Use this method to move an __AddressBlock__ object to the recycle bin. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ func (a *AddressBlockAPIService) AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest { return ApiAddressBlockDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *AddressBlockAPIService) AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockDelete") @@ -1025,50 +1029,50 @@ func (a *AddressBlockAPIService) AddressBlockDeleteExecute(r ApiAddressBlockDele } type ApiAddressBlockListRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressBlockListRequest) Fields(fields string) ApiAddressBlockListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAddressBlockListRequest) Filter(filter string) ApiAddressBlockListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAddressBlockListRequest) Offset(offset int32) ApiAddressBlockListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAddressBlockListRequest) Limit(limit int32) ApiAddressBlockListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAddressBlockListRequest) PageToken(pageToken string) ApiAddressBlockListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAddressBlockListRequest) OrderBy(orderBy string) ApiAddressBlockListRequest { r.orderBy = &orderBy return r @@ -1102,24 +1106,25 @@ AddressBlockList Retrieve the address blocks. Use this method to retrieve __AddressBlock__ objects. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ func (a *AddressBlockAPIService) AddressBlockList(ctx context.Context) ApiAddressBlockListRequest { return ApiAddressBlockListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListAddressBlockResponse +// +// @return IpamsvcListAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListAddressBlockResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockList") @@ -1222,13 +1227,13 @@ func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRe } type ApiAddressBlockListNextAvailableABRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string + id string + cidr *int32 + count *int32 + name *string + comment *string } // The cidr value of address blocks to be created. @@ -1265,26 +1270,27 @@ AddressBlockListNextAvailableAB List Next Available Address Block objects. Use this method to list Next Available __AddressBlock__ objects. The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest { return ApiAddressBlockListNextAvailableABRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcNextAvailableABResponse +// +// @return IpamsvcNextAvailableABResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableABResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableABResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockListNextAvailableAB") @@ -1373,11 +1379,11 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAdd } type ApiAddressBlockListNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -1402,26 +1408,27 @@ AddressBlockListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest { return ApiAddressBlockListNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcNextAvailableIPResponse +// +// @return IpamsvcNextAvailableIPResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableIPResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockListNextAvailableIP") @@ -1504,14 +1511,14 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAdd } type ApiAddressBlockListNextAvailableSubnetRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - cidr *int32 - count *int32 - name *string - comment *string - dhcpHost *string + id string + cidr *int32 + count *int32 + name *string + comment *string + dhcpHost *string } // The cidr value of subnets to be created. @@ -1554,26 +1561,27 @@ AddressBlockListNextAvailableSubnet List Next Available Subnet objects. Use this method to list Next Available __Subnet__ objects. The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest { return ApiAddressBlockListNextAvailableSubnetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcNextAvailableSubnetResponse +// +// @return IpamsvcNextAvailableSubnetResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableSubnetResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockListNextAvailableSubnet") @@ -1665,14 +1673,14 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r Ap } type ApiAddressBlockReadRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressBlockReadRequest) Fields(fields string) ApiAddressBlockReadRequest { r.fields = &fields return r @@ -1694,26 +1702,27 @@ AddressBlockRead Retrieve the address block. Use this method to retrieve an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ func (a *AddressBlockAPIService) AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest { return ApiAddressBlockReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadAddressBlockResponse +// +// @return IpamsvcReadAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadAddressBlockResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockRead") @@ -1796,11 +1805,11 @@ func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRe } type ApiAddressBlockUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService AddressBlockAPI - id string - body *IpamsvcAddressBlock - inherit *string + id string + body *IpamsvcAddressBlock + inherit *string } func (r ApiAddressBlockUpdateRequest) Body(body IpamsvcAddressBlock) ApiAddressBlockUpdateRequest { @@ -1824,26 +1833,27 @@ AddressBlockUpdate Update the address block. Use this method to update an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ func (a *AddressBlockAPIService) AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest { return ApiAddressBlockUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateAddressBlockResponse +// +// @return IpamsvcUpdateAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpdateRequest) (*IpamsvcUpdateAddressBlockResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateAddressBlockResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateAddressBlockResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AddressBlockAPIService.AddressBlockUpdate") @@ -1881,16 +1891,16 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_asm.go b/ipam/api_asm.go index bf2dbc2..b2fe742 100644 --- a/ipam/api_asm.go +++ b/ipam/api_asm.go @@ -18,20 +18,19 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type AsmAPI interface { /* - AsmCreate Update subnet and ranges for Automated Scope Management. + AsmCreate Update subnet and ranges for Automated Scope Management. - Use this method to update the subnet and range for Automated Scope Management. -The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. -This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. + Use this method to update the subnet and range for Automated Scope Management. + The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. + This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ AsmCreate(ctx context.Context) ApiAsmCreateRequest @@ -39,13 +38,13 @@ This method attempts to expand the scope by expanding a range or adding a new ra // @return IpamsvcCreateASMResponse AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) /* - AsmList Retrieve suggested updates for Automated Scope Management. + AsmList Retrieve suggested updates for Automated Scope Management. - Use this method to retrieve __ASM__ objects for Automated Scope Management. -The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve __ASM__ objects for Automated Scope Management. + The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ AsmList(ctx context.Context) ApiAsmListRequest @@ -53,14 +52,14 @@ The __ASM__ object returns the suggested updates for the subnet from the ASM sug // @return IpamsvcListASMResponse AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) /* - AsmRead Retrieve the suggested update for Automated Scope Management. + AsmRead Retrieve the suggested update for Automated Scope Management. - Use this method to retrieve an __ASM__ object for Automated Scope Management. -The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve an __ASM__ object for Automated Scope Management. + The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ AsmRead(ctx context.Context, id string) ApiAsmReadRequest @@ -73,9 +72,9 @@ The __ASM__ object returns the suggested updates for the subnet from the ASM sug type AsmAPIService internal.Service type ApiAsmCreateRequest struct { - ctx context.Context + ctx context.Context ApiService AsmAPI - body *IpamsvcASM + body *IpamsvcASM } func (r ApiAsmCreateRequest) Body(body IpamsvcASM) ApiAsmCreateRequest { @@ -94,24 +93,25 @@ Use this method to update the subnet and range for Automated Scope Management. The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ func (a *AsmAPIService) AsmCreate(ctx context.Context) ApiAsmCreateRequest { return ApiAsmCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateASMResponse +// +// @return IpamsvcCreateASMResponse func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateASMResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateASMResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AsmAPIService.AsmCreate") @@ -145,8 +145,8 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -192,13 +192,13 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA } type ApiAsmListRequest struct { - ctx context.Context + ctx context.Context ApiService AsmAPI - fields *string - subnetId *string + fields *string + subnetId *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAsmListRequest) Fields(fields string) ApiAsmListRequest { r.fields = &fields return r @@ -219,24 +219,25 @@ AsmList Retrieve suggested updates for Automated Scope Management. Use this method to retrieve __ASM__ objects for Automated Scope Management. The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ func (a *AsmAPIService) AsmList(ctx context.Context) ApiAsmListRequest { return ApiAsmListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListASMResponse +// +// @return IpamsvcListASMResponse func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListASMResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListASMResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AsmAPIService.AsmList") @@ -318,13 +319,13 @@ func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResp } type ApiAsmReadRequest struct { - ctx context.Context + ctx context.Context ApiService AsmAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAsmReadRequest) Fields(fields string) ApiAsmReadRequest { r.fields = &fields return r @@ -340,26 +341,27 @@ AsmRead Retrieve the suggested update for Automated Scope Management. Use this method to retrieve an __ASM__ object for Automated Scope Management. The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ func (a *AsmAPIService) AsmRead(ctx context.Context, id string) ApiAsmReadRequest { return ApiAsmReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadASMResponse +// +// @return IpamsvcReadASMResponse func (a *AsmAPIService) AsmReadExecute(r ApiAsmReadRequest) (*IpamsvcReadASMResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadASMResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadASMResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "AsmAPIService.AsmRead") diff --git a/ipam/api_dhcp_host.go b/ipam/api_dhcp_host.go index 72f295c..a3d955b 100644 --- a/ipam/api_dhcp_host.go +++ b/ipam/api_dhcp_host.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type DhcpHostAPI interface { /* - DhcpHostList Retrieve DHCP hosts. + DhcpHostList Retrieve DHCP hosts. - Use this method to retrieve DHCP __Host__ objects. -A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve DHCP __Host__ objects. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ DhcpHostList(ctx context.Context) ApiDhcpHostListRequest @@ -38,13 +37,13 @@ A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem // @return IpamsvcListHostResponse DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) /* - DhcpHostListAssociations Retrieve DHCP host associations. + DhcpHostListAssociations Retrieve DHCP host associations. - Use this method to retrieve __HostAssociation__ objects. + Use this method to retrieve __HostAssociation__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostListAssociationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostListAssociationsRequest */ DhcpHostListAssociations(ctx context.Context, id string) ApiDhcpHostListAssociationsRequest @@ -52,14 +51,14 @@ A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem // @return IpamsvcHostAssociationsResponse DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) /* - DhcpHostRead Retrieve the DHCP host. + DhcpHostRead Retrieve the DHCP host. - Use this method to retrieve a DHCP Host object. -A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve a DHCP Host object. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest @@ -67,14 +66,14 @@ A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem // @return IpamsvcReadHostResponse DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) /* - DhcpHostUpdate Update the DHCP hosts. + DhcpHostUpdate Update the DHCP hosts. - Use this method to update a DHCP __Host__ object. -A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to update a DHCP __Host__ object. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest @@ -87,49 +86,49 @@ A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem type DhcpHostAPIService internal.Service type ApiDhcpHostListRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDhcpHostListRequest) Fields(fields string) ApiDhcpHostListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDhcpHostListRequest) Filter(filter string) ApiDhcpHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDhcpHostListRequest) Offset(offset int32) ApiDhcpHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDhcpHostListRequest) Limit(limit int32) ApiDhcpHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDhcpHostListRequest) PageToken(pageToken string) ApiDhcpHostListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDhcpHostListRequest) OrderBy(orderBy string) ApiDhcpHostListRequest { r.orderBy = &orderBy return r @@ -157,24 +156,25 @@ DhcpHostList Retrieve DHCP hosts. Use this method to retrieve DHCP __Host__ objects. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ func (a *DhcpHostAPIService) DhcpHostList(ctx context.Context) ApiDhcpHostListRequest { return ApiDhcpHostListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListHostResponse +// +// @return IpamsvcListHostResponse func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostList") @@ -274,9 +274,9 @@ func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*Ipa } type ApiDhcpHostListAssociationsRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - id string + id string } func (r ApiDhcpHostListAssociationsRequest) Execute() (*IpamsvcHostAssociationsResponse, *http.Response, error) { @@ -288,26 +288,27 @@ DhcpHostListAssociations Retrieve DHCP host associations. Use this method to retrieve __HostAssociation__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostListAssociationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostListAssociationsRequest */ func (a *DhcpHostAPIService) DhcpHostListAssociations(ctx context.Context, id string) ApiDhcpHostListAssociationsRequest { return ApiDhcpHostListAssociationsRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcHostAssociationsResponse +// +// @return IpamsvcHostAssociationsResponse func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcHostAssociationsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcHostAssociationsResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostListAssociations") @@ -384,13 +385,13 @@ func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAs } type ApiDhcpHostReadRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDhcpHostReadRequest) Fields(fields string) ApiDhcpHostReadRequest { r.fields = &fields return r @@ -406,26 +407,27 @@ DhcpHostRead Retrieve the DHCP host. Use this method to retrieve a DHCP Host object. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ func (a *DhcpHostAPIService) DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest { return ApiDhcpHostReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadHostResponse +// +// @return IpamsvcReadHostResponse func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostRead") @@ -505,10 +507,10 @@ func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*Ipa } type ApiDhcpHostUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService DhcpHostAPI - id string - body *IpamsvcHost + id string + body *IpamsvcHost } func (r ApiDhcpHostUpdateRequest) Body(body IpamsvcHost) ApiDhcpHostUpdateRequest { @@ -526,26 +528,27 @@ DhcpHostUpdate Update the DHCP hosts. Use this method to update a DHCP __Host__ object. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ func (a *DhcpHostAPIService) DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest { return ApiDhcpHostUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateHostResponse +// +// @return IpamsvcUpdateHostResponse func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) (*IpamsvcUpdateHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateHostResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DhcpHostAPIService.DhcpHostUpdate") @@ -580,16 +583,16 @@ func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_dns_usage.go b/ipam/api_dns_usage.go index ec33abe..ce964cf 100644 --- a/ipam/api_dns_usage.go +++ b/ipam/api_dns_usage.go @@ -18,18 +18,17 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type DnsUsageAPI interface { /* - DnsUsageList Retrieve DNS usage for multiple objects. + DnsUsageList Retrieve DNS usage for multiple objects. - Use this method to retrieve __DNSUsage__ objects. + Use this method to retrieve __DNSUsage__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDnsUsageListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDnsUsageListRequest */ DnsUsageList(ctx context.Context) ApiDnsUsageListRequest @@ -37,13 +36,13 @@ type DnsUsageAPI interface { // @return IpamsvcListDNSUsageResponse DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) /* - DnsUsageRead Retrieve the DNS usage. + DnsUsageRead Retrieve the DNS usage. - Use this method to retrieve a __DNSUsage__ object. + Use this method to retrieve a __DNSUsage__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDnsUsageReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDnsUsageReadRequest */ DnsUsageRead(ctx context.Context, id string) ApiDnsUsageReadRequest @@ -56,47 +55,47 @@ type DnsUsageAPI interface { type DnsUsageAPIService internal.Service type ApiDnsUsageListRequest struct { - ctx context.Context + ctx context.Context ApiService DnsUsageAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDnsUsageListRequest) Fields(fields string) ApiDnsUsageListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDnsUsageListRequest) Filter(filter string) ApiDnsUsageListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDnsUsageListRequest) Offset(offset int32) ApiDnsUsageListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDnsUsageListRequest) Limit(limit int32) ApiDnsUsageListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDnsUsageListRequest) PageToken(pageToken string) ApiDnsUsageListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDnsUsageListRequest) OrderBy(orderBy string) ApiDnsUsageListRequest { r.orderBy = &orderBy return r @@ -111,24 +110,25 @@ DnsUsageList Retrieve DNS usage for multiple objects. Use this method to retrieve __DNSUsage__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDnsUsageListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDnsUsageListRequest */ func (a *DnsUsageAPIService) DnsUsageList(ctx context.Context) ApiDnsUsageListRequest { return ApiDnsUsageListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListDNSUsageResponse +// +// @return IpamsvcListDNSUsageResponse func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListDNSUsageResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListDNSUsageResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DnsUsageAPIService.DnsUsageList") @@ -222,13 +222,13 @@ func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*Ipa } type ApiDnsUsageReadRequest struct { - ctx context.Context + ctx context.Context ApiService DnsUsageAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDnsUsageReadRequest) Fields(fields string) ApiDnsUsageReadRequest { r.fields = &fields return r @@ -243,26 +243,27 @@ DnsUsageRead Retrieve the DNS usage. Use this method to retrieve a __DNSUsage__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDnsUsageReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDnsUsageReadRequest */ func (a *DnsUsageAPIService) DnsUsageRead(ctx context.Context, id string) ApiDnsUsageReadRequest { return ApiDnsUsageReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadDNSUsageResponse +// +// @return IpamsvcReadDNSUsageResponse func (a *DnsUsageAPIService) DnsUsageReadExecute(r ApiDnsUsageReadRequest) (*IpamsvcReadDNSUsageResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadDNSUsageResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadDNSUsageResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "DnsUsageAPIService.DnsUsageRead") diff --git a/ipam/api_filter.go b/ipam/api_filter.go index c69ac61..572f312 100644 --- a/ipam/api_filter.go +++ b/ipam/api_filter.go @@ -17,18 +17,17 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type FilterAPI interface { /* - FilterList Retrieve DHCP filters. + FilterList Retrieve DHCP filters. - Use this method to retrieve DHCP __Filter__ objects of all types. + Use this method to retrieve DHCP __Filter__ objects of all types. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFilterListRequest */ FilterList(ctx context.Context) ApiFilterListRequest @@ -41,49 +40,49 @@ type FilterAPI interface { type FilterAPIService internal.Service type ApiFilterListRequest struct { - ctx context.Context + ctx context.Context ApiService FilterAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFilterListRequest) Fields(fields string) ApiFilterListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiFilterListRequest) Filter(filter string) ApiFilterListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiFilterListRequest) Offset(offset int32) ApiFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiFilterListRequest) Limit(limit int32) ApiFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiFilterListRequest) PageToken(pageToken string) ApiFilterListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiFilterListRequest) OrderBy(orderBy string) ApiFilterListRequest { r.orderBy = &orderBy return r @@ -110,24 +109,25 @@ FilterList Retrieve DHCP filters. Use this method to retrieve DHCP __Filter__ objects of all types. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFilterListRequest */ func (a *FilterAPIService) FilterList(ctx context.Context) ApiFilterListRequest { return ApiFilterListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListFilterResponse +// +// @return IpamsvcListFilterResponse func (a *FilterAPIService) FilterListExecute(r ApiFilterListRequest) (*IpamsvcListFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FilterAPIService.FilterList") diff --git a/ipam/api_fixed_address.go b/ipam/api_fixed_address.go index 1608d30..15ede2e 100644 --- a/ipam/api_fixed_address.go +++ b/ipam/api_fixed_address.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type FixedAddressAPI interface { /* - FixedAddressCreate Create the fixed address. + FixedAddressCreate Create the fixed address. - Use this method to create a __FixedAddress__ object. -The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to create a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest @@ -38,27 +37,27 @@ The __FixedAddress__ object reserves an address for a specific client. It must h // @return IpamsvcCreateFixedAddressResponse FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) /* - FixedAddressDelete Move the fixed address to the recycle bin. + FixedAddressDelete Move the fixed address to the recycle bin. - Use this method to move a __FixedAddress__ object to the recycle bin. -The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to move a __FixedAddress__ object to the recycle bin. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest // FixedAddressDeleteExecute executes the request FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) /* - FixedAddressList Retrieve fixed addresses. + FixedAddressList Retrieve fixed addresses. - Use this method to retrieve __FixedAddress__ objects. -The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve __FixedAddress__ objects. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ FixedAddressList(ctx context.Context) ApiFixedAddressListRequest @@ -66,14 +65,14 @@ The __FixedAddress__ object reserves an address for a specific client. It must h // @return IpamsvcListFixedAddressResponse FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) /* - FixedAddressRead Retrieve the fixed address. + FixedAddressRead Retrieve the fixed address. - Use this method to retrieve a __FixedAddress__ object. -The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest @@ -81,14 +80,14 @@ The __FixedAddress__ object reserves an address for a specific client. It must h // @return IpamsvcReadFixedAddressResponse FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) /* - FixedAddressUpdate Update the fixed address. + FixedAddressUpdate Update the fixed address. - Use this method to update a __FixedAddress__ object. -The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to update a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest @@ -101,10 +100,10 @@ The __FixedAddress__ object reserves an address for a specific client. It must h type FixedAddressAPIService internal.Service type ApiFixedAddressCreateRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - body *IpamsvcFixedAddress - inherit *string + body *IpamsvcFixedAddress + inherit *string } func (r ApiFixedAddressCreateRequest) Body(body IpamsvcFixedAddress) ApiFixedAddressCreateRequest { @@ -128,24 +127,25 @@ FixedAddressCreate Create the fixed address. Use this method to create a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ func (a *FixedAddressAPIService) FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest { return ApiFixedAddressCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateFixedAddressResponse +// +// @return IpamsvcCreateFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateFixedAddressResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressCreate") @@ -182,16 +182,16 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -237,9 +237,9 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea } type ApiFixedAddressDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - id string + id string } func (r ApiFixedAddressDeleteRequest) Execute() (*http.Response, error) { @@ -252,24 +252,24 @@ FixedAddressDelete Move the fixed address to the recycle bin. Use this method to move a __FixedAddress__ object to the recycle bin. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ func (a *FixedAddressAPIService) FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest { return ApiFixedAddressDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *FixedAddressAPIService) FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressDelete") @@ -341,50 +341,50 @@ func (a *FixedAddressAPIService) FixedAddressDeleteExecute(r ApiFixedAddressDele } type ApiFixedAddressListRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string - inherit *string -} - -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string + inherit *string +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiFixedAddressListRequest) Filter(filter string) ApiFixedAddressListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiFixedAddressListRequest) OrderBy(orderBy string) ApiFixedAddressListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFixedAddressListRequest) Fields(fields string) ApiFixedAddressListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiFixedAddressListRequest) Offset(offset int32) ApiFixedAddressListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiFixedAddressListRequest) Limit(limit int32) ApiFixedAddressListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiFixedAddressListRequest) PageToken(pageToken string) ApiFixedAddressListRequest { r.pageToken = &pageToken return r @@ -418,24 +418,25 @@ FixedAddressList Retrieve fixed addresses. Use this method to retrieve __FixedAddress__ objects. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ func (a *FixedAddressAPIService) FixedAddressList(ctx context.Context) ApiFixedAddressListRequest { return ApiFixedAddressListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListFixedAddressResponse +// +// @return IpamsvcListFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListFixedAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressList") @@ -538,14 +539,14 @@ func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRe } type ApiFixedAddressReadRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFixedAddressReadRequest) Fields(fields string) ApiFixedAddressReadRequest { r.fields = &fields return r @@ -567,26 +568,27 @@ FixedAddressRead Retrieve the fixed address. Use this method to retrieve a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ func (a *FixedAddressAPIService) FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest { return ApiFixedAddressReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadFixedAddressResponse +// +// @return IpamsvcReadFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadFixedAddressResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressRead") @@ -669,11 +671,11 @@ func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRe } type ApiFixedAddressUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService FixedAddressAPI - id string - body *IpamsvcFixedAddress - inherit *string + id string + body *IpamsvcFixedAddress + inherit *string } func (r ApiFixedAddressUpdateRequest) Body(body IpamsvcFixedAddress) ApiFixedAddressUpdateRequest { @@ -697,26 +699,27 @@ FixedAddressUpdate Update the fixed address. Use this method to update a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ func (a *FixedAddressAPIService) FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest { return ApiFixedAddressUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateFixedAddressResponse +// +// @return IpamsvcUpdateFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpdateRequest) (*IpamsvcUpdateFixedAddressResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateFixedAddressResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateFixedAddressResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "FixedAddressAPIService.FixedAddressUpdate") @@ -754,16 +757,16 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_global.go b/ipam/api_global.go index 32ae434..d1f14ea 100644 --- a/ipam/api_global.go +++ b/ipam/api_global.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type GlobalAPI interface { /* - GlobalRead Retrieve the global configuration. + GlobalRead Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. -The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest @@ -38,14 +37,14 @@ The service operates on single __Global__ (_dhcp/global_) object that represents // @return IpamsvcReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) /* - GlobalRead2 Retrieve the global configuration. + GlobalRead2 Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. -The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request @@ -53,13 +52,13 @@ The service operates on single __Global__ (_dhcp/global_) object that represents // @return IpamsvcReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) /* - GlobalUpdate Update the global configuration. + GlobalUpdate Update the global configuration. - Use this method to update the __Global__ configuration object. -The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest @@ -67,14 +66,14 @@ The service operates on single __Global__ (_dhcp/global_) object that represents // @return IpamsvcUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) /* - GlobalUpdate2 Update the global configuration. + GlobalUpdate2 Update the global configuration. - Use this method to update the __Global__ configuration object. -The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request @@ -87,12 +86,12 @@ The service operates on single __Global__ (_dhcp/global_) object that represents type GlobalAPIService internal.Service type ApiGlobalReadRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - fields *string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalReadRequest) Fields(fields string) ApiGlobalReadRequest { r.fields = &fields return r @@ -108,24 +107,25 @@ GlobalRead Retrieve the global configuration. Use this method to retrieve the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest { return ApiGlobalReadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcReadGlobalResponse +// +// @return IpamsvcReadGlobalResponse func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead") @@ -204,13 +204,13 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcRe } type ApiGlobalRead2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalRead2Request) Fields(fields string) ApiGlobalRead2Request { r.fields = &fields return r @@ -226,26 +226,27 @@ GlobalRead2 Retrieve the global configuration. Use this method to retrieve the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request { return ApiGlobalRead2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadGlobalResponse +// +// @return IpamsvcReadGlobalResponse func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadGlobalResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalRead2") @@ -325,9 +326,9 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*Ipamsvc } type ApiGlobalUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - body *IpamsvcGlobal + body *IpamsvcGlobal } func (r ApiGlobalUpdateRequest) Body(body IpamsvcGlobal) ApiGlobalUpdateRequest { @@ -345,24 +346,25 @@ GlobalUpdate Update the global configuration. Use this method to update the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest { return ApiGlobalUpdateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcUpdateGlobalResponse +// +// @return IpamsvcUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate") @@ -396,8 +398,8 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -443,10 +445,10 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams } type ApiGlobalUpdate2Request struct { - ctx context.Context + ctx context.Context ApiService GlobalAPI - id string - body *IpamsvcGlobal + id string + body *IpamsvcGlobal } func (r ApiGlobalUpdate2Request) Body(body IpamsvcGlobal) ApiGlobalUpdate2Request { @@ -464,26 +466,27 @@ GlobalUpdate2 Update the global configuration. Use this method to update the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request { return ApiGlobalUpdate2Request{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateGlobalResponse +// +// @return IpamsvcUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*IpamsvcUpdateGlobalResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateGlobalResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateGlobalResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GlobalAPIService.GlobalUpdate2") @@ -518,8 +521,8 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Ipa if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_ha_group.go b/ipam/api_ha_group.go index 6e3bae2..06a4fc8 100644 --- a/ipam/api_ha_group.go +++ b/ipam/api_ha_group.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type HaGroupAPI interface { /* - HaGroupCreate Create the HA group. + HaGroupCreate Create the HA group. - Use this method to create an __HAGroup__ object. -The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to create an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest @@ -38,27 +37,27 @@ The __HAGroup__ object represents on-prem hosts that can serve the same leases f // @return IpamsvcCreateHAGroupResponse HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) /* - HaGroupDelete Delete the HA group. + HaGroupDelete Delete the HA group. - Use this method to delete an __HAGroup__ object. -The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to delete an __HAGroup__ object. + The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest // HaGroupDeleteExecute executes the request HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) /* - HaGroupList Retrieve HA groups. + HaGroupList Retrieve HA groups. - Use this method to retrieve __HAGroup__ objects. -The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve __HAGroup__ objects. + The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ HaGroupList(ctx context.Context) ApiHaGroupListRequest @@ -66,14 +65,14 @@ The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve // @return IpamsvcListHAGroupResponse HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) /* - HaGroupRead Retrieve the HA group. + HaGroupRead Retrieve the HA group. - Use this method to retrieve an __HAGroup__ object. -The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest @@ -81,14 +80,14 @@ The __HAGroup__ object represents on-prem hosts that can serve the same leases f // @return IpamsvcReadHAGroupResponse HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) /* - HaGroupUpdate Update the HA group. + HaGroupUpdate Update the HA group. - Use this method to update an __HAGroup__ object. -The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to update an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest @@ -101,9 +100,9 @@ The __HAGroup__ object represents on-prem hosts that can serve the same leases f type HaGroupAPIService internal.Service type ApiHaGroupCreateRequest struct { - ctx context.Context + ctx context.Context ApiService HaGroupAPI - body *IpamsvcHAGroup + body *IpamsvcHAGroup } func (r ApiHaGroupCreateRequest) Body(body IpamsvcHAGroup) ApiHaGroupCreateRequest { @@ -121,24 +120,25 @@ HaGroupCreate Create the HA group. Use this method to create an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ func (a *HaGroupAPIService) HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest { return ApiHaGroupCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateHAGroupResponse +// +// @return IpamsvcCreateHAGroupResponse func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateHAGroupResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupCreate") @@ -172,16 +172,16 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip } type ApiHaGroupDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService HaGroupAPI - id string + id string } func (r ApiHaGroupDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ HaGroupDelete Delete the HA group. Use this method to delete an __HAGroup__ object. The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ func (a *HaGroupAPIService) HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest { return ApiHaGroupDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *HaGroupAPIService) HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupDelete") @@ -331,50 +331,50 @@ func (a *HaGroupAPIService) HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*ht } type ApiHaGroupListRequest struct { - ctx context.Context - ApiService HaGroupAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string + ctx context.Context + ApiService HaGroupAPI + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string collectStats *bool } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHaGroupListRequest) Filter(filter string) ApiHaGroupListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHaGroupListRequest) OrderBy(orderBy string) ApiHaGroupListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHaGroupListRequest) Fields(fields string) ApiHaGroupListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHaGroupListRequest) Offset(offset int32) ApiHaGroupListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHaGroupListRequest) Limit(limit int32) ApiHaGroupListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHaGroupListRequest) PageToken(pageToken string) ApiHaGroupListRequest { r.pageToken = &pageToken return r @@ -408,24 +408,25 @@ HaGroupList Retrieve HA groups. Use this method to retrieve __HAGroup__ objects. The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ func (a *HaGroupAPIService) HaGroupList(ctx context.Context) ApiHaGroupListRequest { return ApiHaGroupListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListHAGroupResponse +// +// @return IpamsvcListHAGroupResponse func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListHAGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupList") @@ -528,14 +529,14 @@ func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*Ipamsv } type ApiHaGroupReadRequest struct { - ctx context.Context - ApiService HaGroupAPI - id string - fields *string + ctx context.Context + ApiService HaGroupAPI + id string + fields *string collectStats *bool } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHaGroupReadRequest) Fields(fields string) ApiHaGroupReadRequest { r.fields = &fields return r @@ -557,26 +558,27 @@ HaGroupRead Retrieve the HA group. Use this method to retrieve an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ func (a *HaGroupAPIService) HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest { return ApiHaGroupReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadHAGroupResponse +// +// @return IpamsvcReadHAGroupResponse func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadHAGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupRead") @@ -659,10 +661,10 @@ func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*Ipamsv } type ApiHaGroupUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HaGroupAPI - id string - body *IpamsvcHAGroup + id string + body *IpamsvcHAGroup } func (r ApiHaGroupUpdateRequest) Body(body IpamsvcHAGroup) ApiHaGroupUpdateRequest { @@ -680,26 +682,27 @@ HaGroupUpdate Update the HA group. Use this method to update an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ func (a *HaGroupAPIService) HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest { return ApiHaGroupUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateHAGroupResponse +// +// @return IpamsvcUpdateHAGroupResponse func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*IpamsvcUpdateHAGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateHAGroupResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateHAGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HaGroupAPIService.HaGroupUpdate") @@ -734,8 +737,8 @@ func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_hardware_filter.go b/ipam/api_hardware_filter.go index 22a0cdc..18649ed 100644 --- a/ipam/api_hardware_filter.go +++ b/ipam/api_hardware_filter.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type HardwareFilterAPI interface { /* - HardwareFilterCreate Create the hardware filter. + HardwareFilterCreate Create the hardware filter. - Use this method to create a __HardwareFilter__ object. -The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest @@ -38,27 +37,27 @@ The __HardwareFilter__ object applies options to clients with matching hardware // @return IpamsvcCreateHardwareFilterResponse HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) /* - HardwareFilterDelete Move the hardware filter to the recycle bin. + HardwareFilterDelete Move the hardware filter to the recycle bin. - Use this method to move a __HardwareFilter__ object to the recycle bin. -The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move a __HardwareFilter__ object to the recycle bin. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest // HardwareFilterDeleteExecute executes the request HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) /* - HardwareFilterList Retrieve hardware filters. + HardwareFilterList Retrieve hardware filters. - Use this method to retrieve __HardwareFilter__ objects. -The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __HardwareFilter__ objects. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest @@ -66,14 +65,14 @@ The __HardwareFilter__ object applies options to clients with matching hardware // @return IpamsvcListHardwareFilterResponse HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) /* - HardwareFilterRead Retrieve the hardware filter. + HardwareFilterRead Retrieve the hardware filter. - Use this method to retrieve a __HardwareFilter__ object. -The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest @@ -81,14 +80,14 @@ The __HardwareFilter__ object applies options to clients with matching hardware // @return IpamsvcReadHardwareFilterResponse HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) /* - HardwareFilterUpdate Update the hardware filter. + HardwareFilterUpdate Update the hardware filter. - Use this method to update a __HardwareFilter__ object. -The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest @@ -101,9 +100,9 @@ The __HardwareFilter__ object applies options to clients with matching hardware type HardwareFilterAPIService internal.Service type ApiHardwareFilterCreateRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - body *IpamsvcHardwareFilter + body *IpamsvcHardwareFilter } func (r ApiHardwareFilterCreateRequest) Body(body IpamsvcHardwareFilter) ApiHardwareFilterCreateRequest { @@ -121,24 +120,25 @@ HardwareFilterCreate Create the hardware filter. Use this method to create a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ func (a *HardwareFilterAPIService) HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest { return ApiHardwareFilterCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateHardwareFilterResponse +// +// @return IpamsvcCreateHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateHardwareFilterResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterCreate") @@ -172,16 +172,16 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt } type ApiHardwareFilterDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - id string + id string } func (r ApiHardwareFilterDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ HardwareFilterDelete Move the hardware filter to the recycle bin. Use this method to move a __HardwareFilter__ object to the recycle bin. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ func (a *HardwareFilterAPIService) HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest { return ApiHardwareFilterDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *HardwareFilterAPIService) HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterDelete") @@ -331,49 +331,49 @@ func (a *HardwareFilterAPIService) HardwareFilterDeleteExecute(r ApiHardwareFilt } type ApiHardwareFilterListRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHardwareFilterListRequest) Filter(filter string) ApiHardwareFilterListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHardwareFilterListRequest) OrderBy(orderBy string) ApiHardwareFilterListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHardwareFilterListRequest) Fields(fields string) ApiHardwareFilterListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHardwareFilterListRequest) Offset(offset int32) ApiHardwareFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHardwareFilterListRequest) Limit(limit int32) ApiHardwareFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHardwareFilterListRequest) PageToken(pageToken string) ApiHardwareFilterListRequest { r.pageToken = &pageToken return r @@ -401,24 +401,25 @@ HardwareFilterList Retrieve hardware filters. Use this method to retrieve __HardwareFilter__ objects. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ func (a *HardwareFilterAPIService) HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest { return ApiHardwareFilterListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListHardwareFilterResponse +// +// @return IpamsvcListHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListHardwareFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterList") @@ -518,13 +519,13 @@ func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilter } type ApiHardwareFilterReadRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHardwareFilterReadRequest) Fields(fields string) ApiHardwareFilterReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ HardwareFilterRead Retrieve the hardware filter. Use this method to retrieve a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ func (a *HardwareFilterAPIService) HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest { return ApiHardwareFilterReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadHardwareFilterResponse +// +// @return IpamsvcReadHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadHardwareFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterRead") @@ -639,10 +641,10 @@ func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilter } type ApiHardwareFilterUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService HardwareFilterAPI - id string - body *IpamsvcHardwareFilter + id string + body *IpamsvcHardwareFilter } func (r ApiHardwareFilterUpdateRequest) Body(body IpamsvcHardwareFilter) ApiHardwareFilterUpdateRequest { @@ -660,26 +662,27 @@ HardwareFilterUpdate Update the hardware filter. Use this method to update a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ func (a *HardwareFilterAPIService) HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest { return ApiHardwareFilterUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateHardwareFilterResponse +// +// @return IpamsvcUpdateHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilterUpdateRequest) (*IpamsvcUpdateHardwareFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateHardwareFilterResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateHardwareFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "HardwareFilterAPIService.HardwareFilterUpdate") @@ -714,16 +717,16 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_ip_space.go b/ipam/api_ip_space.go index 7873140..ac81c8b 100644 --- a/ipam/api_ip_space.go +++ b/ipam/api_ip_space.go @@ -18,24 +18,23 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type IpSpaceAPI interface { /* - IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. + IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. - Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. -The __IPSpace__ object represents an entire address space. -The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. + The __IPSpace__ object represents an entire address space. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. -The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. -The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. + The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. + The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest @@ -43,14 +42,14 @@ The _target_ specifies the _ipam/ip_space_ object to which the objects must be c // @return IpamsvcBulkCopyIPSpaceResponse IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) /* - IpSpaceCopy Copy the IP space. + IpSpaceCopy Copy the IP space. - Use this method to copy an __IPSpace__ object. -The __IPSpace__ object represents an entire address space. + Use this method to copy an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest @@ -58,13 +57,13 @@ The __IPSpace__ object represents an entire address space. // @return IpamsvcCopyIPSpaceResponse IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) /* - IpSpaceCreate Create the IP space. + IpSpaceCreate Create the IP space. - Use this method to create an __IPSpace__ object. -The __IPSpace__ object represents an entire address space. + Use this method to create an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest @@ -72,27 +71,27 @@ The __IPSpace__ object represents an entire address space. // @return IpamsvcCreateIPSpaceResponse IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) /* - IpSpaceDelete Move the IP space to the recycle bin. + IpSpaceDelete Move the IP space to the recycle bin. - Use this method to move an __IPSpace__ object to the recycle bin. -The __IPSpace__ object represents an entire address space. + Use this method to move an __IPSpace__ object to the recycle bin. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest // IpSpaceDeleteExecute executes the request IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) /* - IpSpaceList Retrieve IP spaces. + IpSpaceList Retrieve IP spaces. - Use this method to retrieve __IPSpace__ objects. -The __IPSpace__ object represents an entire address space. + Use this method to retrieve __IPSpace__ objects. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ IpSpaceList(ctx context.Context) ApiIpSpaceListRequest @@ -100,14 +99,14 @@ The __IPSpace__ object represents an entire address space. // @return IpamsvcListIPSpaceResponse IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) /* - IpSpaceRead Retrieve the IP space. + IpSpaceRead Retrieve the IP space. - Use this method to retrieve an __IPSpace__ object. -The __IPSpace__ object represents an entire address space. + Use this method to retrieve an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest @@ -115,14 +114,14 @@ The __IPSpace__ object represents an entire address space. // @return IpamsvcReadIPSpaceResponse IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) /* - IpSpaceUpdate Update the IP space. + IpSpaceUpdate Update the IP space. - Use this method to update an __IPSpace__ object. -The __IPSpace__ object represents an entire address space. + Use this method to update an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest @@ -135,9 +134,9 @@ The __IPSpace__ object represents an entire address space. type IpSpaceAPIService internal.Service type ApiIpSpaceBulkCopyRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - body *IpamsvcBulkCopyIPSpace + body *IpamsvcBulkCopyIPSpace } func (r ApiIpSpaceBulkCopyRequest) Body(body IpamsvcBulkCopyIPSpace) ApiIpSpaceBulkCopyRequest { @@ -160,24 +159,25 @@ The __Subnet__ object represents a set of addresses from which addresses are ass The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ func (a *IpSpaceAPIService) IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest { return ApiIpSpaceBulkCopyRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcBulkCopyIPSpaceResponse +// +// @return IpamsvcBulkCopyIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcBulkCopyIPSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcBulkCopyIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceBulkCopy") @@ -211,8 +211,8 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -258,10 +258,10 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) } type ApiIpSpaceCopyRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string - body *IpamsvcCopyIPSpace + id string + body *IpamsvcCopyIPSpace } func (r ApiIpSpaceCopyRequest) Body(body IpamsvcCopyIPSpace) ApiIpSpaceCopyRequest { @@ -279,26 +279,27 @@ IpSpaceCopy Copy the IP space. Use this method to copy an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ func (a *IpSpaceAPIService) IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest { return ApiIpSpaceCopyRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCopyIPSpaceResponse +// +// @return IpamsvcCopyIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCopyIPSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCopyIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceCopy") @@ -333,8 +334,8 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -380,10 +381,10 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv } type ApiIpSpaceCreateRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - body *IpamsvcIPSpace - inherit *string + body *IpamsvcIPSpace + inherit *string } func (r ApiIpSpaceCreateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceCreateRequest { @@ -407,24 +408,25 @@ IpSpaceCreate Create the IP space. Use this method to create an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ func (a *IpSpaceAPIService) IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest { return ApiIpSpaceCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateIPSpaceResponse +// +// @return IpamsvcCreateIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateIPSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceCreate") @@ -461,16 +463,16 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -516,9 +518,9 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip } type ApiIpSpaceDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string + id string } func (r ApiIpSpaceDeleteRequest) Execute() (*http.Response, error) { @@ -531,24 +533,24 @@ IpSpaceDelete Move the IP space to the recycle bin. Use this method to move an __IPSpace__ object to the recycle bin. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ func (a *IpSpaceAPIService) IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest { return ApiIpSpaceDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *IpSpaceAPIService) IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceDelete") @@ -620,50 +622,50 @@ func (a *IpSpaceAPIService) IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*ht } type ApiIpSpaceListRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string - inherit *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpSpaceListRequest) Fields(fields string) ApiIpSpaceListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiIpSpaceListRequest) Filter(filter string) ApiIpSpaceListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiIpSpaceListRequest) Offset(offset int32) ApiIpSpaceListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiIpSpaceListRequest) Limit(limit int32) ApiIpSpaceListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiIpSpaceListRequest) PageToken(pageToken string) ApiIpSpaceListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpSpaceListRequest) OrderBy(orderBy string) ApiIpSpaceListRequest { r.orderBy = &orderBy return r @@ -697,24 +699,25 @@ IpSpaceList Retrieve IP spaces. Use this method to retrieve __IPSpace__ objects. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ func (a *IpSpaceAPIService) IpSpaceList(ctx context.Context) ApiIpSpaceListRequest { return ApiIpSpaceListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListIPSpaceResponse +// +// @return IpamsvcListIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListIPSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceList") @@ -817,14 +820,14 @@ func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*Ipamsv } type ApiIpSpaceReadRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpSpaceReadRequest) Fields(fields string) ApiIpSpaceReadRequest { r.fields = &fields return r @@ -846,26 +849,27 @@ IpSpaceRead Retrieve the IP space. Use this method to retrieve an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ func (a *IpSpaceAPIService) IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest { return ApiIpSpaceReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadIPSpaceResponse +// +// @return IpamsvcReadIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadIPSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceRead") @@ -948,11 +952,11 @@ func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*Ipamsv } type ApiIpSpaceUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService IpSpaceAPI - id string - body *IpamsvcIPSpace - inherit *string + id string + body *IpamsvcIPSpace + inherit *string } func (r ApiIpSpaceUpdateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceUpdateRequest { @@ -976,26 +980,27 @@ IpSpaceUpdate Update the IP space. Use this method to update an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ func (a *IpSpaceAPIService) IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest { return ApiIpSpaceUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateIPSpaceResponse +// +// @return IpamsvcUpdateIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*IpamsvcUpdateIPSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateIPSpaceResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateIPSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpSpaceAPIService.IpSpaceUpdate") @@ -1033,16 +1038,16 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_ipam_host.go b/ipam/api_ipam_host.go index ab207b7..7e562ec 100644 --- a/ipam/api_ipam_host.go +++ b/ipam/api_ipam_host.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type IpamHostAPI interface { /* - IpamHostCreate Create the IPAM host. + IpamHostCreate Create the IPAM host. - Use this method to create an __IpamHost__ object. -The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to create an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest @@ -38,27 +37,27 @@ The __IpamHost__ object (_ipam/host_) represents any network connected equipment // @return IpamsvcCreateIpamHostResponse IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) /* - IpamHostDelete Move the IPAM host to the recycle bin. + IpamHostDelete Move the IPAM host to the recycle bin. - Use this method to move an __IpamHost__ object to the recycle bin. -The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to move an __IpamHost__ object to the recycle bin. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest // IpamHostDeleteExecute executes the request IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) /* - IpamHostList Retrieve the IPAM hosts. + IpamHostList Retrieve the IPAM hosts. - Use this method to retrieve __IpamHost__ objects. -The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve __IpamHost__ objects. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ IpamHostList(ctx context.Context) ApiIpamHostListRequest @@ -66,14 +65,14 @@ The __IpamHost__ object (_ipam/host_) represents any network connected equipment // @return IpamsvcListIpamHostResponse IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) /* - IpamHostRead Retrieve the IPAM host. + IpamHostRead Retrieve the IPAM host. - Use this method to retrieve an __IpamHost__ object. -The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest @@ -81,14 +80,14 @@ The __IpamHost__ object (_ipam/host_) represents any network connected equipment // @return IpamsvcReadIpamHostResponse IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) /* - IpamHostUpdate Update the IPAM host. + IpamHostUpdate Update the IPAM host. - Use this method to update an __IpamHost__ object. -The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to update an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest @@ -101,9 +100,9 @@ The __IpamHost__ object (_ipam/host_) represents any network connected equipment type IpamHostAPIService internal.Service type ApiIpamHostCreateRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - body *IpamsvcIpamHost + body *IpamsvcIpamHost } func (r ApiIpamHostCreateRequest) Body(body IpamsvcIpamHost) ApiIpamHostCreateRequest { @@ -121,24 +120,25 @@ IpamHostCreate Create the IPAM host. Use this method to create an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ func (a *IpamHostAPIService) IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest { return ApiIpamHostCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateIpamHostResponse +// +// @return IpamsvcCreateIpamHostResponse func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateIpamHostResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostCreate") @@ -172,16 +172,16 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( } type ApiIpamHostDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - id string + id string } func (r ApiIpamHostDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ IpamHostDelete Move the IPAM host to the recycle bin. Use this method to move an __IpamHost__ object to the recycle bin. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ func (a *IpamHostAPIService) IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest { return ApiIpamHostDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *IpamHostAPIService) IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostDelete") @@ -331,49 +331,49 @@ func (a *IpamHostAPIService) IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) ( } type ApiIpamHostListRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - fields *string - orderBy *string - filter *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string + fields *string + orderBy *string + filter *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpamHostListRequest) Fields(fields string) ApiIpamHostListRequest { r.fields = &fields return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpamHostListRequest) OrderBy(orderBy string) ApiIpamHostListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiIpamHostListRequest) Filter(filter string) ApiIpamHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiIpamHostListRequest) Offset(offset int32) ApiIpamHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiIpamHostListRequest) Limit(limit int32) ApiIpamHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiIpamHostListRequest) PageToken(pageToken string) ApiIpamHostListRequest { r.pageToken = &pageToken return r @@ -401,24 +401,25 @@ IpamHostList Retrieve the IPAM hosts. Use this method to retrieve __IpamHost__ objects. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ func (a *IpamHostAPIService) IpamHostList(ctx context.Context) ApiIpamHostListRequest { return ApiIpamHostListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListIpamHostResponse +// +// @return IpamsvcListIpamHostResponse func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListIpamHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostList") @@ -518,20 +519,20 @@ func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*Ipa } type ApiIpamHostReadRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - id string - orderBy *string - fields *string + id string + orderBy *string + fields *string } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpamHostReadRequest) OrderBy(orderBy string) ApiIpamHostReadRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpamHostReadRequest) Fields(fields string) ApiIpamHostReadRequest { r.fields = &fields return r @@ -547,26 +548,27 @@ IpamHostRead Retrieve the IPAM host. Use this method to retrieve an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ func (a *IpamHostAPIService) IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest { return ApiIpamHostReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadIpamHostResponse +// +// @return IpamsvcReadIpamHostResponse func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadIpamHostResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostRead") @@ -649,10 +651,10 @@ func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*Ipa } type ApiIpamHostUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService IpamHostAPI - id string - body *IpamsvcIpamHost + id string + body *IpamsvcIpamHost } func (r ApiIpamHostUpdateRequest) Body(body IpamsvcIpamHost) ApiIpamHostUpdateRequest { @@ -670,26 +672,27 @@ IpamHostUpdate Update the IPAM host. Use this method to update an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ func (a *IpamHostAPIService) IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest { return ApiIpamHostUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateIpamHostResponse +// +// @return IpamsvcUpdateIpamHostResponse func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) (*IpamsvcUpdateIpamHostResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateIpamHostResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateIpamHostResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "IpamHostAPIService.IpamHostUpdate") @@ -724,16 +727,16 @@ func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_leases_command.go b/ipam/api_leases_command.go index 15bce95..02fb0c3 100644 --- a/ipam/api_leases_command.go +++ b/ipam/api_leases_command.go @@ -17,19 +17,18 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type LeasesCommandAPI interface { /* - LeasesCommandCreate Perform actions like clearing DHCP lease(s). + LeasesCommandCreate Perform actions like clearing DHCP lease(s). - Use this method to create a __LeasesCommand__ object. -The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). + Use this method to create a __LeasesCommand__ object. + The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest @@ -42,9 +41,9 @@ The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an a type LeasesCommandAPIService internal.Service type ApiLeasesCommandCreateRequest struct { - ctx context.Context + ctx context.Context ApiService LeasesCommandAPI - body *IpamsvcLeasesCommand + body *IpamsvcLeasesCommand } func (r ApiLeasesCommandCreateRequest) Body(body IpamsvcLeasesCommand) ApiLeasesCommandCreateRequest { @@ -62,24 +61,25 @@ LeasesCommandCreate Perform actions like clearing DHCP lease(s). Use this method to create a __LeasesCommand__ object. The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ func (a *LeasesCommandAPIService) LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest { return ApiLeasesCommandCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateLeasesCommandResponse +// +// @return IpamsvcCreateLeasesCommandResponse func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandCreateRequest) (*IpamsvcCreateLeasesCommandResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateLeasesCommandResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateLeasesCommandResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "LeasesCommandAPIService.LeasesCommandCreate") @@ -113,8 +113,8 @@ func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_code.go b/ipam/api_option_code.go index 1dccb2a..17006da 100644 --- a/ipam/api_option_code.go +++ b/ipam/api_option_code.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type OptionCodeAPI interface { /* - OptionCodeCreate Create the DHCP option code. + OptionCodeCreate Create the DHCP option code. - Use this method to create an __OptionCode__ object. -The __OptionCode__ object defines a DHCP option code. + Use this method to create an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest @@ -38,27 +37,27 @@ The __OptionCode__ object defines a DHCP option code. // @return IpamsvcCreateOptionCodeResponse OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) /* - OptionCodeDelete Delete the DHCP option code. + OptionCodeDelete Delete the DHCP option code. - Use this method to delete an __OptionCode__ object. -The __OptionCode__ object defines a DHCP option code. + Use this method to delete an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest // OptionCodeDeleteExecute executes the request OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) /* - OptionCodeList Retrieve DHCP option codes. + OptionCodeList Retrieve DHCP option codes. - Use this method to retrieve __OptionCode__ objects. -The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve __OptionCode__ objects. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ OptionCodeList(ctx context.Context) ApiOptionCodeListRequest @@ -66,14 +65,14 @@ The __OptionCode__ object defines a DHCP option code. // @return IpamsvcListOptionCodeResponse OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) /* - OptionCodeRead Retrieve the DHCP option code. + OptionCodeRead Retrieve the DHCP option code. - Use this method to retrieve an __OptionCode__ object. -The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest @@ -81,14 +80,14 @@ The __OptionCode__ object defines a DHCP option code. // @return IpamsvcReadOptionCodeResponse OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) /* - OptionCodeUpdate Update the DHCP option code. + OptionCodeUpdate Update the DHCP option code. - Use this method to update an __OptionCode__ object. -The __OptionCode__ object defines a DHCP option code. + Use this method to update an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest @@ -101,9 +100,9 @@ The __OptionCode__ object defines a DHCP option code. type OptionCodeAPIService internal.Service type ApiOptionCodeCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - body *IpamsvcOptionCode + body *IpamsvcOptionCode } func (r ApiOptionCodeCreateRequest) Body(body IpamsvcOptionCode) ApiOptionCodeCreateRequest { @@ -121,24 +120,25 @@ OptionCodeCreate Create the DHCP option code. Use this method to create an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ func (a *OptionCodeAPIService) OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest { return ApiOptionCodeCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateOptionCodeResponse +// +// @return IpamsvcCreateOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionCodeResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeCreate") @@ -172,8 +172,8 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -219,9 +219,9 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ } type ApiOptionCodeDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - id string + id string } func (r ApiOptionCodeDeleteRequest) Execute() (*http.Response, error) { @@ -234,24 +234,24 @@ OptionCodeDelete Delete the DHCP option code. Use this method to delete an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ func (a *OptionCodeAPIService) OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest { return ApiOptionCodeDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionCodeAPIService) OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeDelete") @@ -323,47 +323,47 @@ func (a *OptionCodeAPIService) OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequ } type ApiOptionCodeListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionCodeListRequest) Fields(fields string) ApiOptionCodeListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionCodeListRequest) Filter(filter string) ApiOptionCodeListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionCodeListRequest) Offset(offset int32) ApiOptionCodeListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionCodeListRequest) Limit(limit int32) ApiOptionCodeListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionCodeListRequest) PageToken(pageToken string) ApiOptionCodeListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionCodeListRequest) OrderBy(orderBy string) ApiOptionCodeListRequest { r.orderBy = &orderBy return r @@ -379,24 +379,25 @@ OptionCodeList Retrieve DHCP option codes. Use this method to retrieve __OptionCode__ objects. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ func (a *OptionCodeAPIService) OptionCodeList(ctx context.Context) ApiOptionCodeListRequest { return ApiOptionCodeListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListOptionCodeResponse +// +// @return IpamsvcListOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionCodeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeList") @@ -490,13 +491,13 @@ func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) } type ApiOptionCodeReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionCodeReadRequest) Fields(fields string) ApiOptionCodeReadRequest { r.fields = &fields return r @@ -512,26 +513,27 @@ OptionCodeRead Retrieve the DHCP option code. Use this method to retrieve an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ func (a *OptionCodeAPIService) OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest { return ApiOptionCodeReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadOptionCodeResponse +// +// @return IpamsvcReadOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionCodeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeRead") @@ -611,10 +613,10 @@ func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) } type ApiOptionCodeUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionCodeAPI - id string - body *IpamsvcOptionCode + id string + body *IpamsvcOptionCode } func (r ApiOptionCodeUpdateRequest) Body(body IpamsvcOptionCode) ApiOptionCodeUpdateRequest { @@ -632,26 +634,27 @@ OptionCodeUpdate Update the DHCP option code. Use this method to update an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ func (a *OptionCodeAPIService) OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest { return ApiOptionCodeUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateOptionCodeResponse +// +// @return IpamsvcUpdateOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequest) (*IpamsvcUpdateOptionCodeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionCodeResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionCodeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionCodeAPIService.OptionCodeUpdate") @@ -686,8 +689,8 @@ func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_filter.go b/ipam/api_option_filter.go index 766d53f..f49e936 100644 --- a/ipam/api_option_filter.go +++ b/ipam/api_option_filter.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type OptionFilterAPI interface { /* - OptionFilterCreate Create the DHCP option filter. + OptionFilterCreate Create the DHCP option filter. - Use this method to create an __OptionFilter__ object. -The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest @@ -38,27 +37,27 @@ The __OptionFilter__ object applies options to DHCP clients with matching option // @return IpamsvcCreateOptionFilterResponse OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) /* - OptionFilterDelete Move the DHCP option filter to the recycle bin. + OptionFilterDelete Move the DHCP option filter to the recycle bin. - Use this method to move an __OptionFilter__ object to the recycle bin. -The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move an __OptionFilter__ object to the recycle bin. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest // OptionFilterDeleteExecute executes the request OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) /* - OptionFilterList Retrieve DHCP option filters. + OptionFilterList Retrieve DHCP option filters. - Use this method to retrieve __OptionFilter__ objects. -The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __OptionFilter__ objects. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ OptionFilterList(ctx context.Context) ApiOptionFilterListRequest @@ -66,14 +65,14 @@ The __OptionFilter__ object applies options to DHCP clients with matching option // @return IpamsvcListOptionFilterResponse OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) /* - OptionFilterRead Retrieve the DHCP option filter. + OptionFilterRead Retrieve the DHCP option filter. - Use this method to retrieve an __OptionFilter__ object. -The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest @@ -81,14 +80,14 @@ The __OptionFilter__ object applies options to DHCP clients with matching option // @return IpamsvcReadOptionFilterResponse OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) /* - OptionFilterUpdate Update the DHCP option filter. + OptionFilterUpdate Update the DHCP option filter. - Use this method to update an __OptionFilter__ object. -The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest @@ -101,9 +100,9 @@ The __OptionFilter__ object applies options to DHCP clients with matching option type OptionFilterAPIService internal.Service type ApiOptionFilterCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - body *IpamsvcOptionFilter + body *IpamsvcOptionFilter } func (r ApiOptionFilterCreateRequest) Body(body IpamsvcOptionFilter) ApiOptionFilterCreateRequest { @@ -121,24 +120,25 @@ OptionFilterCreate Create the DHCP option filter. Use this method to create an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ func (a *OptionFilterAPIService) OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest { return ApiOptionFilterCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateOptionFilterResponse +// +// @return IpamsvcCreateOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionFilterResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterCreate") @@ -172,16 +172,16 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea } type ApiOptionFilterDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - id string + id string } func (r ApiOptionFilterDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ OptionFilterDelete Move the DHCP option filter to the recycle bin. Use this method to move an __OptionFilter__ object to the recycle bin. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ func (a *OptionFilterAPIService) OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest { return ApiOptionFilterDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionFilterAPIService) OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterDelete") @@ -331,49 +331,49 @@ func (a *OptionFilterAPIService) OptionFilterDeleteExecute(r ApiOptionFilterDele } type ApiOptionFilterListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionFilterListRequest) Fields(fields string) ApiOptionFilterListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionFilterListRequest) Filter(filter string) ApiOptionFilterListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionFilterListRequest) Offset(offset int32) ApiOptionFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionFilterListRequest) Limit(limit int32) ApiOptionFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionFilterListRequest) PageToken(pageToken string) ApiOptionFilterListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionFilterListRequest) OrderBy(orderBy string) ApiOptionFilterListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ OptionFilterList Retrieve DHCP option filters. Use this method to retrieve __OptionFilter__ objects. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ func (a *OptionFilterAPIService) OptionFilterList(ctx context.Context) ApiOptionFilterListRequest { return ApiOptionFilterListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListOptionFilterResponse +// +// @return IpamsvcListOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterList") @@ -518,13 +519,13 @@ func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRe } type ApiOptionFilterReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionFilterReadRequest) Fields(fields string) ApiOptionFilterReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ OptionFilterRead Retrieve the DHCP option filter. Use this method to retrieve an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ func (a *OptionFilterAPIService) OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest { return ApiOptionFilterReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadOptionFilterResponse +// +// @return IpamsvcReadOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionFilterResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterRead") @@ -639,10 +641,10 @@ func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRe } type ApiOptionFilterUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionFilterAPI - id string - body *IpamsvcOptionFilter + id string + body *IpamsvcOptionFilter } func (r ApiOptionFilterUpdateRequest) Body(body IpamsvcOptionFilter) ApiOptionFilterUpdateRequest { @@ -660,26 +662,27 @@ OptionFilterUpdate Update the DHCP option filter. Use this method to update an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ func (a *OptionFilterAPIService) OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest { return ApiOptionFilterUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateOptionFilterResponse +// +// @return IpamsvcUpdateOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpdateRequest) (*IpamsvcUpdateOptionFilterResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionFilterResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionFilterResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionFilterAPIService.OptionFilterUpdate") @@ -714,16 +717,16 @@ func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_group.go b/ipam/api_option_group.go index 3bad02a..b91cbbd 100644 --- a/ipam/api_option_group.go +++ b/ipam/api_option_group.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type OptionGroupAPI interface { /* - OptionGroupCreate Create the DHCP option group. + OptionGroupCreate Create the DHCP option group. - Use this method to create an __OptionGroup__ object. -The __OptionGroup__ object is a named collection of options. + Use this method to create an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest @@ -38,27 +37,27 @@ The __OptionGroup__ object is a named collection of options. // @return IpamsvcCreateOptionGroupResponse OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) /* - OptionGroupDelete Move the DHCP option group to the recycle bin. + OptionGroupDelete Move the DHCP option group to the recycle bin. - Use this method to move an __OptionGroup__ object to the recycle bin. -The __OptionGroup__ object is a named collection of options. + Use this method to move an __OptionGroup__ object to the recycle bin. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest // OptionGroupDeleteExecute executes the request OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) /* - OptionGroupList Retrieve DHCP option groups. + OptionGroupList Retrieve DHCP option groups. - Use this method to retrieve __OptionGroup__ objects. -The __OptionGroup__ object is a named collection of options. + Use this method to retrieve __OptionGroup__ objects. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ OptionGroupList(ctx context.Context) ApiOptionGroupListRequest @@ -66,14 +65,14 @@ The __OptionGroup__ object is a named collection of options. // @return IpamsvcListOptionGroupResponse OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) /* - OptionGroupRead Retrieve the DHCP option group. + OptionGroupRead Retrieve the DHCP option group. - Use this method to retrieve an __OptionGroup__ object. -The __OptionGroup__ object is a named collection of options. + Use this method to retrieve an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest @@ -81,14 +80,14 @@ The __OptionGroup__ object is a named collection of options. // @return IpamsvcReadOptionGroupResponse OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) /* - OptionGroupUpdate Update the DHCP option group. + OptionGroupUpdate Update the DHCP option group. - Use this method to update an __OptionGroup__ object. -The __OptionGroup__ object is a named collection of options. + Use this method to update an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest @@ -101,9 +100,9 @@ The __OptionGroup__ object is a named collection of options. type OptionGroupAPIService internal.Service type ApiOptionGroupCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - body *IpamsvcOptionGroup + body *IpamsvcOptionGroup } func (r ApiOptionGroupCreateRequest) Body(body IpamsvcOptionGroup) ApiOptionGroupCreateRequest { @@ -121,24 +120,25 @@ OptionGroupCreate Create the DHCP option group. Use this method to create an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ func (a *OptionGroupAPIService) OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest { return ApiOptionGroupCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateOptionGroupResponse +// +// @return IpamsvcCreateOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionGroupResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupCreate") @@ -172,16 +172,16 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR } type ApiOptionGroupDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - id string + id string } func (r ApiOptionGroupDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ OptionGroupDelete Move the DHCP option group to the recycle bin. Use this method to move an __OptionGroup__ object to the recycle bin. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ func (a *OptionGroupAPIService) OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest { return ApiOptionGroupDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionGroupAPIService) OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupDelete") @@ -331,49 +331,49 @@ func (a *OptionGroupAPIService) OptionGroupDeleteExecute(r ApiOptionGroupDeleteR } type ApiOptionGroupListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionGroupListRequest) Fields(fields string) ApiOptionGroupListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionGroupListRequest) Filter(filter string) ApiOptionGroupListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionGroupListRequest) Offset(offset int32) ApiOptionGroupListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionGroupListRequest) Limit(limit int32) ApiOptionGroupListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionGroupListRequest) PageToken(pageToken string) ApiOptionGroupListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionGroupListRequest) OrderBy(orderBy string) ApiOptionGroupListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ OptionGroupList Retrieve DHCP option groups. Use this method to retrieve __OptionGroup__ objects. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ func (a *OptionGroupAPIService) OptionGroupList(ctx context.Context) ApiOptionGroupListRequest { return ApiOptionGroupListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListOptionGroupResponse +// +// @return IpamsvcListOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupList") @@ -518,13 +519,13 @@ func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListReque } type ApiOptionGroupReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionGroupReadRequest) Fields(fields string) ApiOptionGroupReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ OptionGroupRead Retrieve the DHCP option group. Use this method to retrieve an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ func (a *OptionGroupAPIService) OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest { return ApiOptionGroupReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadOptionGroupResponse +// +// @return IpamsvcReadOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionGroupResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupRead") @@ -639,10 +641,10 @@ func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadReque } type ApiOptionGroupUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionGroupAPI - id string - body *IpamsvcOptionGroup + id string + body *IpamsvcOptionGroup } func (r ApiOptionGroupUpdateRequest) Body(body IpamsvcOptionGroup) ApiOptionGroupUpdateRequest { @@ -660,26 +662,27 @@ OptionGroupUpdate Update the DHCP option group. Use this method to update an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ func (a *OptionGroupAPIService) OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest { return ApiOptionGroupUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateOptionGroupResponse +// +// @return IpamsvcUpdateOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateRequest) (*IpamsvcUpdateOptionGroupResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionGroupResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionGroupResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionGroupAPIService.OptionGroupUpdate") @@ -714,16 +717,16 @@ func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_option_space.go b/ipam/api_option_space.go index 1bf3c1d..babcf62 100644 --- a/ipam/api_option_space.go +++ b/ipam/api_option_space.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type OptionSpaceAPI interface { /* - OptionSpaceCreate Create the DHCP option space. + OptionSpaceCreate Create the DHCP option space. - Use this method to create an __OptionSpace__ object. -The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to create an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest @@ -38,27 +37,27 @@ The __OptionSpace__ object represents a set of DHCP option codes. // @return IpamsvcCreateOptionSpaceResponse OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) /* - OptionSpaceDelete Move the DHCP option space to the recycle bin. + OptionSpaceDelete Move the DHCP option space to the recycle bin. - Use this method to move an __OptionSpace__ object to the recycle bin. -The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to move an __OptionSpace__ object to the recycle bin. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest // OptionSpaceDeleteExecute executes the request OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) /* - OptionSpaceList Retrieve DHCP option spaces. + OptionSpaceList Retrieve DHCP option spaces. - Use this method to retrieve __OptionSpace__ objects. -The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve __OptionSpace__ objects. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest @@ -66,14 +65,14 @@ The __OptionSpace__ object represents a set of DHCP option codes. // @return IpamsvcListOptionSpaceResponse OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) /* - OptionSpaceRead Retrieve the DHCP option space. + OptionSpaceRead Retrieve the DHCP option space. - Use this method to retrieve an __OptionSpace__ object. -The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest @@ -81,14 +80,14 @@ The __OptionSpace__ object represents a set of DHCP option codes. // @return IpamsvcReadOptionSpaceResponse OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) /* - OptionSpaceUpdate Update the DHCP option space. + OptionSpaceUpdate Update the DHCP option space. - Use this method to update an __OptionSpace__ object. -The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to update an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest @@ -101,9 +100,9 @@ The __OptionSpace__ object represents a set of DHCP option codes. type OptionSpaceAPIService internal.Service type ApiOptionSpaceCreateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - body *IpamsvcOptionSpace + body *IpamsvcOptionSpace } func (r ApiOptionSpaceCreateRequest) Body(body IpamsvcOptionSpace) ApiOptionSpaceCreateRequest { @@ -121,24 +120,25 @@ OptionSpaceCreate Create the DHCP option space. Use this method to create an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ func (a *OptionSpaceAPIService) OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest { return ApiOptionSpaceCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateOptionSpaceResponse +// +// @return IpamsvcCreateOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateOptionSpaceResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceCreate") @@ -172,16 +172,16 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR } type ApiOptionSpaceDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - id string + id string } func (r ApiOptionSpaceDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ OptionSpaceDelete Move the DHCP option space to the recycle bin. Use this method to move an __OptionSpace__ object to the recycle bin. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ func (a *OptionSpaceAPIService) OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest { return ApiOptionSpaceDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *OptionSpaceAPIService) OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceDelete") @@ -331,49 +331,49 @@ func (a *OptionSpaceAPIService) OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteR } type ApiOptionSpaceListRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionSpaceListRequest) Fields(fields string) ApiOptionSpaceListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionSpaceListRequest) Filter(filter string) ApiOptionSpaceListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionSpaceListRequest) Offset(offset int32) ApiOptionSpaceListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionSpaceListRequest) Limit(limit int32) ApiOptionSpaceListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionSpaceListRequest) PageToken(pageToken string) ApiOptionSpaceListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionSpaceListRequest) OrderBy(orderBy string) ApiOptionSpaceListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ OptionSpaceList Retrieve DHCP option spaces. Use this method to retrieve __OptionSpace__ objects. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ func (a *OptionSpaceAPIService) OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest { return ApiOptionSpaceListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListOptionSpaceResponse +// +// @return IpamsvcListOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListOptionSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceList") @@ -518,13 +519,13 @@ func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListReque } type ApiOptionSpaceReadRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionSpaceReadRequest) Fields(fields string) ApiOptionSpaceReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ OptionSpaceRead Retrieve the DHCP option space. Use this method to retrieve an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ func (a *OptionSpaceAPIService) OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest { return ApiOptionSpaceReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadOptionSpaceResponse +// +// @return IpamsvcReadOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadOptionSpaceResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceRead") @@ -639,10 +641,10 @@ func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadReque } type ApiOptionSpaceUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService OptionSpaceAPI - id string - body *IpamsvcOptionSpace + id string + body *IpamsvcOptionSpace } func (r ApiOptionSpaceUpdateRequest) Body(body IpamsvcOptionSpace) ApiOptionSpaceUpdateRequest { @@ -660,26 +662,27 @@ OptionSpaceUpdate Update the DHCP option space. Use this method to update an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ func (a *OptionSpaceAPIService) OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest { return ApiOptionSpaceUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateOptionSpaceResponse +// +// @return IpamsvcUpdateOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateRequest) (*IpamsvcUpdateOptionSpaceResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateOptionSpaceResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateOptionSpaceResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "OptionSpaceAPIService.OptionSpaceUpdate") @@ -714,16 +717,16 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_range.go b/ipam/api_range.go index 4b8e6ce..e0f0bd6 100644 --- a/ipam/api_range.go +++ b/ipam/api_range.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type RangeAPI interface { /* - RangeCreate Create the range. + RangeCreate Create the range. - Use this method to create a __Range__ object. -A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to create a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ RangeCreate(ctx context.Context) ApiRangeCreateRequest @@ -38,14 +37,14 @@ A __Range__ object represents a set of contiguous IP addresses in the same IP sp // @return IpamsvcCreateRangeResponse RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) /* - RangeCreateNextAvailableIP Allocate the next available IP address. + RangeCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. -This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest @@ -53,27 +52,27 @@ This allocates one or more __Address__ (_ipam/address_) resource from available // @return IpamsvcCreateNextAvailableIPResponse RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - RangeDelete Move the range to the recycle bin. + RangeDelete Move the range to the recycle bin. - Use this method to move a __Range__ object to the recycle bin. -A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to move a __Range__ object to the recycle bin. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest // RangeDeleteExecute executes the request RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) /* - RangeList Retrieve ranges. + RangeList Retrieve ranges. - Use this method to retrieve __Range__ objects. -A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve __Range__ objects. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ RangeList(ctx context.Context) ApiRangeListRequest @@ -81,14 +80,14 @@ A __Range__ object represents a set of contiguous IP addresses in the same IP sp // @return IpamsvcListRangeResponse RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) /* - RangeListNextAvailableIP Retrieve the next available IP address. + RangeListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. -This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest @@ -96,14 +95,14 @@ This returns one or more __Address__ (_ipam/address_) resource from available ad // @return IpamsvcNextAvailableIPResponse RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - RangeRead Retrieve the range. + RangeRead Retrieve the range. - Use this method to retrieve a __Range__ object. -A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ RangeRead(ctx context.Context, id string) ApiRangeReadRequest @@ -111,14 +110,14 @@ A __Range__ object represents a set of contiguous IP addresses in the same IP sp // @return IpamsvcReadRangeResponse RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) /* - RangeUpdate Update the range. + RangeUpdate Update the range. - Use this method to update a __Range__ object. -A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to update a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest @@ -131,10 +130,10 @@ A __Range__ object represents a set of contiguous IP addresses in the same IP sp type RangeAPIService internal.Service type ApiRangeCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - body *IpamsvcRange - inherit *string + body *IpamsvcRange + inherit *string } func (r ApiRangeCreateRequest) Body(body IpamsvcRange) ApiRangeCreateRequest { @@ -158,24 +157,25 @@ RangeCreate Create the range. Use this method to create a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ func (a *RangeAPIService) RangeCreate(ctx context.Context) ApiRangeCreateRequest { return ApiRangeCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateRangeResponse +// +// @return IpamsvcCreateRangeResponse func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateRangeResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeCreate") @@ -212,16 +212,16 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -267,11 +267,11 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC } type ApiRangeCreateNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -296,26 +296,27 @@ RangeCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ func (a *RangeAPIService) RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest { return ApiRangeCreateNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCreateNextAvailableIPResponse +// +// @return IpamsvcCreateNextAvailableIPResponse func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableIPResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeCreateNextAvailableIP") @@ -404,9 +405,9 @@ func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNext } type ApiRangeDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string + id string } func (r ApiRangeDeleteRequest) Execute() (*http.Response, error) { @@ -419,24 +420,24 @@ RangeDelete Move the range to the recycle bin. Use this method to move a __Range__ object to the recycle bin. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ func (a *RangeAPIService) RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest { return ApiRangeDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RangeAPIService) RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeDelete") @@ -508,50 +509,50 @@ func (a *RangeAPIService) RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Res } type ApiRangeListRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string - inherit *string + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string + inherit *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRangeListRequest) Filter(filter string) ApiRangeListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRangeListRequest) OrderBy(orderBy string) ApiRangeListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRangeListRequest) Fields(fields string) ApiRangeListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRangeListRequest) Offset(offset int32) ApiRangeListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRangeListRequest) Limit(limit int32) ApiRangeListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRangeListRequest) PageToken(pageToken string) ApiRangeListRequest { r.pageToken = &pageToken return r @@ -585,24 +586,25 @@ RangeList Retrieve ranges. Use this method to retrieve __Range__ objects. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ func (a *RangeAPIService) RangeList(ctx context.Context) ApiRangeListRequest { return ApiRangeListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListRangeResponse +// +// @return IpamsvcListRangeResponse func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListRangeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeList") @@ -705,11 +707,11 @@ func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListR } type ApiRangeListNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -734,26 +736,27 @@ RangeListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ func (a *RangeAPIService) RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest { return ApiRangeListNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcNextAvailableIPResponse +// +// @return IpamsvcNextAvailableIPResponse func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableIPResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeListNextAvailableIP") @@ -836,14 +839,14 @@ func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvai } type ApiRangeReadRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRangeReadRequest) Fields(fields string) ApiRangeReadRequest { r.fields = &fields return r @@ -865,26 +868,27 @@ RangeRead Retrieve the range. Use this method to retrieve a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ func (a *RangeAPIService) RangeRead(ctx context.Context, id string) ApiRangeReadRequest { return ApiRangeReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadRangeResponse +// +// @return IpamsvcReadRangeResponse func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadRangeResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeRead") @@ -967,11 +971,11 @@ func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadR } type ApiRangeUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RangeAPI - id string - body *IpamsvcRange - inherit *string + id string + body *IpamsvcRange + inherit *string } func (r ApiRangeUpdateRequest) Body(body IpamsvcRange) ApiRangeUpdateRequest { @@ -995,26 +999,27 @@ RangeUpdate Update the range. Use this method to update a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ func (a *RangeAPIService) RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest { return ApiRangeUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateRangeResponse +// +// @return IpamsvcUpdateRangeResponse func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcUpdateRangeResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateRangeResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateRangeResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RangeAPIService.RangeUpdate") @@ -1052,16 +1057,16 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_server.go b/ipam/api_server.go index b6d1110..a9336ef 100644 --- a/ipam/api_server.go +++ b/ipam/api_server.go @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type ServerAPI interface { /* - ServerCreate Create the DHCP configuration profile. + ServerCreate Create the DHCP configuration profile. - Use this method to create a __Server__ object. -A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest @@ -38,27 +37,27 @@ A __Server__ (DHCP Config Profile) is a named configuration profile that can be // @return IpamsvcCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) /* - ServerDelete Move the DHCP configuration profile to the recycle bin. + ServerDelete Move the DHCP configuration profile to the recycle bin. - Use this method to move a __Server__ object to the recycle bin. -A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a __Server__ object to the recycle bin. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) /* - ServerList Retrieve DHCP configuration profiles. + ServerList Retrieve DHCP configuration profiles. - Use this method to retrieve __Server__ objects. -A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve __Server__ objects. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest @@ -66,14 +65,14 @@ A __Server__ (DHCP Config Profile) is a named configuration profile that can be // @return IpamsvcListServerResponse ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) /* - ServerRead Retrieve the DHCP configuration profile. + ServerRead Retrieve the DHCP configuration profile. - Use this method to retrieve a __Server__ object. -A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest @@ -81,14 +80,14 @@ A __Server__ (DHCP Config Profile) is a named configuration profile that can be // @return IpamsvcReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) /* - ServerUpdate Update the DHCP configuration profile. + ServerUpdate Update the DHCP configuration profile. - Use this method to update a __Server__ object. -A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest @@ -101,10 +100,10 @@ A __Server__ (DHCP Config Profile) is a named configuration profile that can be type ServerAPIService internal.Service type ApiServerCreateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - body *IpamsvcServer - inherit *string + body *IpamsvcServer + inherit *string } func (r ApiServerCreateRequest) Body(body IpamsvcServer) ApiServerCreateRequest { @@ -128,24 +127,25 @@ ServerCreate Create the DHCP configuration profile. Use this method to create a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequest { return ApiServerCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateServerResponse +// +// @return IpamsvcCreateServerResponse func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateServerResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerCreate") @@ -182,16 +182,16 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -237,9 +237,9 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams } type ApiServerDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string + id string } func (r ApiServerDeleteRequest) Execute() (*http.Response, error) { @@ -252,24 +252,24 @@ ServerDelete Move the DHCP configuration profile to the recycle bin. Use this method to move a __Server__ object to the recycle bin. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ func (a *ServerAPIService) ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest { return ApiServerDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerDelete") @@ -341,50 +341,50 @@ func (a *ServerAPIService) ServerDeleteExecute(r ApiServerDeleteRequest) (*http. } type ApiServerListRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - filter *string - orderBy *string - fields *string - offset *int32 - limit *int32 - pageToken *string - torderBy *string - tfilter *string - inherit *string -} - -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | + filter *string + orderBy *string + fields *string + offset *int32 + limit *int32 + pageToken *string + torderBy *string + tfilter *string + inherit *string +} + +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServerListRequest) Filter(filter string) ApiServerListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServerListRequest) OrderBy(orderBy string) ApiServerListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerListRequest) Fields(fields string) ApiServerListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServerListRequest) Offset(offset int32) ApiServerListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServerListRequest) Limit(limit int32) ApiServerListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServerListRequest) PageToken(pageToken string) ApiServerListRequest { r.pageToken = &pageToken return r @@ -418,24 +418,25 @@ ServerList Retrieve DHCP configuration profiles. Use this method to retrieve __Server__ objects. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest { return ApiServerListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListServerResponse +// +// @return IpamsvcListServerResponse func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerList") @@ -538,14 +539,14 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcLi } type ApiServerReadRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerReadRequest) Fields(fields string) ApiServerReadRequest { r.fields = &fields return r @@ -567,26 +568,27 @@ ServerRead Retrieve the DHCP configuration profile. Use this method to retrieve a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerReadRequest { return ApiServerReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadServerResponse +// +// @return IpamsvcReadServerResponse func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadServerResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerRead") @@ -669,11 +671,11 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcRe } type ApiServerUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService ServerAPI - id string - body *IpamsvcServer - inherit *string + id string + body *IpamsvcServer + inherit *string } func (r ApiServerUpdateRequest) Body(body IpamsvcServer) ApiServerUpdateRequest { @@ -697,26 +699,27 @@ ServerUpdate Update the DHCP configuration profile. Use this method to update a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest { return ApiServerUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateServerResponse +// +// @return IpamsvcUpdateServerResponse func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*IpamsvcUpdateServerResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateServerResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateServerResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "ServerAPIService.ServerUpdate") @@ -754,16 +757,16 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/api_subnet.go b/ipam/api_subnet.go index 0b241fc..42f1527 100644 --- a/ipam/api_subnet.go +++ b/ipam/api_subnet.go @@ -18,20 +18,19 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type SubnetAPI interface { /* - SubnetCopy Copy the subnet. + SubnetCopy Copy the subnet. - Use this method to copy a __Subnet__ object. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to copy a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest @@ -39,13 +38,13 @@ The __Subnet__ object represents a set of addresses from which addresses are ass // @return IpamsvcCopySubnetResponse SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) /* - SubnetCreate Create the subnet. + SubnetCreate Create the subnet. - Use this method to create a __Subnet__ object. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to create a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ SubnetCreate(ctx context.Context) ApiSubnetCreateRequest @@ -53,14 +52,14 @@ The __Subnet__ object represents a set of addresses from which addresses are ass // @return IpamsvcCreateSubnetResponse SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) /* - SubnetCreateNextAvailableIP Allocate the next available IP address. + SubnetCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. -This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest @@ -68,27 +67,27 @@ This allocates one or more __Address__ (_ipam/address_) resource from available // @return IpamsvcCreateNextAvailableIPResponse SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - SubnetDelete Move the subnet to the recycle bin. + SubnetDelete Move the subnet to the recycle bin. - Use this method to move a __Subnet__ object to the recycle bin. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to move a __Subnet__ object to the recycle bin. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest // SubnetDeleteExecute executes the request SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) /* - SubnetList Retrieve subnets. + SubnetList Retrieve subnets. - Use this method to retrieve __Subnet__ objects. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve __Subnet__ objects. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ SubnetList(ctx context.Context) ApiSubnetListRequest @@ -96,14 +95,14 @@ The __Subnet__ object represents a set of addresses from which addresses are ass // @return IpamsvcListSubnetResponse SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) /* - SubnetListNextAvailableIP Retrieve the next available IP address. + SubnetListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. -This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest @@ -111,14 +110,14 @@ This returns one or more __Address__ (_ipam/address_) resource from available ad // @return IpamsvcNextAvailableIPResponse SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - SubnetRead Retrieve the subnet. + SubnetRead Retrieve the subnet. - Use this method to retrieve a __Subnet__ object. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest @@ -126,14 +125,14 @@ The __Subnet__ object represents a set of addresses from which addresses are ass // @return IpamsvcReadSubnetResponse SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) /* - SubnetUpdate Update the subnet. + SubnetUpdate Update the subnet. - Use this method to update a __Subnet__ object. -The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to update a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest @@ -146,10 +145,10 @@ The __Subnet__ object represents a set of addresses from which addresses are ass type SubnetAPIService internal.Service type ApiSubnetCopyRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string - body *IpamsvcCopySubnet + id string + body *IpamsvcCopySubnet } func (r ApiSubnetCopyRequest) Body(body IpamsvcCopySubnet) ApiSubnetCopyRequest { @@ -167,26 +166,27 @@ SubnetCopy Copy the subnet. Use this method to copy a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ func (a *SubnetAPIService) SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest { return ApiSubnetCopyRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCopySubnetResponse +// +// @return IpamsvcCopySubnetResponse func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCopySubnetResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCopySubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetCopy") @@ -221,8 +221,8 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -268,10 +268,10 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo } type ApiSubnetCreateRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - body *IpamsvcSubnet - inherit *string + body *IpamsvcSubnet + inherit *string } func (r ApiSubnetCreateRequest) Body(body IpamsvcSubnet) ApiSubnetCreateRequest { @@ -295,24 +295,25 @@ SubnetCreate Create the subnet. Use this method to create a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ func (a *SubnetAPIService) SubnetCreate(ctx context.Context) ApiSubnetCreateRequest { return ApiSubnetCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcCreateSubnetResponse +// +// @return IpamsvcCreateSubnetResponse func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateSubnetResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetCreate") @@ -349,16 +350,16 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -404,11 +405,11 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams } type ApiSubnetCreateNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -433,26 +434,27 @@ SubnetCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ func (a *SubnetAPIService) SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest { return ApiSubnetCreateNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcCreateNextAvailableIPResponse +// +// @return IpamsvcCreateNextAvailableIPResponse func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcCreateNextAvailableIPResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcCreateNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetCreateNextAvailableIP") @@ -541,9 +543,9 @@ func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateN } type ApiSubnetDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string + id string } func (r ApiSubnetDeleteRequest) Execute() (*http.Response, error) { @@ -556,24 +558,24 @@ SubnetDelete Move the subnet to the recycle bin. Use this method to move a __Subnet__ object to the recycle bin. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ func (a *SubnetAPIService) SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest { return ApiSubnetDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *SubnetAPIService) SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetDelete") @@ -645,50 +647,50 @@ func (a *SubnetAPIService) SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http. } type ApiSubnetListRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - torderBy *string - tfilter *string - inherit *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + torderBy *string + tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiSubnetListRequest) Fields(fields string) ApiSubnetListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiSubnetListRequest) Filter(filter string) ApiSubnetListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiSubnetListRequest) Offset(offset int32) ApiSubnetListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiSubnetListRequest) Limit(limit int32) ApiSubnetListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiSubnetListRequest) PageToken(pageToken string) ApiSubnetListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiSubnetListRequest) OrderBy(orderBy string) ApiSubnetListRequest { r.orderBy = &orderBy return r @@ -722,24 +724,25 @@ SubnetList Retrieve subnets. Use this method to retrieve __Subnet__ objects. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ func (a *SubnetAPIService) SubnetList(ctx context.Context) ApiSubnetListRequest { return ApiSubnetListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return IpamsvcListSubnetResponse +// +// @return IpamsvcListSubnetResponse func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcListSubnetResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcListSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetList") @@ -842,11 +845,11 @@ func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcLi } type ApiSubnetListNextAvailableIPRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string + id string contiguous *bool - count *int32 + count *int32 } // Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. @@ -871,26 +874,27 @@ SubnetListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ func (a *SubnetAPIService) SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest { return ApiSubnetListNextAvailableIPRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcNextAvailableIPResponse +// +// @return IpamsvcNextAvailableIPResponse func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcNextAvailableIPResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcNextAvailableIPResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetListNextAvailableIP") @@ -973,14 +977,14 @@ func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextA } type ApiSubnetReadRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiSubnetReadRequest) Fields(fields string) ApiSubnetReadRequest { r.fields = &fields return r @@ -1002,26 +1006,27 @@ SubnetRead Retrieve the subnet. Use this method to retrieve a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ func (a *SubnetAPIService) SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest { return ApiSubnetReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcReadSubnetResponse +// +// @return IpamsvcReadSubnetResponse func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcReadSubnetResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcReadSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetRead") @@ -1104,11 +1109,11 @@ func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcRe } type ApiSubnetUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService SubnetAPI - id string - body *IpamsvcSubnet - inherit *string + id string + body *IpamsvcSubnet + inherit *string } func (r ApiSubnetUpdateRequest) Body(body IpamsvcSubnet) ApiSubnetUpdateRequest { @@ -1132,26 +1137,27 @@ SubnetUpdate Update the subnet. Use this method to update a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ func (a *SubnetAPIService) SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest { return ApiSubnetUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return IpamsvcUpdateSubnetResponse +// +// @return IpamsvcUpdateSubnetResponse func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*IpamsvcUpdateSubnetResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *IpamsvcUpdateSubnetResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *IpamsvcUpdateSubnetResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "SubnetAPIService.SubnetUpdate") @@ -1189,16 +1195,16 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/ipam/client.go b/ipam/client.go index ab22f7e..8650416 100644 --- a/ipam/client.go +++ b/ipam/client.go @@ -11,7 +11,7 @@ API version: v1 package ipam import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,36 +19,36 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the IP Address Management API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - AddressAPI AddressAPI - AddressBlockAPI AddressBlockAPI - AsmAPI AsmAPI - DhcpHostAPI DhcpHostAPI - DnsUsageAPI DnsUsageAPI - FilterAPI FilterAPI - FixedAddressAPI FixedAddressAPI - GlobalAPI GlobalAPI - HaGroupAPI HaGroupAPI + AddressAPI AddressAPI + AddressBlockAPI AddressBlockAPI + AsmAPI AsmAPI + DhcpHostAPI DhcpHostAPI + DnsUsageAPI DnsUsageAPI + FilterAPI FilterAPI + FixedAddressAPI FixedAddressAPI + GlobalAPI GlobalAPI + HaGroupAPI HaGroupAPI HardwareFilterAPI HardwareFilterAPI - IpSpaceAPI IpSpaceAPI - IpamHostAPI IpamHostAPI - LeasesCommandAPI LeasesCommandAPI - OptionCodeAPI OptionCodeAPI - OptionFilterAPI OptionFilterAPI - OptionGroupAPI OptionGroupAPI - OptionSpaceAPI OptionSpaceAPI - RangeAPI RangeAPI - ServerAPI ServerAPI - SubnetAPI SubnetAPI + IpSpaceAPI IpSpaceAPI + IpamHostAPI IpamHostAPI + LeasesCommandAPI LeasesCommandAPI + OptionCodeAPI OptionCodeAPI + OptionFilterAPI OptionFilterAPI + OptionGroupAPI OptionGroupAPI + OptionSpaceAPI OptionSpaceAPI + RangeAPI RangeAPI + ServerAPI ServerAPI + SubnetAPI SubnetAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.AddressAPI = (*AddressAPIService)(&c.Common) diff --git a/ipam/model_inheritance_assigned_host.go b/ipam/model_inheritance_assigned_host.go index 3c8ba73..fdf9c2d 100644 --- a/ipam/model_inheritance_assigned_host.go +++ b/ipam/model_inheritance_assigned_host.go @@ -141,7 +141,7 @@ func (o *InheritanceAssignedHost) SetOphid(v string) { } func (o InheritanceAssignedHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableInheritanceAssignedHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inheritance_inherited_bool.go b/ipam/model_inheritance_inherited_bool.go index 0839175..50ed585 100644 --- a/ipam/model_inheritance_inherited_bool.go +++ b/ipam/model_inheritance_inherited_bool.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedBool) SetValue(v bool) { } func (o InheritanceInheritedBool) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritanceInheritedBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inheritance_inherited_float.go b/ipam/model_inheritance_inherited_float.go index 525ade3..8c98855 100644 --- a/ipam/model_inheritance_inherited_float.go +++ b/ipam/model_inheritance_inherited_float.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedFloat) SetValue(v float32) { } func (o InheritanceInheritedFloat) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritanceInheritedFloat) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inheritance_inherited_identifier.go b/ipam/model_inheritance_inherited_identifier.go index b75fa49..30f2ece 100644 --- a/ipam/model_inheritance_inherited_identifier.go +++ b/ipam/model_inheritance_inherited_identifier.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedIdentifier) SetValue(v string) { } func (o InheritanceInheritedIdentifier) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritanceInheritedIdentifier) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inheritance_inherited_string.go b/ipam/model_inheritance_inherited_string.go index 5c0c493..e507110 100644 --- a/ipam/model_inheritance_inherited_string.go +++ b/ipam/model_inheritance_inherited_string.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedString) SetValue(v string) { } func (o InheritanceInheritedString) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritanceInheritedString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inheritance_inherited_u_int32.go b/ipam/model_inheritance_inherited_u_int32.go index 66c43e1..5983891 100644 --- a/ipam/model_inheritance_inherited_u_int32.go +++ b/ipam/model_inheritance_inherited_u_int32.go @@ -175,7 +175,7 @@ func (o *InheritanceInheritedUInt32) SetValue(v int64) { } func (o InheritanceInheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritanceInheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inherited_dhcp_config_filter_list.go b/ipam/model_inherited_dhcp_config_filter_list.go index 3d17bfb..e7894bb 100644 --- a/ipam/model_inherited_dhcp_config_filter_list.go +++ b/ipam/model_inherited_dhcp_config_filter_list.go @@ -175,7 +175,7 @@ func (o *InheritedDHCPConfigFilterList) SetValue(v []string) { } func (o InheritedDHCPConfigFilterList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritedDHCPConfigFilterList) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_inherited_dhcp_config_ignore_item_list.go b/ipam/model_inherited_dhcp_config_ignore_item_list.go index cc93a07..c520052 100644 --- a/ipam/model_inherited_dhcp_config_ignore_item_list.go +++ b/ipam/model_inherited_dhcp_config_ignore_item_list.go @@ -175,7 +175,7 @@ func (o *InheritedDHCPConfigIgnoreItemList) SetValue(v []IpamsvcIgnoreItem) { } func (o InheritedDHCPConfigIgnoreItemList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritedDHCPConfigIgnoreItemList) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_access_filter.go b/ipam/model_ipamsvc_access_filter.go index 67b7d97..b4ee156 100644 --- a/ipam/model_ipamsvc_access_filter.go +++ b/ipam/model_ipamsvc_access_filter.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -138,7 +138,7 @@ func (o *IpamsvcAccessFilter) SetOptionFilterId(v string) { } func (o IpamsvcAccessFilter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -170,10 +170,10 @@ func (o *IpamsvcAccessFilter) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -229,5 +229,3 @@ func (v *NullableIpamsvcAccessFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_address.go b/ipam/model_ipamsvc_address.go index 5931a9c..2f36ad4 100644 --- a/ipam/model_ipamsvc_address.go +++ b/ipam/model_ipamsvc_address.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcAddress type satisfies the MappedNullable interface at compile time @@ -27,8 +27,8 @@ type IpamsvcAddress struct { // The description for the address object. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` // Time when the object has been created. - CreatedAt *time.Time `json:"created_at,omitempty"` - DhcpInfo *IpamsvcDHCPInfo `json:"dhcp_info,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + DhcpInfo *IpamsvcDHCPInfo `json:"dhcp_info,omitempty"` // Read only. Represent the value of the same field in the associated _dhcp/fixed_address_ object. DisableDhcp *bool `json:"disable_dhcp,omitempty"` // The discovery attributes for this address in JSON format. @@ -716,7 +716,7 @@ func (o *IpamsvcAddress) SetUsage(v []string) { } func (o IpamsvcAddress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -799,10 +799,10 @@ func (o *IpamsvcAddress) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -858,5 +858,3 @@ func (v *NullableIpamsvcAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_address_block.go b/ipam/model_ipamsvc_address_block.go index 2266e8d..cec0172 100644 --- a/ipam/model_ipamsvc_address_block.go +++ b/ipam/model_ipamsvc_address_block.go @@ -21,7 +21,7 @@ var _ MappedNullable = &IpamsvcAddressBlock{} // IpamsvcAddressBlock An __AddressBlock__ object (_ipam/address_block_) is a set of contiguous IP addresses in the same IP space with no gap, expressed as a CIDR block. Address blocks are hierarchical and may be parented to other address blocks as long as the parent block fully contains the child and no sibling overlaps. Top level address blocks are parented to an IP space. type IpamsvcAddressBlock struct { // The address field in form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. - Address *string `json:"address,omitempty"` + Address *string `json:"address,omitempty"` AsmConfig *IpamsvcASMConfig `json:"asm_config,omitempty"` // Incremented by 1 if the IP address usage limits for automated scope management are exceeded for any subnets in the address block. AsmScopeFlag *int64 `json:"asm_scope_flag,omitempty"` @@ -48,10 +48,10 @@ type IpamsvcAddressBlock struct { // Instructs the DHCP server to always update the DNS information when a lease is renewed even if its DNS information has not changed. Defaults to _false_. DdnsUpdateOnRenew *bool `json:"ddns_update_on_renew,omitempty"` // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. - DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` + DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of DHCP options for the address block. May be either a specific option or a group of options. - DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` + DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` DhcpUtilization *IpamsvcDHCPUtilization `json:"dhcp_utilization,omitempty"` // The discovery attributes for this address block in JSON format. DiscoveryAttrs map[string]interface{} `json:"discovery_attrs,omitempty"` @@ -72,7 +72,7 @@ type IpamsvcAddressBlock struct { // The resource identifier. Id *string `json:"id,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcDHCPInheritance `json:"inheritance_sources,omitempty"` // The name of the address block. May contain 1 to 256 characters. Can include UTF-8. Name *string `json:"name,omitempty"` @@ -83,13 +83,13 @@ type IpamsvcAddressBlock struct { // The resource identifier. Space *string `json:"space,omitempty"` // The tags for the address block in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` // The usage is a combination of indicators, each tracking a specific associated use. Listed below are usage indicators with their meaning: usage indicator | description ---------------------- | -------------------------------- _IPAM_ | AddressBlock is managed in BloxOne DDI. _DISCOVERED_ | AddressBlock is discovered by some network discovery probe like Network Insight or NetMRI in NIOS. - Usage []string `json:"usage,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + Usage []string `json:"usage,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } @@ -1359,7 +1359,7 @@ func (o *IpamsvcAddressBlock) SetUtilizationV6(v IpamsvcUtilizationV6) { } func (o IpamsvcAddressBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1523,5 +1523,3 @@ func (v *NullableIpamsvcAddressBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_asm.go b/ipam/model_ipamsvc_asm.go index 606990a..87059fb 100644 --- a/ipam/model_ipamsvc_asm.go +++ b/ipam/model_ipamsvc_asm.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -852,7 +852,7 @@ func (o *IpamsvcASM) SetUtilization(v int64) { } func (o IpamsvcASM) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -947,10 +947,10 @@ func (o *IpamsvcASM) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1006,5 +1006,3 @@ func (v *NullableIpamsvcASM) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_asm_config.go b/ipam/model_ipamsvc_asm_config.go index a3047ac..4620d97 100644 --- a/ipam/model_ipamsvc_asm_config.go +++ b/ipam/model_ipamsvc_asm_config.go @@ -37,7 +37,7 @@ type IpamsvcASMConfig struct { // The minimum size of range needed for ASM to run on this subnet. MinTotal *int64 `json:"min_total,omitempty"` // The minimum percentage of addresses that must be available outside of the DHCP ranges and fixed addresses when making a suggested change.. - MinUnused *int64 `json:"min_unused,omitempty"` + MinUnused *int64 `json:"min_unused,omitempty"` ReenableDate *time.Time `json:"reenable_date,omitempty"` } @@ -415,7 +415,7 @@ func (o *IpamsvcASMConfig) SetReenableDate(v time.Time) { } func (o IpamsvcASMConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -492,5 +492,3 @@ func (v *NullableIpamsvcASMConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_asm_enable_block.go b/ipam/model_ipamsvc_asm_enable_block.go index 328aa83..cdaa411 100644 --- a/ipam/model_ipamsvc_asm_enable_block.go +++ b/ipam/model_ipamsvc_asm_enable_block.go @@ -142,7 +142,7 @@ func (o *IpamsvcAsmEnableBlock) SetReenableDate(v time.Time) { } func (o IpamsvcAsmEnableBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -198,5 +198,3 @@ func (v *NullableIpamsvcAsmEnableBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_asm_growth_block.go b/ipam/model_ipamsvc_asm_growth_block.go index ddad1c3..6c992be 100644 --- a/ipam/model_ipamsvc_asm_growth_block.go +++ b/ipam/model_ipamsvc_asm_growth_block.go @@ -107,7 +107,7 @@ func (o *IpamsvcAsmGrowthBlock) SetGrowthType(v string) { } func (o IpamsvcAsmGrowthBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcAsmGrowthBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_bulk_copy_error.go b/ipam/model_ipamsvc_bulk_copy_error.go index 87b92fe..4e17147 100644 --- a/ipam/model_ipamsvc_bulk_copy_error.go +++ b/ipam/model_ipamsvc_bulk_copy_error.go @@ -141,7 +141,7 @@ func (o *IpamsvcBulkCopyError) SetMessage(v string) { } func (o IpamsvcBulkCopyError) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableIpamsvcBulkCopyError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_bulk_copy_ip_space.go b/ipam/model_ipamsvc_bulk_copy_ip_space.go index dcd65cf..2de44a6 100644 --- a/ipam/model_ipamsvc_bulk_copy_ip_space.go +++ b/ipam/model_ipamsvc_bulk_copy_ip_space.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -199,7 +199,7 @@ func (o *IpamsvcBulkCopyIPSpace) SetTarget(v string) { } func (o IpamsvcBulkCopyIPSpace) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -236,10 +236,10 @@ func (o *IpamsvcBulkCopyIPSpace) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -295,5 +295,3 @@ func (v *NullableIpamsvcBulkCopyIPSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_bulk_copy_ip_space_response.go b/ipam/model_ipamsvc_bulk_copy_ip_space_response.go index 87c31f5..4dcc9a0 100644 --- a/ipam/model_ipamsvc_bulk_copy_ip_space_response.go +++ b/ipam/model_ipamsvc_bulk_copy_ip_space_response.go @@ -19,8 +19,8 @@ var _ MappedNullable = &IpamsvcBulkCopyIPSpaceResponse{} // IpamsvcBulkCopyIPSpaceResponse struct for IpamsvcBulkCopyIPSpaceResponse type IpamsvcBulkCopyIPSpaceResponse struct { - Errors []IpamsvcBulkCopyError `json:"errors,omitempty"` - Results []IpamsvcCopyResponse `json:"results,omitempty"` + Errors []IpamsvcBulkCopyError `json:"errors,omitempty"` + Results []IpamsvcCopyResponse `json:"results,omitempty"` } // NewIpamsvcBulkCopyIPSpaceResponse instantiates a new IpamsvcBulkCopyIPSpaceResponse object @@ -105,7 +105,7 @@ func (o *IpamsvcBulkCopyIPSpaceResponse) SetResults(v []IpamsvcCopyResponse) { } func (o IpamsvcBulkCopyIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -158,5 +158,3 @@ func (v *NullableIpamsvcBulkCopyIPSpaceResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_address_block.go b/ipam/model_ipamsvc_copy_address_block.go index 6f15272..4158e0b 100644 --- a/ipam/model_ipamsvc_copy_address_block.go +++ b/ipam/model_ipamsvc_copy_address_block.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -274,7 +274,7 @@ func (o *IpamsvcCopyAddressBlock) SetSpace(v string) { } func (o IpamsvcCopyAddressBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -318,10 +318,10 @@ func (o *IpamsvcCopyAddressBlock) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -377,5 +377,3 @@ func (v *NullableIpamsvcCopyAddressBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_address_block_response.go b/ipam/model_ipamsvc_copy_address_block_response.go index c738d10..571fd07 100644 --- a/ipam/model_ipamsvc_copy_address_block_response.go +++ b/ipam/model_ipamsvc_copy_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCopyAddressBlockResponse) SetResult(v IpamsvcCopyResponse) { } func (o IpamsvcCopyAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCopyAddressBlockResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_ip_space.go b/ipam/model_ipamsvc_copy_ip_space.go index 2fb3f96..9c9035a 100644 --- a/ipam/model_ipamsvc_copy_ip_space.go +++ b/ipam/model_ipamsvc_copy_ip_space.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -206,7 +206,7 @@ func (o *IpamsvcCopyIPSpace) SetSkipOnError(v bool) { } func (o IpamsvcCopyIPSpace) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -244,10 +244,10 @@ func (o *IpamsvcCopyIPSpace) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -303,5 +303,3 @@ func (v *NullableIpamsvcCopyIPSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_ip_space_response.go b/ipam/model_ipamsvc_copy_ip_space_response.go index deb8ebf..af980d9 100644 --- a/ipam/model_ipamsvc_copy_ip_space_response.go +++ b/ipam/model_ipamsvc_copy_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCopyIPSpaceResponse) SetResult(v IpamsvcCopyResponse) { } func (o IpamsvcCopyIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCopyIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_response.go b/ipam/model_ipamsvc_copy_response.go index 12d4b79..52a2270 100644 --- a/ipam/model_ipamsvc_copy_response.go +++ b/ipam/model_ipamsvc_copy_response.go @@ -141,7 +141,7 @@ func (o *IpamsvcCopyResponse) SetJobId(v string) { } func (o IpamsvcCopyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableIpamsvcCopyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_subnet.go b/ipam/model_ipamsvc_copy_subnet.go index 4121d7f..6ae7241 100644 --- a/ipam/model_ipamsvc_copy_subnet.go +++ b/ipam/model_ipamsvc_copy_subnet.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -274,7 +274,7 @@ func (o *IpamsvcCopySubnet) SetSpace(v string) { } func (o IpamsvcCopySubnet) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -318,10 +318,10 @@ func (o *IpamsvcCopySubnet) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -377,5 +377,3 @@ func (v *NullableIpamsvcCopySubnet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_copy_subnet_response.go b/ipam/model_ipamsvc_copy_subnet_response.go index 5a6e7d5..0fd2882 100644 --- a/ipam/model_ipamsvc_copy_subnet_response.go +++ b/ipam/model_ipamsvc_copy_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCopySubnetResponse) SetResult(v IpamsvcCopyResponse) { } func (o IpamsvcCopySubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCopySubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_address_block_response.go b/ipam/model_ipamsvc_create_address_block_response.go index 276e5c3..88b0bc4 100644 --- a/ipam/model_ipamsvc_create_address_block_response.go +++ b/ipam/model_ipamsvc_create_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateAddressBlockResponse) SetResult(v IpamsvcAddressBlock) { } func (o IpamsvcCreateAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateAddressBlockResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_address_response.go b/ipam/model_ipamsvc_create_address_response.go index 20786f2..66e001a 100644 --- a/ipam/model_ipamsvc_create_address_response.go +++ b/ipam/model_ipamsvc_create_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateAddressResponse) SetResult(v IpamsvcAddress) { } func (o IpamsvcCreateAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_asm_response.go b/ipam/model_ipamsvc_create_asm_response.go index 506ddaa..1edab41 100644 --- a/ipam/model_ipamsvc_create_asm_response.go +++ b/ipam/model_ipamsvc_create_asm_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateASMResponse) SetResult(v IpamsvcASM) { } func (o IpamsvcCreateASMResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateASMResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_fixed_address_response.go b/ipam/model_ipamsvc_create_fixed_address_response.go index 4a0f9c9..54c3ce8 100644 --- a/ipam/model_ipamsvc_create_fixed_address_response.go +++ b/ipam/model_ipamsvc_create_fixed_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateFixedAddressResponse) SetResult(v IpamsvcFixedAddress) { } func (o IpamsvcCreateFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateFixedAddressResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_ha_group_response.go b/ipam/model_ipamsvc_create_ha_group_response.go index a69a9fc..12c0367 100644 --- a/ipam/model_ipamsvc_create_ha_group_response.go +++ b/ipam/model_ipamsvc_create_ha_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateHAGroupResponse) SetResult(v IpamsvcHAGroup) { } func (o IpamsvcCreateHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_hardware_filter_response.go b/ipam/model_ipamsvc_create_hardware_filter_response.go index 60be7da..781a36b 100644 --- a/ipam/model_ipamsvc_create_hardware_filter_response.go +++ b/ipam/model_ipamsvc_create_hardware_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateHardwareFilterResponse) SetResult(v IpamsvcHardwareFilter) } func (o IpamsvcCreateHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateHardwareFilterResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_ip_space_response.go b/ipam/model_ipamsvc_create_ip_space_response.go index cb83db3..3a5edd3 100644 --- a/ipam/model_ipamsvc_create_ip_space_response.go +++ b/ipam/model_ipamsvc_create_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateIPSpaceResponse) SetResult(v IpamsvcIPSpace) { } func (o IpamsvcCreateIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_ipam_host_response.go b/ipam/model_ipamsvc_create_ipam_host_response.go index e54f3e0..7dee77b 100644 --- a/ipam/model_ipamsvc_create_ipam_host_response.go +++ b/ipam/model_ipamsvc_create_ipam_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateIpamHostResponse) SetResult(v IpamsvcIpamHost) { } func (o IpamsvcCreateIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateIpamHostResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_leases_command_response.go b/ipam/model_ipamsvc_create_leases_command_response.go index f48ea56..af034a4 100644 --- a/ipam/model_ipamsvc_create_leases_command_response.go +++ b/ipam/model_ipamsvc_create_leases_command_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateLeasesCommandResponse) SetSuccess(v string) { } func (o IpamsvcCreateLeasesCommandResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateLeasesCommandResponse) UnmarshalJSON(src []byte) e v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_next_available_ab_response.go b/ipam/model_ipamsvc_create_next_available_ab_response.go index 0b98f60..400ddeb 100644 --- a/ipam/model_ipamsvc_create_next_available_ab_response.go +++ b/ipam/model_ipamsvc_create_next_available_ab_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcCreateNextAvailableABResponse) SetResults(v []IpamsvcAddressBloc } func (o IpamsvcCreateNextAvailableABResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcCreateNextAvailableABResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_next_available_ip_response.go b/ipam/model_ipamsvc_create_next_available_ip_response.go index 71d3102..8a86963 100644 --- a/ipam/model_ipamsvc_create_next_available_ip_response.go +++ b/ipam/model_ipamsvc_create_next_available_ip_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcCreateNextAvailableIPResponse) SetResults(v []IpamsvcAddress) { } func (o IpamsvcCreateNextAvailableIPResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcCreateNextAvailableIPResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_next_available_subnet_response.go b/ipam/model_ipamsvc_create_next_available_subnet_response.go index 62b0ca1..9757576 100644 --- a/ipam/model_ipamsvc_create_next_available_subnet_response.go +++ b/ipam/model_ipamsvc_create_next_available_subnet_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcCreateNextAvailableSubnetResponse) SetResults(v []IpamsvcSubnet) } func (o IpamsvcCreateNextAvailableSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcCreateNextAvailableSubnetResponse) UnmarshalJSON(src []b v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_option_code_response.go b/ipam/model_ipamsvc_create_option_code_response.go index 3accc52..2b1fc4a 100644 --- a/ipam/model_ipamsvc_create_option_code_response.go +++ b/ipam/model_ipamsvc_create_option_code_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionCodeResponse) SetResult(v IpamsvcOptionCode) { } func (o IpamsvcCreateOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateOptionCodeResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_option_filter_response.go b/ipam/model_ipamsvc_create_option_filter_response.go index cfb29ce..6cbb71c 100644 --- a/ipam/model_ipamsvc_create_option_filter_response.go +++ b/ipam/model_ipamsvc_create_option_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionFilterResponse) SetResult(v IpamsvcOptionFilter) { } func (o IpamsvcCreateOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateOptionFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_option_group_response.go b/ipam/model_ipamsvc_create_option_group_response.go index 7ece497..e3a43ef 100644 --- a/ipam/model_ipamsvc_create_option_group_response.go +++ b/ipam/model_ipamsvc_create_option_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionGroupResponse) SetResult(v IpamsvcOptionGroup) { } func (o IpamsvcCreateOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateOptionGroupResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_option_space_response.go b/ipam/model_ipamsvc_create_option_space_response.go index 98a1fae..81b45ed 100644 --- a/ipam/model_ipamsvc_create_option_space_response.go +++ b/ipam/model_ipamsvc_create_option_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateOptionSpaceResponse) SetResult(v IpamsvcOptionSpace) { } func (o IpamsvcCreateOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateOptionSpaceResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_range_response.go b/ipam/model_ipamsvc_create_range_response.go index 7a00f53..2c1d4a1 100644 --- a/ipam/model_ipamsvc_create_range_response.go +++ b/ipam/model_ipamsvc_create_range_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateRangeResponse) SetResult(v IpamsvcRange) { } func (o IpamsvcCreateRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_server_response.go b/ipam/model_ipamsvc_create_server_response.go index 9bc4c16..2df45fd 100644 --- a/ipam/model_ipamsvc_create_server_response.go +++ b/ipam/model_ipamsvc_create_server_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateServerResponse) SetResult(v IpamsvcServer) { } func (o IpamsvcCreateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_create_subnet_response.go b/ipam/model_ipamsvc_create_subnet_response.go index be7a4ea..dcc2871 100644 --- a/ipam/model_ipamsvc_create_subnet_response.go +++ b/ipam/model_ipamsvc_create_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcCreateSubnetResponse) SetResult(v IpamsvcSubnet) { } func (o IpamsvcCreateSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcCreateSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ddns_block.go b/ipam/model_ipamsvc_ddns_block.go index 3bedbb4..af9b6fb 100644 --- a/ipam/model_ipamsvc_ddns_block.go +++ b/ipam/model_ipamsvc_ddns_block.go @@ -481,7 +481,7 @@ func (o *IpamsvcDDNSBlock) SetServerPrincipal(v string) { } func (o IpamsvcDDNSBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -567,5 +567,3 @@ func (v *NullableIpamsvcDDNSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ddns_hostname_block.go b/ipam/model_ipamsvc_ddns_hostname_block.go index 5511ef5..33ca429 100644 --- a/ipam/model_ipamsvc_ddns_hostname_block.go +++ b/ipam/model_ipamsvc_ddns_hostname_block.go @@ -107,7 +107,7 @@ func (o *IpamsvcDDNSHostnameBlock) SetDdnsGeneratedPrefix(v string) { } func (o IpamsvcDDNSHostnameBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcDDNSHostnameBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ddns_update_block.go b/ipam/model_ipamsvc_ddns_update_block.go index 3cb57e6..8ca0635 100644 --- a/ipam/model_ipamsvc_ddns_update_block.go +++ b/ipam/model_ipamsvc_ddns_update_block.go @@ -107,7 +107,7 @@ func (o *IpamsvcDDNSUpdateBlock) SetDdnsSendUpdates(v bool) { } func (o IpamsvcDDNSUpdateBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcDDNSUpdateBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ddns_zone.go b/ipam/model_ipamsvc_ddns_zone.go index 60c0bdd..689ce99 100644 --- a/ipam/model_ipamsvc_ddns_zone.go +++ b/ipam/model_ipamsvc_ddns_zone.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -28,8 +28,8 @@ type IpamsvcDDNSZone struct { // The Nameservers in the zone. Each nameserver IP should be unique across the list of nameservers. Nameservers []IpamsvcNameserver `json:"nameservers,omitempty"` // Indicates if TSIG key should be used for the update. Defaults to _false_. - TsigEnabled *bool `json:"tsig_enabled,omitempty"` - TsigKey *IpamsvcTSIGKey `json:"tsig_key,omitempty"` + TsigEnabled *bool `json:"tsig_enabled,omitempty"` + TsigKey *IpamsvcTSIGKey `json:"tsig_key,omitempty"` // The resource identifier. View *string `json:"view,omitempty"` // The name of the view. @@ -307,7 +307,7 @@ func (o *IpamsvcDDNSZone) SetZone(v string) { } func (o IpamsvcDDNSZone) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -354,10 +354,10 @@ func (o *IpamsvcDDNSZone) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -413,5 +413,3 @@ func (v *NullableIpamsvcDDNSZone) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_config.go b/ipam/model_ipamsvc_dhcp_config.go index 8b9fb98..fe59f6c 100644 --- a/ipam/model_ipamsvc_dhcp_config.go +++ b/ipam/model_ipamsvc_dhcp_config.go @@ -407,7 +407,7 @@ func (o *IpamsvcDHCPConfig) SetLeaseTimeV6(v int64) { } func (o IpamsvcDHCPConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -484,5 +484,3 @@ func (v *NullableIpamsvcDHCPConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_info.go b/ipam/model_ipamsvc_dhcp_info.go index bbc865e..9291c6f 100644 --- a/ipam/model_ipamsvc_dhcp_info.go +++ b/ipam/model_ipamsvc_dhcp_info.go @@ -448,7 +448,7 @@ func (o *IpamsvcDHCPInfo) SetStateTs(v time.Time) { } func (o IpamsvcDHCPInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -531,5 +531,3 @@ func (v *NullableIpamsvcDHCPInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_inheritance.go b/ipam/model_ipamsvc_dhcp_inheritance.go index dfb4684..73d6cb8 100644 --- a/ipam/model_ipamsvc_dhcp_inheritance.go +++ b/ipam/model_ipamsvc_dhcp_inheritance.go @@ -19,21 +19,21 @@ var _ MappedNullable = &IpamsvcDHCPInheritance{} // IpamsvcDHCPInheritance The __DHCPInheritance__ object specifies how the _dhcp_config_, _dhcp_options_ and _asm_config_ configuration fields are inherited from the parent object. type IpamsvcDHCPInheritance struct { - AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` - DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` - DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` - DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` - DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` - DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` - DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` - DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` - DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` - HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` + AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` + DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` + DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` + DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` + DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` + DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` + DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` + DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` + DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` } // NewIpamsvcDHCPInheritance instantiates a new IpamsvcDHCPInheritance object @@ -534,7 +534,7 @@ func (o *IpamsvcDHCPInheritance) SetHostnameRewriteBlock(v IpamsvcInheritedHostn } func (o IpamsvcDHCPInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -626,5 +626,3 @@ func (v *NullableIpamsvcDHCPInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_options_inheritance.go b/ipam/model_ipamsvc_dhcp_options_inheritance.go index 23c656a..d98f3ac 100644 --- a/ipam/model_ipamsvc_dhcp_options_inheritance.go +++ b/ipam/model_ipamsvc_dhcp_options_inheritance.go @@ -72,7 +72,7 @@ func (o *IpamsvcDHCPOptionsInheritance) SetDhcpOptions(v IpamsvcInheritedDHCPOpt } func (o IpamsvcDHCPOptionsInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcDHCPOptionsInheritance) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_packet_stats.go b/ipam/model_ipamsvc_dhcp_packet_stats.go index c18212f..e6d8fc6 100644 --- a/ipam/model_ipamsvc_dhcp_packet_stats.go +++ b/ipam/model_ipamsvc_dhcp_packet_stats.go @@ -243,7 +243,7 @@ func (o *IpamsvcDHCPPacketStats) SetDhcpReqReceivedV6(v string) { } func (o IpamsvcDHCPPacketStats) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,5 +308,3 @@ func (v *NullableIpamsvcDHCPPacketStats) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_utilization.go b/ipam/model_ipamsvc_dhcp_utilization.go index e59214f..ff847e2 100644 --- a/ipam/model_ipamsvc_dhcp_utilization.go +++ b/ipam/model_ipamsvc_dhcp_utilization.go @@ -175,7 +175,7 @@ func (o *IpamsvcDHCPUtilization) SetDhcpUtilization(v int64) { } func (o IpamsvcDHCPUtilization) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableIpamsvcDHCPUtilization) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dhcp_utilization_threshold.go b/ipam/model_ipamsvc_dhcp_utilization_threshold.go index 5081daa..c499478 100644 --- a/ipam/model_ipamsvc_dhcp_utilization_threshold.go +++ b/ipam/model_ipamsvc_dhcp_utilization_threshold.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -124,7 +124,7 @@ func (o *IpamsvcDHCPUtilizationThreshold) SetLow(v int64) { } func (o IpamsvcDHCPUtilizationThreshold) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -154,10 +154,10 @@ func (o *IpamsvcDHCPUtilizationThreshold) UnmarshalJSON(data []byte) (err error) err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -213,5 +213,3 @@ func (v *NullableIpamsvcDHCPUtilizationThreshold) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_dns_usage.go b/ipam/model_ipamsvc_dns_usage.go index 6b295aa..34f078e 100644 --- a/ipam/model_ipamsvc_dns_usage.go +++ b/ipam/model_ipamsvc_dns_usage.go @@ -379,7 +379,7 @@ func (o *IpamsvcDNSUsage) SetZone(v string) { } func (o IpamsvcDNSUsage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -456,5 +456,3 @@ func (v *NullableIpamsvcDNSUsage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_exclusion_range.go b/ipam/model_ipamsvc_exclusion_range.go index 02afd00..c042e18 100644 --- a/ipam/model_ipamsvc_exclusion_range.go +++ b/ipam/model_ipamsvc_exclusion_range.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -131,7 +131,7 @@ func (o *IpamsvcExclusionRange) SetStart(v string) { } func (o IpamsvcExclusionRange) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -162,10 +162,10 @@ func (o *IpamsvcExclusionRange) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -221,5 +221,3 @@ func (v *NullableIpamsvcExclusionRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_filter.go b/ipam/model_ipamsvc_filter.go index c10741c..af41c5c 100644 --- a/ipam/model_ipamsvc_filter.go +++ b/ipam/model_ipamsvc_filter.go @@ -277,7 +277,7 @@ func (o *IpamsvcFilter) SetType(v string) { } func (o IpamsvcFilter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -345,5 +345,3 @@ func (v *NullableIpamsvcFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_fixed_address.go b/ipam/model_ipamsvc_fixed_address.go index bc33c52..6817587 100644 --- a/ipam/model_ipamsvc_fixed_address.go +++ b/ipam/model_ipamsvc_fixed_address.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcFixedAddress type satisfies the MappedNullable interface at compile time @@ -45,7 +45,7 @@ type IpamsvcFixedAddress struct { // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []InheritanceAssignedHost `json:"inheritance_assigned_hosts,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcFixedAddressInheritance `json:"inheritance_sources,omitempty"` // The resource identifier. IpSpace *string `json:"ip_space,omitempty"` @@ -702,7 +702,7 @@ func (o *IpamsvcFixedAddress) SetUpdatedAt(v time.Time) { } func (o IpamsvcFixedAddress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -783,10 +783,10 @@ func (o *IpamsvcFixedAddress) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -842,5 +842,3 @@ func (v *NullableIpamsvcFixedAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_fixed_address_inheritance.go b/ipam/model_ipamsvc_fixed_address_inheritance.go index e51f08a..70db364 100644 --- a/ipam/model_ipamsvc_fixed_address_inheritance.go +++ b/ipam/model_ipamsvc_fixed_address_inheritance.go @@ -19,10 +19,10 @@ var _ MappedNullable = &IpamsvcFixedAddressInheritance{} // IpamsvcFixedAddressInheritance The __FixedAddressInheritance__ object specifies how and which fields _FixedAddress_ object inherits from the parent. type IpamsvcFixedAddressInheritance struct { - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` } // NewIpamsvcFixedAddressInheritance instantiates a new IpamsvcFixedAddressInheritance object @@ -171,7 +171,7 @@ func (o *IpamsvcFixedAddressInheritance) SetHeaderOptionServerName(v Inheritance } func (o IpamsvcFixedAddressInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -230,5 +230,3 @@ func (v *NullableIpamsvcFixedAddressInheritance) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_global.go b/ipam/model_ipamsvc_global.go index b0bd2fb..f855a41 100644 --- a/ipam/model_ipamsvc_global.go +++ b/ipam/model_ipamsvc_global.go @@ -43,12 +43,12 @@ type IpamsvcGlobal struct { // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` // DNS zones that DDNS updates can be sent to. There is no resolver fallback. The target zone must be explicitly configured for the update to be performed. Updates are sent to the closest enclosing zone. Error if _ddns_enabled_ is _true_ and the _ddns_domain_ does not have a corresponding entry in _ddns_zones_. Error if there are items with duplicate zone in the list. Defaults to empty list. - DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` + DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of DHCP options or group of options for IPv4. An option list is ordered and may include both option groups and specific options. Multiple occurrences of the same option or group is not an error. The last occurrence of an option in the list will be used. Error if the graph of referenced groups contains cycles. Defaults to empty list. DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` // The list of DHCP options or group of options for IPv6. An option list is ordered and may include both option groups and specific options. Multiple occurrences of the same option or group is not an error. The last occurrence of an option in the list will be used. Error if the graph of referenced groups contains cycles. Defaults to empty list. - DhcpOptionsV6 []IpamsvcOptionItem `json:"dhcp_options_v6,omitempty"` + DhcpOptionsV6 []IpamsvcOptionItem `json:"dhcp_options_v6,omitempty"` DhcpThreshold *IpamsvcDHCPUtilizationThreshold `json:"dhcp_threshold,omitempty"` // The behavior when GSS-TSIG should be used (a matching external DNS server is configured) but no GSS-TSIG key is available. If configured to _false_ (the default) this DNS server is skipped, if configured to _true_ the DNS server is ignored and the DNS update is sent with the configured DHCP-DDNS protection e.g. TSIG key or without any protection when none was configured. Defaults to _false_. GssTsigFallback *bool `json:"gss_tsig_fallback,omitempty"` @@ -1226,7 +1226,7 @@ func (o *IpamsvcGlobal) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcGlobal) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1378,5 +1378,3 @@ func (v *NullableIpamsvcGlobal) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ha_group.go b/ipam/model_ipamsvc_ha_group.go index 1bd6fa4..852bb96 100644 --- a/ipam/model_ipamsvc_ha_group.go +++ b/ipam/model_ipamsvc_ha_group.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcHAGroup type satisfies the MappedNullable interface at compile time @@ -404,7 +404,7 @@ func (o *IpamsvcHAGroup) SetUpdatedAt(v time.Time) { } func (o IpamsvcHAGroup) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -459,10 +459,10 @@ func (o *IpamsvcHAGroup) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -518,5 +518,3 @@ func (v *NullableIpamsvcHAGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ha_group_heartbeats.go b/ipam/model_ipamsvc_ha_group_heartbeats.go index f74cdee..52d1c85 100644 --- a/ipam/model_ipamsvc_ha_group_heartbeats.go +++ b/ipam/model_ipamsvc_ha_group_heartbeats.go @@ -107,7 +107,7 @@ func (o *IpamsvcHAGroupHeartbeats) SetSuccessfulHeartbeat(v string) { } func (o IpamsvcHAGroupHeartbeats) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcHAGroupHeartbeats) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ha_group_host.go b/ipam/model_ipamsvc_ha_group_host.go index fe90439..4c79efa 100644 --- a/ipam/model_ipamsvc_ha_group_host.go +++ b/ipam/model_ipamsvc_ha_group_host.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -240,7 +240,7 @@ func (o *IpamsvcHAGroupHost) SetState(v string) { } func (o IpamsvcHAGroupHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -281,10 +281,10 @@ func (o *IpamsvcHAGroupHost) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -340,5 +340,3 @@ func (v *NullableIpamsvcHAGroupHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_hardware_filter.go b/ipam/model_ipamsvc_hardware_filter.go index 3a6772e..c4a149e 100644 --- a/ipam/model_ipamsvc_hardware_filter.go +++ b/ipam/model_ipamsvc_hardware_filter.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcHardwareFilter type satisfies the MappedNullable interface at compile time @@ -513,7 +513,7 @@ func (o *IpamsvcHardwareFilter) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcHardwareFilter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -578,10 +578,10 @@ func (o *IpamsvcHardwareFilter) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -637,5 +637,3 @@ func (v *NullableIpamsvcHardwareFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_host.go b/ipam/model_ipamsvc_host.go index f927dbb..78a8153 100644 --- a/ipam/model_ipamsvc_host.go +++ b/ipam/model_ipamsvc_host.go @@ -22,7 +22,7 @@ type IpamsvcHost struct { // The primary IP address of the on-prem host. Address *string `json:"address,omitempty"` // Anycast address configured to the host. Order is not significant. - AnycastAddresses []string `json:"anycast_addresses,omitempty"` + AnycastAddresses []string `json:"anycast_addresses,omitempty"` AssociatedServer *IpamsvcHostAssociatedServer `json:"associated_server,omitempty"` // The description for the on-prem host. Comment *string `json:"comment,omitempty"` @@ -480,7 +480,7 @@ func (o *IpamsvcHost) SetType(v string) { } func (o IpamsvcHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -566,5 +566,3 @@ func (v *NullableIpamsvcHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_host_address.go b/ipam/model_ipamsvc_host_address.go index 345d31c..785dd64 100644 --- a/ipam/model_ipamsvc_host_address.go +++ b/ipam/model_ipamsvc_host_address.go @@ -141,7 +141,7 @@ func (o *IpamsvcHostAddress) SetSpace(v string) { } func (o IpamsvcHostAddress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableIpamsvcHostAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_host_associated_server.go b/ipam/model_ipamsvc_host_associated_server.go index 88cbfa9..a1d2706 100644 --- a/ipam/model_ipamsvc_host_associated_server.go +++ b/ipam/model_ipamsvc_host_associated_server.go @@ -107,7 +107,7 @@ func (o *IpamsvcHostAssociatedServer) SetName(v string) { } func (o IpamsvcHostAssociatedServer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcHostAssociatedServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_host_associations_response.go b/ipam/model_ipamsvc_host_associations_response.go index 4ef2cea..7abc8df 100644 --- a/ipam/model_ipamsvc_host_associations_response.go +++ b/ipam/model_ipamsvc_host_associations_response.go @@ -22,7 +22,7 @@ type IpamsvcHostAssociationsResponse struct { DhcpPktStats *IpamsvcDHCPPacketStats `json:"dhcp_pkt_stats,omitempty"` // The list of HA groups. HaGroups []IpamsvcHAGroup `json:"ha_groups,omitempty"` - Host *IpamsvcHost `json:"host,omitempty"` + Host *IpamsvcHost `json:"host,omitempty"` // The list of subnets. Subnets []IpamsvcSubnet `json:"subnets,omitempty"` } @@ -173,7 +173,7 @@ func (o *IpamsvcHostAssociationsResponse) SetSubnets(v []IpamsvcSubnet) { } func (o IpamsvcHostAssociationsResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -232,5 +232,3 @@ func (v *NullableIpamsvcHostAssociationsResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_host_name.go b/ipam/model_ipamsvc_host_name.go index 3c7c140..28def57 100644 --- a/ipam/model_ipamsvc_host_name.go +++ b/ipam/model_ipamsvc_host_name.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -165,7 +165,7 @@ func (o *IpamsvcHostName) SetZone(v string) { } func (o IpamsvcHostName) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -199,10 +199,10 @@ func (o *IpamsvcHostName) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -258,5 +258,3 @@ func (v *NullableIpamsvcHostName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_hostname_rewrite_block.go b/ipam/model_ipamsvc_hostname_rewrite_block.go index dcfd904..c36bd78 100644 --- a/ipam/model_ipamsvc_hostname_rewrite_block.go +++ b/ipam/model_ipamsvc_hostname_rewrite_block.go @@ -141,7 +141,7 @@ func (o *IpamsvcHostnameRewriteBlock) SetHostnameRewriteRegex(v string) { } func (o IpamsvcHostnameRewriteBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -197,5 +197,3 @@ func (v *NullableIpamsvcHostnameRewriteBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ignore_item.go b/ipam/model_ipamsvc_ignore_item.go index 7d3dcd5..044082a 100644 --- a/ipam/model_ipamsvc_ignore_item.go +++ b/ipam/model_ipamsvc_ignore_item.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -97,7 +97,7 @@ func (o *IpamsvcIgnoreItem) SetValue(v string) { } func (o IpamsvcIgnoreItem) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -125,10 +125,10 @@ func (o *IpamsvcIgnoreItem) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -184,5 +184,3 @@ func (v *NullableIpamsvcIgnoreItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_asm_config.go b/ipam/model_ipamsvc_inherited_asm_config.go index fdd80fb..8f39e3d 100644 --- a/ipam/model_ipamsvc_inherited_asm_config.go +++ b/ipam/model_ipamsvc_inherited_asm_config.go @@ -21,11 +21,11 @@ var _ MappedNullable = &IpamsvcInheritedASMConfig{} type IpamsvcInheritedASMConfig struct { AsmEnableBlock *IpamsvcInheritedAsmEnableBlock `json:"asm_enable_block,omitempty"` AsmGrowthBlock *IpamsvcInheritedAsmGrowthBlock `json:"asm_growth_block,omitempty"` - AsmThreshold *InheritanceInheritedUInt32 `json:"asm_threshold,omitempty"` - ForecastPeriod *InheritanceInheritedUInt32 `json:"forecast_period,omitempty"` - History *InheritanceInheritedUInt32 `json:"history,omitempty"` - MinTotal *InheritanceInheritedUInt32 `json:"min_total,omitempty"` - MinUnused *InheritanceInheritedUInt32 `json:"min_unused,omitempty"` + AsmThreshold *InheritanceInheritedUInt32 `json:"asm_threshold,omitempty"` + ForecastPeriod *InheritanceInheritedUInt32 `json:"forecast_period,omitempty"` + History *InheritanceInheritedUInt32 `json:"history,omitempty"` + MinTotal *InheritanceInheritedUInt32 `json:"min_total,omitempty"` + MinUnused *InheritanceInheritedUInt32 `json:"min_unused,omitempty"` } // NewIpamsvcInheritedASMConfig instantiates a new IpamsvcInheritedASMConfig object @@ -270,7 +270,7 @@ func (o *IpamsvcInheritedASMConfig) SetMinUnused(v InheritanceInheritedUInt32) { } func (o IpamsvcInheritedASMConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -338,5 +338,3 @@ func (v *NullableIpamsvcInheritedASMConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_asm_enable_block.go b/ipam/model_ipamsvc_inherited_asm_enable_block.go index 0b86bb6..4122e6c 100644 --- a/ipam/model_ipamsvc_inherited_asm_enable_block.go +++ b/ipam/model_ipamsvc_inherited_asm_enable_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedAsmEnableBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcAsmEnableBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcAsmEnableBlock `json:"value,omitempty"` } // NewIpamsvcInheritedAsmEnableBlock instantiates a new IpamsvcInheritedAsmEnableBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedAsmEnableBlock) SetValue(v IpamsvcAsmEnableBlock) { } func (o IpamsvcInheritedAsmEnableBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedAsmEnableBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_asm_growth_block.go b/ipam/model_ipamsvc_inherited_asm_growth_block.go index b3e6f2e..1671c66 100644 --- a/ipam/model_ipamsvc_inherited_asm_growth_block.go +++ b/ipam/model_ipamsvc_inherited_asm_growth_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedAsmGrowthBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcAsmGrowthBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcAsmGrowthBlock `json:"value,omitempty"` } // NewIpamsvcInheritedAsmGrowthBlock instantiates a new IpamsvcInheritedAsmGrowthBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedAsmGrowthBlock) SetValue(v IpamsvcAsmGrowthBlock) { } func (o IpamsvcInheritedAsmGrowthBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedAsmGrowthBlock) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_ddns_block.go b/ipam/model_ipamsvc_inherited_ddns_block.go index 58481eb..3118b48 100644 --- a/ipam/model_ipamsvc_inherited_ddns_block.go +++ b/ipam/model_ipamsvc_inherited_ddns_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDDNSBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcDDNSBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcDDNSBlock `json:"value,omitempty"` } // NewIpamsvcInheritedDDNSBlock instantiates a new IpamsvcInheritedDDNSBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDDNSBlock) SetValue(v IpamsvcDDNSBlock) { } func (o IpamsvcInheritedDDNSBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedDDNSBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_ddns_hostname_block.go b/ipam/model_ipamsvc_inherited_ddns_hostname_block.go index 31a4d3b..0676a6c 100644 --- a/ipam/model_ipamsvc_inherited_ddns_hostname_block.go +++ b/ipam/model_ipamsvc_inherited_ddns_hostname_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDDNSHostnameBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcDDNSHostnameBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcDDNSHostnameBlock `json:"value,omitempty"` } // NewIpamsvcInheritedDDNSHostnameBlock instantiates a new IpamsvcInheritedDDNSHostnameBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDDNSHostnameBlock) SetValue(v IpamsvcDDNSHostnameBlock) } func (o IpamsvcInheritedDDNSHostnameBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedDDNSHostnameBlock) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_ddns_update_block.go b/ipam/model_ipamsvc_inherited_ddns_update_block.go index 8acf3a1..99f4f4c 100644 --- a/ipam/model_ipamsvc_inherited_ddns_update_block.go +++ b/ipam/model_ipamsvc_inherited_ddns_update_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDDNSUpdateBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcDDNSUpdateBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcDDNSUpdateBlock `json:"value,omitempty"` } // NewIpamsvcInheritedDDNSUpdateBlock instantiates a new IpamsvcInheritedDDNSUpdateBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDDNSUpdateBlock) SetValue(v IpamsvcDDNSUpdateBlock) { } func (o IpamsvcInheritedDDNSUpdateBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedDDNSUpdateBlock) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_dhcp_config.go b/ipam/model_ipamsvc_inherited_dhcp_config.go index 59a45f5..8a62fdd 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_config.go +++ b/ipam/model_ipamsvc_inherited_dhcp_config.go @@ -19,16 +19,16 @@ var _ MappedNullable = &IpamsvcInheritedDHCPConfig{} // IpamsvcInheritedDHCPConfig The inheritance configuration for a field of type _DHCPConfig_. type IpamsvcInheritedDHCPConfig struct { - AbandonedReclaimTime *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time,omitempty"` - AbandonedReclaimTimeV6 *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time_v6,omitempty"` - AllowUnknown *InheritanceInheritedBool `json:"allow_unknown,omitempty"` - AllowUnknownV6 *InheritanceInheritedBool `json:"allow_unknown_v6,omitempty"` - Filters *InheritedDHCPConfigFilterList `json:"filters,omitempty"` - FiltersV6 *InheritedDHCPConfigFilterList `json:"filters_v6,omitempty"` - IgnoreClientUid *InheritanceInheritedBool `json:"ignore_client_uid,omitempty"` - IgnoreList *InheritedDHCPConfigIgnoreItemList `json:"ignore_list,omitempty"` - LeaseTime *InheritanceInheritedUInt32 `json:"lease_time,omitempty"` - LeaseTimeV6 *InheritanceInheritedUInt32 `json:"lease_time_v6,omitempty"` + AbandonedReclaimTime *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time,omitempty"` + AbandonedReclaimTimeV6 *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time_v6,omitempty"` + AllowUnknown *InheritanceInheritedBool `json:"allow_unknown,omitempty"` + AllowUnknownV6 *InheritanceInheritedBool `json:"allow_unknown_v6,omitempty"` + Filters *InheritedDHCPConfigFilterList `json:"filters,omitempty"` + FiltersV6 *InheritedDHCPConfigFilterList `json:"filters_v6,omitempty"` + IgnoreClientUid *InheritanceInheritedBool `json:"ignore_client_uid,omitempty"` + IgnoreList *InheritedDHCPConfigIgnoreItemList `json:"ignore_list,omitempty"` + LeaseTime *InheritanceInheritedUInt32 `json:"lease_time,omitempty"` + LeaseTimeV6 *InheritanceInheritedUInt32 `json:"lease_time_v6,omitempty"` } // NewIpamsvcInheritedDHCPConfig instantiates a new IpamsvcInheritedDHCPConfig object @@ -369,7 +369,7 @@ func (o *IpamsvcInheritedDHCPConfig) SetLeaseTimeV6(v InheritanceInheritedUInt32 } func (o IpamsvcInheritedDHCPConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -446,5 +446,3 @@ func (v *NullableIpamsvcInheritedDHCPConfig) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_dhcp_option.go b/ipam/model_ipamsvc_inherited_dhcp_option.go index 50882bf..08b9334 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_option.go +++ b/ipam/model_ipamsvc_inherited_dhcp_option.go @@ -24,8 +24,8 @@ type IpamsvcInheritedDHCPOption struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcInheritedDHCPOptionItem `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcInheritedDHCPOptionItem `json:"value,omitempty"` } // NewIpamsvcInheritedDHCPOption instantiates a new IpamsvcInheritedDHCPOption object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedDHCPOption) SetValue(v IpamsvcInheritedDHCPOptionItem) } func (o IpamsvcInheritedDHCPOption) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedDHCPOption) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_dhcp_option_item.go b/ipam/model_ipamsvc_inherited_dhcp_option_item.go index dbea964..4ff6021 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_option_item.go +++ b/ipam/model_ipamsvc_inherited_dhcp_option_item.go @@ -106,7 +106,7 @@ func (o *IpamsvcInheritedDHCPOptionItem) SetOverridingGroup(v string) { } func (o IpamsvcInheritedDHCPOptionItem) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,5 +159,3 @@ func (v *NullableIpamsvcInheritedDHCPOptionItem) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_dhcp_option_list.go b/ipam/model_ipamsvc_inherited_dhcp_option_list.go index 3e0967b..5812d13 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_option_list.go +++ b/ipam/model_ipamsvc_inherited_dhcp_option_list.go @@ -107,7 +107,7 @@ func (o *IpamsvcInheritedDHCPOptionList) SetValue(v []IpamsvcInheritedDHCPOption } func (o IpamsvcInheritedDHCPOptionList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcInheritedDHCPOptionList) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go b/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go index 64da520..82cd83e 100644 --- a/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go +++ b/ipam/model_ipamsvc_inherited_hostname_rewrite_block.go @@ -24,8 +24,8 @@ type IpamsvcInheritedHostnameRewriteBlock struct { // The human-readable display name for the object referred to by _source_. DisplayName *string `json:"display_name,omitempty"` // The resource identifier. - Source *string `json:"source,omitempty"` - Value *IpamsvcHostnameRewriteBlock `json:"value,omitempty"` + Source *string `json:"source,omitempty"` + Value *IpamsvcHostnameRewriteBlock `json:"value,omitempty"` } // NewIpamsvcInheritedHostnameRewriteBlock instantiates a new IpamsvcInheritedHostnameRewriteBlock object @@ -174,7 +174,7 @@ func (o *IpamsvcInheritedHostnameRewriteBlock) SetValue(v IpamsvcHostnameRewrite } func (o IpamsvcInheritedHostnameRewriteBlock) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -233,5 +233,3 @@ func (v *NullableIpamsvcInheritedHostnameRewriteBlock) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ip_space.go b/ipam/model_ipamsvc_ip_space.go index fe487c1..215a152 100644 --- a/ipam/model_ipamsvc_ip_space.go +++ b/ipam/model_ipamsvc_ip_space.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcIPSpace type satisfies the MappedNullable interface at compile time @@ -46,8 +46,8 @@ type IpamsvcIPSpace struct { // Instructs the DHCP server to always update the DNS information when a lease is renewed even if its DNS information has not changed. Defaults to _false_. DdnsUpdateOnRenew *bool `json:"ddns_update_on_renew,omitempty"` // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. - DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` + DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of IPv4 DHCP options for IP space. May be either a specific option or a group of options. DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` // The list of IPv6 DHCP options for IP space. May be either a specific option or a group of options. @@ -65,16 +65,16 @@ type IpamsvcIPSpace struct { // The regex bracket expression to match valid characters. Must begin with \"[\" and end with \"]\" and be a compilable POSIX regex. Defaults to \"[^a-zA-Z0-9_.]\". HostnameRewriteRegex *string `json:"hostname_rewrite_regex,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *IpamsvcIPSpaceInheritance `json:"inheritance_sources,omitempty"` // The name of the IP space. Must contain 1 to 256 characters. Can include UTF-8. Name string `json:"name"` // The tags for the IP space in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` // The resource identifier. VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` @@ -1125,7 +1125,7 @@ func (o *IpamsvcIPSpace) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcIPSpace) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1241,10 +1241,10 @@ func (o *IpamsvcIPSpace) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1300,5 +1300,3 @@ func (v *NullableIpamsvcIPSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ip_space_inheritance.go b/ipam/model_ipamsvc_ip_space_inheritance.go index 16fcf76..a70b2bd 100644 --- a/ipam/model_ipamsvc_ip_space_inheritance.go +++ b/ipam/model_ipamsvc_ip_space_inheritance.go @@ -19,23 +19,23 @@ var _ MappedNullable = &IpamsvcIPSpaceInheritance{} // IpamsvcIPSpaceInheritance The __IPSpaceInheritance__ object specifies how and which fields _IPSpace_ object inherits from the parent. type IpamsvcIPSpaceInheritance struct { - AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` - DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` - DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` - DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` - DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` - DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` - DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` - DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` - DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` - HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` - VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` + AsmConfig *IpamsvcInheritedASMConfig `json:"asm_config,omitempty"` + DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` + DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` + DdnsEnabled *InheritanceInheritedBool `json:"ddns_enabled,omitempty"` + DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` + DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` + DdnsUpdateBlock *IpamsvcInheritedDDNSUpdateBlock `json:"ddns_update_block,omitempty"` + DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` + DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` + VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` } // NewIpamsvcIPSpaceInheritance instantiates a new IpamsvcIPSpaceInheritance object @@ -600,7 +600,7 @@ func (o *IpamsvcIPSpaceInheritance) SetVendorSpecificOptionOptionSpace(v Inherit } func (o IpamsvcIPSpaceInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -698,5 +698,3 @@ func (v *NullableIpamsvcIPSpaceInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_ipam_host.go b/ipam/model_ipamsvc_ipam_host.go index 93cde8f..c2acaff 100644 --- a/ipam/model_ipamsvc_ipam_host.go +++ b/ipam/model_ipamsvc_ipam_host.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcIpamHost type satisfies the MappedNullable interface at compile time @@ -343,7 +343,7 @@ func (o *IpamsvcIpamHost) SetUpdatedAt(v time.Time) { } func (o IpamsvcIpamHost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -393,10 +393,10 @@ func (o *IpamsvcIpamHost) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -452,5 +452,3 @@ func (v *NullableIpamsvcIpamHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_kerberos_key.go b/ipam/model_ipamsvc_kerberos_key.go index 1a4c5a2..f1265ba 100644 --- a/ipam/model_ipamsvc_kerberos_key.go +++ b/ipam/model_ipamsvc_kerberos_key.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -240,7 +240,7 @@ func (o *IpamsvcKerberosKey) SetVersion(v int64) { } func (o IpamsvcKerberosKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -281,10 +281,10 @@ func (o *IpamsvcKerberosKey) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -340,5 +340,3 @@ func (v *NullableIpamsvcKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_lease_address.go b/ipam/model_ipamsvc_lease_address.go index 66547a6..f011b7a 100644 --- a/ipam/model_ipamsvc_lease_address.go +++ b/ipam/model_ipamsvc_lease_address.go @@ -107,7 +107,7 @@ func (o *IpamsvcLeaseAddress) SetSpace(v string) { } func (o IpamsvcLeaseAddress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcLeaseAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_lease_range.go b/ipam/model_ipamsvc_lease_range.go index 9811317..f6923a7 100644 --- a/ipam/model_ipamsvc_lease_range.go +++ b/ipam/model_ipamsvc_lease_range.go @@ -73,7 +73,7 @@ func (o *IpamsvcLeaseRange) SetId(v string) { } func (o IpamsvcLeaseRange) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcLeaseRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_lease_subnet.go b/ipam/model_ipamsvc_lease_subnet.go index a3d7545..c4e3fef 100644 --- a/ipam/model_ipamsvc_lease_subnet.go +++ b/ipam/model_ipamsvc_lease_subnet.go @@ -73,7 +73,7 @@ func (o *IpamsvcLeaseSubnet) SetId(v string) { } func (o IpamsvcLeaseSubnet) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcLeaseSubnet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_leases_command.go b/ipam/model_ipamsvc_leases_command.go index 1932140..c9acd28 100644 --- a/ipam/model_ipamsvc_leases_command.go +++ b/ipam/model_ipamsvc_leases_command.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -172,7 +172,7 @@ func (o *IpamsvcLeasesCommand) SetSubnet(v []IpamsvcLeaseSubnet) { } func (o IpamsvcLeasesCommand) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -207,10 +207,10 @@ func (o *IpamsvcLeasesCommand) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -266,5 +266,3 @@ func (v *NullableIpamsvcLeasesCommand) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_address_block_response.go b/ipam/model_ipamsvc_list_address_block_response.go index 7412cde..2dbcc85 100644 --- a/ipam/model_ipamsvc_list_address_block_response.go +++ b/ipam/model_ipamsvc_list_address_block_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListAddressBlockResponse) SetResults(v []IpamsvcAddressBlock) { } func (o IpamsvcListAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListAddressBlockResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_address_response.go b/ipam/model_ipamsvc_list_address_response.go index d0af5d8..44af1de 100644 --- a/ipam/model_ipamsvc_list_address_response.go +++ b/ipam/model_ipamsvc_list_address_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListAddressResponse) SetResults(v []IpamsvcAddress) { } func (o IpamsvcListAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_asm_response.go b/ipam/model_ipamsvc_list_asm_response.go index 160d0b5..dfa2cec 100644 --- a/ipam/model_ipamsvc_list_asm_response.go +++ b/ipam/model_ipamsvc_list_asm_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListASMResponse) SetResults(v []IpamsvcASM) { } func (o IpamsvcListASMResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListASMResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_dns_usage_response.go b/ipam/model_ipamsvc_list_dns_usage_response.go index de94604..176df1b 100644 --- a/ipam/model_ipamsvc_list_dns_usage_response.go +++ b/ipam/model_ipamsvc_list_dns_usage_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListDNSUsageResponse) SetResults(v []IpamsvcDNSUsage) { } func (o IpamsvcListDNSUsageResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListDNSUsageResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_filter_response.go b/ipam/model_ipamsvc_list_filter_response.go index d14806a..f336709 100644 --- a/ipam/model_ipamsvc_list_filter_response.go +++ b/ipam/model_ipamsvc_list_filter_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListFilterResponse) SetResults(v []IpamsvcFilter) { } func (o IpamsvcListFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListFilterResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_fixed_address_response.go b/ipam/model_ipamsvc_list_fixed_address_response.go index c773fa0..6ee5515 100644 --- a/ipam/model_ipamsvc_list_fixed_address_response.go +++ b/ipam/model_ipamsvc_list_fixed_address_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListFixedAddressResponse) SetResults(v []IpamsvcFixedAddress) { } func (o IpamsvcListFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListFixedAddressResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_ha_group_response.go b/ipam/model_ipamsvc_list_ha_group_response.go index fa3a346..6334231 100644 --- a/ipam/model_ipamsvc_list_ha_group_response.go +++ b/ipam/model_ipamsvc_list_ha_group_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListHAGroupResponse) SetResults(v []IpamsvcHAGroup) { } func (o IpamsvcListHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_hardware_filter_response.go b/ipam/model_ipamsvc_list_hardware_filter_response.go index 288e245..2d3e426 100644 --- a/ipam/model_ipamsvc_list_hardware_filter_response.go +++ b/ipam/model_ipamsvc_list_hardware_filter_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListHardwareFilterResponse) SetResults(v []IpamsvcHardwareFilter } func (o IpamsvcListHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListHardwareFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_host_response.go b/ipam/model_ipamsvc_list_host_response.go index b5950eb..5cd822a 100644 --- a/ipam/model_ipamsvc_list_host_response.go +++ b/ipam/model_ipamsvc_list_host_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListHostResponse) SetResults(v []IpamsvcHost) { } func (o IpamsvcListHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_ip_space_response.go b/ipam/model_ipamsvc_list_ip_space_response.go index f5e9efd..739f09b 100644 --- a/ipam/model_ipamsvc_list_ip_space_response.go +++ b/ipam/model_ipamsvc_list_ip_space_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListIPSpaceResponse) SetResults(v []IpamsvcIPSpace) { } func (o IpamsvcListIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_ipam_host_response.go b/ipam/model_ipamsvc_list_ipam_host_response.go index dfea029..3adfca2 100644 --- a/ipam/model_ipamsvc_list_ipam_host_response.go +++ b/ipam/model_ipamsvc_list_ipam_host_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListIpamHostResponse) SetResults(v []IpamsvcIpamHost) { } func (o IpamsvcListIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListIpamHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_option_code_response.go b/ipam/model_ipamsvc_list_option_code_response.go index ab02828..a68728c 100644 --- a/ipam/model_ipamsvc_list_option_code_response.go +++ b/ipam/model_ipamsvc_list_option_code_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionCodeResponse) SetResults(v []IpamsvcOptionCode) { } func (o IpamsvcListOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListOptionCodeResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_option_filter_response.go b/ipam/model_ipamsvc_list_option_filter_response.go index 736542b..7a40fa6 100644 --- a/ipam/model_ipamsvc_list_option_filter_response.go +++ b/ipam/model_ipamsvc_list_option_filter_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionFilterResponse) SetResults(v []IpamsvcOptionFilter) { } func (o IpamsvcListOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListOptionFilterResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_option_group_response.go b/ipam/model_ipamsvc_list_option_group_response.go index 9a760dd..d996dee 100644 --- a/ipam/model_ipamsvc_list_option_group_response.go +++ b/ipam/model_ipamsvc_list_option_group_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionGroupResponse) SetResults(v []IpamsvcOptionGroup) { } func (o IpamsvcListOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListOptionGroupResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_option_space_response.go b/ipam/model_ipamsvc_list_option_space_response.go index 2678817..f9404e7 100644 --- a/ipam/model_ipamsvc_list_option_space_response.go +++ b/ipam/model_ipamsvc_list_option_space_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListOptionSpaceResponse) SetResults(v []IpamsvcOptionSpace) { } func (o IpamsvcListOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListOptionSpaceResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_range_response.go b/ipam/model_ipamsvc_list_range_response.go index aa22116..a19c6cd 100644 --- a/ipam/model_ipamsvc_list_range_response.go +++ b/ipam/model_ipamsvc_list_range_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListRangeResponse) SetResults(v []IpamsvcRange) { } func (o IpamsvcListRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_server_response.go b/ipam/model_ipamsvc_list_server_response.go index 12c490c..9f17a9d 100644 --- a/ipam/model_ipamsvc_list_server_response.go +++ b/ipam/model_ipamsvc_list_server_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListServerResponse) SetResults(v []IpamsvcServer) { } func (o IpamsvcListServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_list_subnet_response.go b/ipam/model_ipamsvc_list_subnet_response.go index a97d60a..1798c35 100644 --- a/ipam/model_ipamsvc_list_subnet_response.go +++ b/ipam/model_ipamsvc_list_subnet_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcListSubnetResponse) SetResults(v []IpamsvcSubnet) { } func (o IpamsvcListSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcListSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_name.go b/ipam/model_ipamsvc_name.go index bae8cfe..130f772 100644 --- a/ipam/model_ipamsvc_name.go +++ b/ipam/model_ipamsvc_name.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -97,7 +97,7 @@ func (o *IpamsvcName) SetType(v string) { } func (o IpamsvcName) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -125,10 +125,10 @@ func (o *IpamsvcName) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -184,5 +184,3 @@ func (v *NullableIpamsvcName) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_nameserver.go b/ipam/model_ipamsvc_nameserver.go index 8e78f64..0534671 100644 --- a/ipam/model_ipamsvc_nameserver.go +++ b/ipam/model_ipamsvc_nameserver.go @@ -31,7 +31,7 @@ type IpamsvcNameserver struct { KerberosTkeyLifetime *int64 `json:"kerberos_tkey_lifetime,omitempty"` // Determines which protocol is used to establish the security context with the external DNS servers, TCP or UDP. Defaults to _tcp_. KerberosTkeyProtocol *string `json:"kerberos_tkey_protocol,omitempty"` - Nameserver *string `json:"nameserver,omitempty"` + Nameserver *string `json:"nameserver,omitempty"` // The Kerberos principal name of this DNS server that will receive updates. Defaults to empty. ServerPrincipal *string `json:"server_principal,omitempty"` } @@ -310,7 +310,7 @@ func (o *IpamsvcNameserver) SetServerPrincipal(v string) { } func (o IpamsvcNameserver) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -381,5 +381,3 @@ func (v *NullableIpamsvcNameserver) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_next_available_ab_response.go b/ipam/model_ipamsvc_next_available_ab_response.go index 51148a6..838f8f7 100644 --- a/ipam/model_ipamsvc_next_available_ab_response.go +++ b/ipam/model_ipamsvc_next_available_ab_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcNextAvailableABResponse) SetResults(v []IpamsvcAddressBlock) { } func (o IpamsvcNextAvailableABResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcNextAvailableABResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_next_available_ip_response.go b/ipam/model_ipamsvc_next_available_ip_response.go index c4890ce..381bb89 100644 --- a/ipam/model_ipamsvc_next_available_ip_response.go +++ b/ipam/model_ipamsvc_next_available_ip_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcNextAvailableIPResponse) SetResults(v []IpamsvcAddress) { } func (o IpamsvcNextAvailableIPResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcNextAvailableIPResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_next_available_subnet_response.go b/ipam/model_ipamsvc_next_available_subnet_response.go index b6b1ee5..2feb1c3 100644 --- a/ipam/model_ipamsvc_next_available_subnet_response.go +++ b/ipam/model_ipamsvc_next_available_subnet_response.go @@ -73,7 +73,7 @@ func (o *IpamsvcNextAvailableSubnetResponse) SetResults(v []IpamsvcSubnet) { } func (o IpamsvcNextAvailableSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableIpamsvcNextAvailableSubnetResponse) UnmarshalJSON(src []byte) e v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_code.go b/ipam/model_ipamsvc_option_code.go index 25e83af..9174ebc 100644 --- a/ipam/model_ipamsvc_option_code.go +++ b/ipam/model_ipamsvc_option_code.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcOptionCode type satisfies the MappedNullable interface at compile time @@ -356,7 +356,7 @@ func (o *IpamsvcOptionCode) SetUpdatedAt(v time.Time) { } func (o IpamsvcOptionCode) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -406,10 +406,10 @@ func (o *IpamsvcOptionCode) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -465,5 +465,3 @@ func (v *NullableIpamsvcOptionCode) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_filter.go b/ipam/model_ipamsvc_option_filter.go index 12f8afa..58f66cb 100644 --- a/ipam/model_ipamsvc_option_filter.go +++ b/ipam/model_ipamsvc_option_filter.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcOptionFilter type satisfies the MappedNullable interface at compile time @@ -43,7 +43,7 @@ type IpamsvcOptionFilter struct { // The type of protocol of option filter (_ip4_ or _ip6_). Protocol *string `json:"protocol,omitempty"` // The role of DHCP filter (_values_ or _selection_). Defaults to _values_. - Role *string `json:"role,omitempty"` + Role *string `json:"role,omitempty"` Rules IpamsvcOptionFilterRuleList `json:"rules"` // The tags for the option filter in JSON format. Tags map[string]interface{} `json:"tags,omitempty"` @@ -539,7 +539,7 @@ func (o *IpamsvcOptionFilter) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcOptionFilter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -606,10 +606,10 @@ func (o *IpamsvcOptionFilter) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -665,5 +665,3 @@ func (v *NullableIpamsvcOptionFilter) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_filter_rule.go b/ipam/model_ipamsvc_option_filter_rule.go index c1ee061..f04c4d9 100644 --- a/ipam/model_ipamsvc_option_filter_rule.go +++ b/ipam/model_ipamsvc_option_filter_rule.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -165,7 +165,7 @@ func (o *IpamsvcOptionFilterRule) SetSubstringOffset(v int64) { } func (o IpamsvcOptionFilterRule) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -199,10 +199,10 @@ func (o *IpamsvcOptionFilterRule) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -258,5 +258,3 @@ func (v *NullableIpamsvcOptionFilterRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_filter_rule_list.go b/ipam/model_ipamsvc_option_filter_rule_list.go index 5f094e8..ce41b98 100644 --- a/ipam/model_ipamsvc_option_filter_rule_list.go +++ b/ipam/model_ipamsvc_option_filter_rule_list.go @@ -107,7 +107,7 @@ func (o *IpamsvcOptionFilterRuleList) SetRules(v []IpamsvcOptionFilterRule) { } func (o IpamsvcOptionFilterRuleList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,5 +160,3 @@ func (v *NullableIpamsvcOptionFilterRuleList) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_group.go b/ipam/model_ipamsvc_option_group.go index dc22ba1..963c730 100644 --- a/ipam/model_ipamsvc_option_group.go +++ b/ipam/model_ipamsvc_option_group.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcOptionGroup type satisfies the MappedNullable interface at compile time @@ -309,7 +309,7 @@ func (o *IpamsvcOptionGroup) SetUpdatedAt(v time.Time) { } func (o IpamsvcOptionGroup) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -356,10 +356,10 @@ func (o *IpamsvcOptionGroup) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -415,5 +415,3 @@ func (v *NullableIpamsvcOptionGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_item.go b/ipam/model_ipamsvc_option_item.go index 8802580..6ed0669 100644 --- a/ipam/model_ipamsvc_option_item.go +++ b/ipam/model_ipamsvc_option_item.go @@ -175,7 +175,7 @@ func (o *IpamsvcOptionItem) SetType(v string) { } func (o IpamsvcOptionItem) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableIpamsvcOptionItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_option_space.go b/ipam/model_ipamsvc_option_space.go index 434108e..4d24061 100644 --- a/ipam/model_ipamsvc_option_space.go +++ b/ipam/model_ipamsvc_option_space.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcOptionSpace type satisfies the MappedNullable interface at compile time @@ -275,7 +275,7 @@ func (o *IpamsvcOptionSpace) SetUpdatedAt(v time.Time) { } func (o IpamsvcOptionSpace) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -319,10 +319,10 @@ func (o *IpamsvcOptionSpace) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -378,5 +378,3 @@ func (v *NullableIpamsvcOptionSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_range.go b/ipam/model_ipamsvc_range.go index 78bf1a6..7d05e51 100644 --- a/ipam/model_ipamsvc_range.go +++ b/ipam/model_ipamsvc_range.go @@ -11,16 +11,16 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcRange type satisfies the MappedNullable interface at compile time var _ MappedNullable = &IpamsvcRange{} -// IpamsvcRange A __Range__ object (_ipam/range_) represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. +// IpamsvcRange A __Range__ object (_ipam/range_) represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. type IpamsvcRange struct { // The description for the range. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` @@ -43,7 +43,7 @@ type IpamsvcRange struct { // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []InheritanceAssignedHost `json:"inheritance_assigned_hosts,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcDHCPOptionsInheritance `json:"inheritance_sources,omitempty"` // The name of the range. May contain 1 to 256 characters. Can include UTF-8. Name *string `json:"name,omitempty"` @@ -56,11 +56,11 @@ type IpamsvcRange struct { // The start IP address of the range. Start string `json:"start"` // The tags for the range in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } @@ -774,7 +774,7 @@ func (o *IpamsvcRange) SetUtilizationV6(v IpamsvcUtilizationV6) { } func (o IpamsvcRange) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -862,10 +862,10 @@ func (o *IpamsvcRange) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -921,5 +921,3 @@ func (v *NullableIpamsvcRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_address_block_response.go b/ipam/model_ipamsvc_read_address_block_response.go index 4a018ea..5b1debe 100644 --- a/ipam/model_ipamsvc_read_address_block_response.go +++ b/ipam/model_ipamsvc_read_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadAddressBlockResponse) SetResult(v IpamsvcAddressBlock) { } func (o IpamsvcReadAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadAddressBlockResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_address_response.go b/ipam/model_ipamsvc_read_address_response.go index cd1b711..b5afa03 100644 --- a/ipam/model_ipamsvc_read_address_response.go +++ b/ipam/model_ipamsvc_read_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadAddressResponse) SetResult(v IpamsvcAddress) { } func (o IpamsvcReadAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_asm_response.go b/ipam/model_ipamsvc_read_asm_response.go index 90a1a37..046053e 100644 --- a/ipam/model_ipamsvc_read_asm_response.go +++ b/ipam/model_ipamsvc_read_asm_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadASMResponse) SetResult(v IpamsvcASM) { } func (o IpamsvcReadASMResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadASMResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_dns_usage_response.go b/ipam/model_ipamsvc_read_dns_usage_response.go index f587f67..74ef77b 100644 --- a/ipam/model_ipamsvc_read_dns_usage_response.go +++ b/ipam/model_ipamsvc_read_dns_usage_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadDNSUsageResponse) SetResult(v IpamsvcDNSUsage) { } func (o IpamsvcReadDNSUsageResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadDNSUsageResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_fixed_address_response.go b/ipam/model_ipamsvc_read_fixed_address_response.go index cd43301..40ceee8 100644 --- a/ipam/model_ipamsvc_read_fixed_address_response.go +++ b/ipam/model_ipamsvc_read_fixed_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadFixedAddressResponse) SetResult(v IpamsvcFixedAddress) { } func (o IpamsvcReadFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadFixedAddressResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_global_response.go b/ipam/model_ipamsvc_read_global_response.go index c83e64d..a68f9ac 100644 --- a/ipam/model_ipamsvc_read_global_response.go +++ b/ipam/model_ipamsvc_read_global_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadGlobalResponse) SetResult(v IpamsvcGlobal) { } func (o IpamsvcReadGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_ha_group_response.go b/ipam/model_ipamsvc_read_ha_group_response.go index 7769b16..174bb48 100644 --- a/ipam/model_ipamsvc_read_ha_group_response.go +++ b/ipam/model_ipamsvc_read_ha_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadHAGroupResponse) SetResult(v IpamsvcHAGroup) { } func (o IpamsvcReadHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_hardware_filter_response.go b/ipam/model_ipamsvc_read_hardware_filter_response.go index b125140..dd19045 100644 --- a/ipam/model_ipamsvc_read_hardware_filter_response.go +++ b/ipam/model_ipamsvc_read_hardware_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadHardwareFilterResponse) SetResult(v IpamsvcHardwareFilter) { } func (o IpamsvcReadHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadHardwareFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_host_response.go b/ipam/model_ipamsvc_read_host_response.go index aaeffa7..1ae30f4 100644 --- a/ipam/model_ipamsvc_read_host_response.go +++ b/ipam/model_ipamsvc_read_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadHostResponse) SetResult(v IpamsvcHost) { } func (o IpamsvcReadHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_ip_space_response.go b/ipam/model_ipamsvc_read_ip_space_response.go index 9776f2b..18a3eff 100644 --- a/ipam/model_ipamsvc_read_ip_space_response.go +++ b/ipam/model_ipamsvc_read_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadIPSpaceResponse) SetResult(v IpamsvcIPSpace) { } func (o IpamsvcReadIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_ipam_host_response.go b/ipam/model_ipamsvc_read_ipam_host_response.go index 872ae94..423803c 100644 --- a/ipam/model_ipamsvc_read_ipam_host_response.go +++ b/ipam/model_ipamsvc_read_ipam_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadIpamHostResponse) SetResult(v IpamsvcIpamHost) { } func (o IpamsvcReadIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadIpamHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_option_code_response.go b/ipam/model_ipamsvc_read_option_code_response.go index 5aedb15..59555dd 100644 --- a/ipam/model_ipamsvc_read_option_code_response.go +++ b/ipam/model_ipamsvc_read_option_code_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionCodeResponse) SetResult(v IpamsvcOptionCode) { } func (o IpamsvcReadOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadOptionCodeResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_option_filter_response.go b/ipam/model_ipamsvc_read_option_filter_response.go index 1de135c..8692cee 100644 --- a/ipam/model_ipamsvc_read_option_filter_response.go +++ b/ipam/model_ipamsvc_read_option_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionFilterResponse) SetResult(v IpamsvcOptionFilter) { } func (o IpamsvcReadOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadOptionFilterResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_option_group_response.go b/ipam/model_ipamsvc_read_option_group_response.go index 6b8c323..9419041 100644 --- a/ipam/model_ipamsvc_read_option_group_response.go +++ b/ipam/model_ipamsvc_read_option_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionGroupResponse) SetResult(v IpamsvcOptionGroup) { } func (o IpamsvcReadOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadOptionGroupResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_option_space_response.go b/ipam/model_ipamsvc_read_option_space_response.go index 680cca7..ce5c7dd 100644 --- a/ipam/model_ipamsvc_read_option_space_response.go +++ b/ipam/model_ipamsvc_read_option_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadOptionSpaceResponse) SetResult(v IpamsvcOptionSpace) { } func (o IpamsvcReadOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadOptionSpaceResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_range_response.go b/ipam/model_ipamsvc_read_range_response.go index c498dae..1bdd2cc 100644 --- a/ipam/model_ipamsvc_read_range_response.go +++ b/ipam/model_ipamsvc_read_range_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadRangeResponse) SetResult(v IpamsvcRange) { } func (o IpamsvcReadRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_server_response.go b/ipam/model_ipamsvc_read_server_response.go index 2ac57fc..0f0e3e4 100644 --- a/ipam/model_ipamsvc_read_server_response.go +++ b/ipam/model_ipamsvc_read_server_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadServerResponse) SetResult(v IpamsvcServer) { } func (o IpamsvcReadServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_read_subnet_response.go b/ipam/model_ipamsvc_read_subnet_response.go index a21e788..9b3a0ee 100644 --- a/ipam/model_ipamsvc_read_subnet_response.go +++ b/ipam/model_ipamsvc_read_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcReadSubnetResponse) SetResult(v IpamsvcSubnet) { } func (o IpamsvcReadSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcReadSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_server.go b/ipam/model_ipamsvc_server.go index aa6c735..3ee6223 100644 --- a/ipam/model_ipamsvc_server.go +++ b/ipam/model_ipamsvc_server.go @@ -11,10 +11,10 @@ API version: v1 package ipam import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the IpamsvcServer type satisfies the MappedNullable interface at compile time @@ -49,7 +49,7 @@ type IpamsvcServer struct { // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` // The DNS zones that DDNS updates can be sent to. There is no resolver fallback. The target zone must be explicitly configured for the update to be performed. Updates are sent to the closest enclosing zone. Error if _ddns_enabled_ is _true_ and the _ddns_domain_ does not have a corresponding entry in _ddns_zones_. Error if there are items with duplicate zone in the list. Defaults to empty list. - DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` + DdnsZones []IpamsvcDDNSZone `json:"ddns_zones,omitempty"` DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The list of DHCP options or group of options for IPv4. An option list is ordered and may include both option groups and specific options. Multiple occurences of the same option or group is not an error. The last occurence of an option in the list will be used. Error if the graph of referenced groups contains cycles. Defaults to empty list. DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` @@ -70,7 +70,7 @@ type IpamsvcServer struct { // The regex bracket expression to match valid characters. Must begin with \"[\" and end with \"]\" and be a compilable POSIX regex. Defaults to \"[^a-zA-Z0-9_.]\". HostnameRewriteRegex *string `json:"hostname_rewrite_regex,omitempty"` // The resource identifier. - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty"` InheritanceSources *IpamsvcServerInheritance `json:"inheritance_sources,omitempty"` // Address of Kerberos Key Distribution Center. Defaults to empty. KerberosKdc *string `json:"kerberos_kdc,omitempty"` @@ -1293,7 +1293,7 @@ func (o *IpamsvcServer) SetVendorSpecificOptionOptionSpace(v string) { } func (o IpamsvcServer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1427,10 +1427,10 @@ func (o *IpamsvcServer) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1486,5 +1486,3 @@ func (v *NullableIpamsvcServer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_server_inheritance.go b/ipam/model_ipamsvc_server_inheritance.go index 29ab706..312e10e 100644 --- a/ipam/model_ipamsvc_server_inheritance.go +++ b/ipam/model_ipamsvc_server_inheritance.go @@ -19,21 +19,21 @@ var _ MappedNullable = &IpamsvcServerInheritance{} // IpamsvcServerInheritance The inheritance configuration specifies how and which fields _Server_ object (DHCP Config Profile) inherits from _Global_ parent. type IpamsvcServerInheritance struct { - DdnsBlock *IpamsvcInheritedDDNSBlock `json:"ddns_block,omitempty"` - DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` - DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` - DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` - DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` - DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` - DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` - DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` - DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` - HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` - HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` - HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` - HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` - VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` + DdnsBlock *IpamsvcInheritedDDNSBlock `json:"ddns_block,omitempty"` + DdnsClientUpdate *InheritanceInheritedString `json:"ddns_client_update,omitempty"` + DdnsConflictResolutionMode *InheritanceInheritedString `json:"ddns_conflict_resolution_mode,omitempty"` + DdnsHostnameBlock *IpamsvcInheritedDDNSHostnameBlock `json:"ddns_hostname_block,omitempty"` + DdnsTtlPercent *InheritanceInheritedFloat `json:"ddns_ttl_percent,omitempty"` + DdnsUpdateOnRenew *InheritanceInheritedBool `json:"ddns_update_on_renew,omitempty"` + DdnsUseConflictResolution *InheritanceInheritedBool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcInheritedDHCPConfig `json:"dhcp_config,omitempty"` + DhcpOptions *IpamsvcInheritedDHCPOptionList `json:"dhcp_options,omitempty"` + DhcpOptionsV6 *IpamsvcInheritedDHCPOptionList `json:"dhcp_options_v6,omitempty"` + HeaderOptionFilename *InheritanceInheritedString `json:"header_option_filename,omitempty"` + HeaderOptionServerAddress *InheritanceInheritedString `json:"header_option_server_address,omitempty"` + HeaderOptionServerName *InheritanceInheritedString `json:"header_option_server_name,omitempty"` + HostnameRewriteBlock *IpamsvcInheritedHostnameRewriteBlock `json:"hostname_rewrite_block,omitempty"` + VendorSpecificOptionOptionSpace *InheritanceInheritedIdentifier `json:"vendor_specific_option_option_space,omitempty"` } // NewIpamsvcServerInheritance instantiates a new IpamsvcServerInheritance object @@ -534,7 +534,7 @@ func (o *IpamsvcServerInheritance) SetVendorSpecificOptionOptionSpace(v Inherita } func (o IpamsvcServerInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -626,5 +626,3 @@ func (v *NullableIpamsvcServerInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_subnet.go b/ipam/model_ipamsvc_subnet.go index 08f239b..0f455eb 100644 --- a/ipam/model_ipamsvc_subnet.go +++ b/ipam/model_ipamsvc_subnet.go @@ -21,7 +21,7 @@ var _ MappedNullable = &IpamsvcSubnet{} // IpamsvcSubnet A __Subnet__ object (_ipam/subnet_) is a set of contiguous IP addresses in the same IP space with no gap, expressed as an address and CIDR values. It represents a set of addresses from which addresses are assigned to network equipment interfaces. type IpamsvcSubnet struct { // The address of the subnet in the form “a.b.c.d/n” where the “/n” may be omitted. In this case, the CIDR value must be defined in the _cidr_ field. When reading, the _address_ field is always in the form “a.b.c.d”. - Address *string `json:"address,omitempty"` + Address *string `json:"address,omitempty"` AsmConfig *IpamsvcASMConfig `json:"asm_config,omitempty"` // Set to 1 to indicate that the subnet may run out of addresses. AsmScopeFlag *int64 `json:"asm_scope_flag,omitempty"` @@ -48,12 +48,12 @@ type IpamsvcSubnet struct { // Instructs the DHCP server to always update the DNS information when a lease is renewed even if its DNS information has not changed. Defaults to _false_. DdnsUpdateOnRenew *bool `json:"ddns_update_on_renew,omitempty"` // When true, DHCP server will apply conflict resolution, as described in RFC 4703, when attempting to fulfill the update request. When false, DHCP server will simply attempt to update the DNS entries per the request, regardless of whether or not they conflict with existing entries owned by other DHCP4 clients. Defaults to _true_. - DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` - DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` + DdnsUseConflictResolution *bool `json:"ddns_use_conflict_resolution,omitempty"` + DhcpConfig *IpamsvcDHCPConfig `json:"dhcp_config,omitempty"` // The resource identifier. DhcpHost *string `json:"dhcp_host,omitempty"` // The DHCP options of the subnet. This can either be a specific option or a group of options. - DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` + DhcpOptions []IpamsvcOptionItem `json:"dhcp_options,omitempty"` DhcpUtilization *IpamsvcDHCPUtilization `json:"dhcp_utilization,omitempty"` // Optional. _true_ to disable object. A disabled object is effectively non-existent when generating configuration. Defaults to _false_. DisableDhcp *bool `json:"disable_dhcp,omitempty"` @@ -78,7 +78,7 @@ type IpamsvcSubnet struct { // The list of the inheritance assigned hosts of the object. InheritanceAssignedHosts []InheritanceAssignedHost `json:"inheritance_assigned_hosts,omitempty"` // The resource identifier. - InheritanceParent *string `json:"inheritance_parent,omitempty"` + InheritanceParent *string `json:"inheritance_parent,omitempty"` InheritanceSources *IpamsvcDHCPInheritance `json:"inheritance_sources,omitempty"` // The name of the subnet. May contain 1 to 256 characters. Can include UTF-8. Name *string `json:"name,omitempty"` @@ -93,13 +93,13 @@ type IpamsvcSubnet struct { // The resource identifier. Space *string `json:"space,omitempty"` // The tags for the subnet in JSON format. - Tags map[string]interface{} `json:"tags,omitempty"` + Tags map[string]interface{} `json:"tags,omitempty"` Threshold *IpamsvcUtilizationThreshold `json:"threshold,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` // The usage is a combination of indicators, each tracking a specific associated use. Listed below are usage indicators with their meaning: usage indicator | description ---------------------- | -------------------------------- _IPAM_ | Subnet is managed in BloxOne DDI. _DHCP_ | Subnet is served by a DHCP Host. _DISCOVERED_ | Subnet is discovered by some network discovery probe like Network Insight or NetMRI in NIOS. - Usage []string `json:"usage,omitempty"` - Utilization *IpamsvcUtilization `json:"utilization,omitempty"` + Usage []string `json:"usage,omitempty"` + Utilization *IpamsvcUtilization `json:"utilization,omitempty"` UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } @@ -1529,7 +1529,7 @@ func (o *IpamsvcSubnet) SetUtilizationV6(v IpamsvcUtilizationV6) { } func (o IpamsvcSubnet) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -1708,5 +1708,3 @@ func (v *NullableIpamsvcSubnet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_tsig_key.go b/ipam/model_ipamsvc_tsig_key.go index 0b539f6..2c01473 100644 --- a/ipam/model_ipamsvc_tsig_key.go +++ b/ipam/model_ipamsvc_tsig_key.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -240,7 +240,7 @@ func (o *IpamsvcTSIGKey) SetSecret(v string) { } func (o IpamsvcTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -281,10 +281,10 @@ func (o *IpamsvcTSIGKey) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -340,5 +340,3 @@ func (v *NullableIpamsvcTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_address_block_response.go b/ipam/model_ipamsvc_update_address_block_response.go index 76f654f..a2c7ad0 100644 --- a/ipam/model_ipamsvc_update_address_block_response.go +++ b/ipam/model_ipamsvc_update_address_block_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateAddressBlockResponse) SetResult(v IpamsvcAddressBlock) { } func (o IpamsvcUpdateAddressBlockResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateAddressBlockResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_address_response.go b/ipam/model_ipamsvc_update_address_response.go index e76d5fa..878eb30 100644 --- a/ipam/model_ipamsvc_update_address_response.go +++ b/ipam/model_ipamsvc_update_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateAddressResponse) SetResult(v IpamsvcAddress) { } func (o IpamsvcUpdateAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateAddressResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_fixed_address_response.go b/ipam/model_ipamsvc_update_fixed_address_response.go index b1b1839..2d15973 100644 --- a/ipam/model_ipamsvc_update_fixed_address_response.go +++ b/ipam/model_ipamsvc_update_fixed_address_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateFixedAddressResponse) SetResult(v IpamsvcFixedAddress) { } func (o IpamsvcUpdateFixedAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateFixedAddressResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_global_response.go b/ipam/model_ipamsvc_update_global_response.go index 97daed9..dfe6ac2 100644 --- a/ipam/model_ipamsvc_update_global_response.go +++ b/ipam/model_ipamsvc_update_global_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateGlobalResponse) SetResult(v IpamsvcGlobal) { } func (o IpamsvcUpdateGlobalResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateGlobalResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_ha_group_response.go b/ipam/model_ipamsvc_update_ha_group_response.go index f94a72e..6b96556 100644 --- a/ipam/model_ipamsvc_update_ha_group_response.go +++ b/ipam/model_ipamsvc_update_ha_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateHAGroupResponse) SetResult(v IpamsvcHAGroup) { } func (o IpamsvcUpdateHAGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateHAGroupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_hardware_filter_response.go b/ipam/model_ipamsvc_update_hardware_filter_response.go index 8aa4af9..2abe891 100644 --- a/ipam/model_ipamsvc_update_hardware_filter_response.go +++ b/ipam/model_ipamsvc_update_hardware_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateHardwareFilterResponse) SetResult(v IpamsvcHardwareFilter) } func (o IpamsvcUpdateHardwareFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateHardwareFilterResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_host_response.go b/ipam/model_ipamsvc_update_host_response.go index 180eb0d..f838457 100644 --- a/ipam/model_ipamsvc_update_host_response.go +++ b/ipam/model_ipamsvc_update_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateHostResponse) SetResult(v IpamsvcHost) { } func (o IpamsvcUpdateHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateHostResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_ip_space_response.go b/ipam/model_ipamsvc_update_ip_space_response.go index 6df73d1..54bcd42 100644 --- a/ipam/model_ipamsvc_update_ip_space_response.go +++ b/ipam/model_ipamsvc_update_ip_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateIPSpaceResponse) SetResult(v IpamsvcIPSpace) { } func (o IpamsvcUpdateIPSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateIPSpaceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_ipam_host_response.go b/ipam/model_ipamsvc_update_ipam_host_response.go index 897fe61..d10e650 100644 --- a/ipam/model_ipamsvc_update_ipam_host_response.go +++ b/ipam/model_ipamsvc_update_ipam_host_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateIpamHostResponse) SetResult(v IpamsvcIpamHost) { } func (o IpamsvcUpdateIpamHostResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateIpamHostResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_option_code_response.go b/ipam/model_ipamsvc_update_option_code_response.go index 541c160..5dfa6a4 100644 --- a/ipam/model_ipamsvc_update_option_code_response.go +++ b/ipam/model_ipamsvc_update_option_code_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionCodeResponse) SetResult(v IpamsvcOptionCode) { } func (o IpamsvcUpdateOptionCodeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateOptionCodeResponse) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_option_filter_response.go b/ipam/model_ipamsvc_update_option_filter_response.go index ba02027..a9f929d 100644 --- a/ipam/model_ipamsvc_update_option_filter_response.go +++ b/ipam/model_ipamsvc_update_option_filter_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionFilterResponse) SetResult(v IpamsvcOptionFilter) { } func (o IpamsvcUpdateOptionFilterResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateOptionFilterResponse) UnmarshalJSON(src []byte) er v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_option_group_response.go b/ipam/model_ipamsvc_update_option_group_response.go index a78ec4c..5dbeec4 100644 --- a/ipam/model_ipamsvc_update_option_group_response.go +++ b/ipam/model_ipamsvc_update_option_group_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionGroupResponse) SetResult(v IpamsvcOptionGroup) { } func (o IpamsvcUpdateOptionGroupResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateOptionGroupResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_option_space_response.go b/ipam/model_ipamsvc_update_option_space_response.go index d60fef3..a1a6286 100644 --- a/ipam/model_ipamsvc_update_option_space_response.go +++ b/ipam/model_ipamsvc_update_option_space_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateOptionSpaceResponse) SetResult(v IpamsvcOptionSpace) { } func (o IpamsvcUpdateOptionSpaceResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateOptionSpaceResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_range_response.go b/ipam/model_ipamsvc_update_range_response.go index 8904318..364b3c9 100644 --- a/ipam/model_ipamsvc_update_range_response.go +++ b/ipam/model_ipamsvc_update_range_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateRangeResponse) SetResult(v IpamsvcRange) { } func (o IpamsvcUpdateRangeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateRangeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_server_response.go b/ipam/model_ipamsvc_update_server_response.go index 84bd88a..ec51735 100644 --- a/ipam/model_ipamsvc_update_server_response.go +++ b/ipam/model_ipamsvc_update_server_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateServerResponse) SetResult(v IpamsvcServer) { } func (o IpamsvcUpdateServerResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateServerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_update_subnet_response.go b/ipam/model_ipamsvc_update_subnet_response.go index a2a9160..9b49514 100644 --- a/ipam/model_ipamsvc_update_subnet_response.go +++ b/ipam/model_ipamsvc_update_subnet_response.go @@ -72,7 +72,7 @@ func (o *IpamsvcUpdateSubnetResponse) SetResult(v IpamsvcSubnet) { } func (o IpamsvcUpdateSubnetResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableIpamsvcUpdateSubnetResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_utilization.go b/ipam/model_ipamsvc_utilization.go index b85624a..e18202e 100644 --- a/ipam/model_ipamsvc_utilization.go +++ b/ipam/model_ipamsvc_utilization.go @@ -311,7 +311,7 @@ func (o *IpamsvcUtilization) SetUtilization(v int64) { } func (o IpamsvcUtilization) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,5 +382,3 @@ func (v *NullableIpamsvcUtilization) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_utilization_threshold.go b/ipam/model_ipamsvc_utilization_threshold.go index 201f447..960d909 100644 --- a/ipam/model_ipamsvc_utilization_threshold.go +++ b/ipam/model_ipamsvc_utilization_threshold.go @@ -11,8 +11,8 @@ API version: v1 package ipam import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -124,7 +124,7 @@ func (o *IpamsvcUtilizationThreshold) SetLow(v int64) { } func (o IpamsvcUtilizationThreshold) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -154,10 +154,10 @@ func (o *IpamsvcUtilizationThreshold) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -213,5 +213,3 @@ func (v *NullableIpamsvcUtilizationThreshold) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/ipam/model_ipamsvc_utilization_v6.go b/ipam/model_ipamsvc_utilization_v6.go index b8a616e..119f6fd 100644 --- a/ipam/model_ipamsvc_utilization_v6.go +++ b/ipam/model_ipamsvc_utilization_v6.go @@ -20,10 +20,10 @@ var _ MappedNullable = &IpamsvcUtilizationV6{} // IpamsvcUtilizationV6 The __UtilizationV6__ object represents IPV6 address usage statistics for an object. type IpamsvcUtilizationV6 struct { Abandoned *string `json:"abandoned,omitempty"` - Dynamic *string `json:"dynamic,omitempty"` - Static *string `json:"static,omitempty"` - Total *string `json:"total,omitempty"` - Used *string `json:"used,omitempty"` + Dynamic *string `json:"dynamic,omitempty"` + Static *string `json:"static,omitempty"` + Total *string `json:"total,omitempty"` + Used *string `json:"used,omitempty"` } // NewIpamsvcUtilizationV6 instantiates a new IpamsvcUtilizationV6 object @@ -204,7 +204,7 @@ func (o *IpamsvcUtilizationV6) SetUsed(v string) { } func (o IpamsvcUtilizationV6) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -266,5 +266,3 @@ func (v *NullableIpamsvcUtilizationV6) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index 1a8c350..68f2022 100644 --- a/keys/api_generate_tsig.go +++ b/keys/api_generate_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,17 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type GenerateTsigAPI interface { /* - GenerateTsigGenerateTSIG Generate TSIG key with a random secret. + GenerateTsigGenerateTSIG Generate TSIG key with a random secret. - Use this method to generate a TSIG key with a random secret using the specified algorithm. + Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest @@ -41,9 +40,9 @@ type GenerateTsigAPI interface { type GenerateTsigAPIService internal.Service type ApiGenerateTsigGenerateTSIGRequest struct { - ctx context.Context + ctx context.Context ApiService GenerateTsigAPI - algorithm *string + algorithm *string } // The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. @@ -61,24 +60,25 @@ GenerateTsigGenerateTSIG Generate TSIG key with a random secret. Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest { return ApiGenerateTsigGenerateTSIGRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysGenerateTSIGResponse +// +// @return KeysGenerateTSIGResponse func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTsigGenerateTSIGRequest) (*KeysGenerateTSIGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysGenerateTSIGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysGenerateTSIGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GenerateTsigAPIService.GenerateTsigGenerateTSIG") diff --git a/keys/api_kerberos.go b/keys/api_kerberos.go index fea56c9..42d68ac 100644 --- a/keys/api_kerberos.go +++ b/keys/api_kerberos.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,33 +18,32 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type KerberosAPI interface { /* - KerberosDelete Delete the Kerberos key. + KerberosDelete Delete the Kerberos key. - Use this method to delete a __KerberosKey__ object. -A __KerberosKey__ object represents a Kerberos key. + Use this method to delete a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest // KerberosDeleteExecute executes the request KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) /* - KerberosList Retrieve Kerberos keys. + KerberosList Retrieve Kerberos keys. - Use this method to retrieve __KerberosKey__ objects. -A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve __KerberosKey__ objects. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ KerberosList(ctx context.Context) ApiKerberosListRequest @@ -52,14 +51,14 @@ A __KerberosKey__ object represents a Kerberos key. // @return KeysListKerberosKeyResponse KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) /* - KerberosRead Retrieve the Kerberos key. + KerberosRead Retrieve the Kerberos key. - Use this method to retrieve a __KerberosKey__ object. -A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest @@ -67,14 +66,14 @@ A __KerberosKey__ object represents a Kerberos key. // @return KeysReadKerberosKeyResponse KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) /* - KerberosUpdate Update the Kerberos key. + KerberosUpdate Update the Kerberos key. - Use this method to update a __KerberosKey__ object. -A __KerberosKey__ object represents a Kerberos key. + Use this method to update a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest @@ -82,10 +81,10 @@ A __KerberosKey__ object represents a Kerberos key. // @return KeysUpdateKerberosKeyResponse KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) /* - KeysKerberosPost Method for KeysKerberosPost + KeysKerberosPost Method for KeysKerberosPost - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKeysKerberosPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest */ KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest @@ -98,9 +97,9 @@ A __KerberosKey__ object represents a Kerberos key. type KerberosAPIService internal.Service type ApiKerberosDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string + id string } func (r ApiKerberosDeleteRequest) Execute() (*http.Response, error) { @@ -113,24 +112,24 @@ KerberosDelete Delete the Kerberos key. Use this method to delete a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ func (a *KerberosAPIService) KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest { return ApiKerberosDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *KerberosAPIService) KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosDelete") @@ -202,49 +201,49 @@ func (a *KerberosAPIService) KerberosDeleteExecute(r ApiKerberosDeleteRequest) ( } type ApiKerberosListRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosListRequest) Fields(fields string) ApiKerberosListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiKerberosListRequest) Filter(filter string) ApiKerberosListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiKerberosListRequest) Offset(offset int32) ApiKerberosListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiKerberosListRequest) Limit(limit int32) ApiKerberosListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiKerberosListRequest) PageToken(pageToken string) ApiKerberosListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiKerberosListRequest) OrderBy(orderBy string) ApiKerberosListRequest { r.orderBy = &orderBy return r @@ -272,24 +271,25 @@ KerberosList Retrieve Kerberos keys. Use this method to retrieve __KerberosKey__ objects. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ func (a *KerberosAPIService) KerberosList(ctx context.Context) ApiKerberosListRequest { return ApiKerberosListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysListKerberosKeyResponse +// +// @return KeysListKerberosKeyResponse func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListKerberosKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosList") @@ -389,13 +389,13 @@ func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*Key } type ApiKerberosReadRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosReadRequest) Fields(fields string) ApiKerberosReadRequest { r.fields = &fields return r @@ -411,26 +411,27 @@ KerberosRead Retrieve the Kerberos key. Use this method to retrieve a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ func (a *KerberosAPIService) KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest { return ApiKerberosReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return KeysReadKerberosKeyResponse +// +// @return KeysReadKerberosKeyResponse func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadKerberosKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosRead") @@ -510,10 +511,10 @@ func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*Key } type ApiKerberosUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - id string - body *KerberosKey + id string + body *KerberosKey } func (r ApiKerberosUpdateRequest) Body(body KerberosKey) ApiKerberosUpdateRequest { @@ -531,26 +532,27 @@ KerberosUpdate Update the Kerberos key. Use this method to update a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ func (a *KerberosAPIService) KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest { return ApiKerberosUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return KeysUpdateKerberosKeyResponse +// +// @return KeysUpdateKerberosKeyResponse func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateKerberosKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KerberosUpdate") @@ -585,8 +587,8 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -632,9 +634,9 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( } type ApiKeysKerberosPostRequest struct { - ctx context.Context + ctx context.Context ApiService KerberosAPI - body *KerberosKey + body *KerberosKey } func (r ApiKeysKerberosPostRequest) Body(body KerberosKey) ApiKeysKerberosPostRequest { @@ -649,24 +651,25 @@ func (r ApiKeysKerberosPostRequest) Execute() (*KeysListKerberosKeyResponse, *ht /* KeysKerberosPost Method for KeysKerberosPost - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKeysKerberosPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest */ func (a *KerberosAPIService) KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest { return ApiKeysKerberosPostRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysListKerberosKeyResponse +// +// @return KeysListKerberosKeyResponse func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListKerberosKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KeysKerberosPost") @@ -700,8 +703,8 @@ func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostReques if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 75539e6..7aa8083 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,19 +18,18 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type TsigAPI interface { /* - TsigCreate Create the TSIG key. + TsigCreate Create the TSIG key. - Use this method to create a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to create a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ TsigCreate(ctx context.Context) ApiTsigCreateRequest @@ -38,27 +37,27 @@ A __TSIGKey__ object represents a TSIG key. // @return KeysCreateTSIGKeyResponse TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) /* - TsigDelete Delete the TSIG key. + TsigDelete Delete the TSIG key. - Use this method to delete a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to delete a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest // TsigDeleteExecute executes the request TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) /* - TsigList Retrieve TSIG keys. + TsigList Retrieve TSIG keys. - Use this method to retrieve __TSIGKey__ objects. -A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve __TSIGKey__ objects. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ TsigList(ctx context.Context) ApiTsigListRequest @@ -66,14 +65,14 @@ A __TSIGKey__ object represents a TSIG key. // @return KeysListTSIGKeyResponse TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) /* - TsigRead Retrieve the TSIG key. + TsigRead Retrieve the TSIG key. - Use this method to retrieve a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ TsigRead(ctx context.Context, id string) ApiTsigReadRequest @@ -81,14 +80,14 @@ A __TSIGKey__ object represents a TSIG key. // @return KeysReadTSIGKeyResponse TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) /* - TsigUpdate Update the TSIG key. + TsigUpdate Update the TSIG key. - Use this method to update a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to update a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest @@ -101,9 +100,9 @@ A __TSIGKey__ object represents a TSIG key. type TsigAPIService internal.Service type ApiTsigCreateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - body *KeysTSIGKey + body *KeysTSIGKey } func (r ApiTsigCreateRequest) Body(body KeysTSIGKey) ApiTsigCreateRequest { @@ -121,24 +120,25 @@ TsigCreate Create the TSIG key. Use this method to create a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { return ApiTsigCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysCreateTSIGKeyResponse +// +// @return KeysCreateTSIGKeyResponse func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysCreateTSIGKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysCreateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigCreate") @@ -172,16 +172,16 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { @@ -227,9 +227,9 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT } type ApiTsigDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string + id string } func (r ApiTsigDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +242,24 @@ TsigDelete Delete the TSIG key. Use this method to delete a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ func (a *TsigAPIService) TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest { return ApiTsigDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigDelete") @@ -331,49 +331,49 @@ func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Respon } type ApiTsigListRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigListRequest) Fields(fields string) ApiTsigListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiTsigListRequest) Filter(filter string) ApiTsigListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiTsigListRequest) Offset(offset int32) ApiTsigListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiTsigListRequest) Limit(limit int32) ApiTsigListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiTsigListRequest) PageToken(pageToken string) ApiTsigListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiTsigListRequest) OrderBy(orderBy string) ApiTsigListRequest { r.orderBy = &orderBy return r @@ -401,24 +401,25 @@ TsigList Retrieve TSIG keys. Use this method to retrieve __TSIGKey__ objects. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { return ApiTsigListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysListTSIGKeyResponse +// +// @return KeysListTSIGKeyResponse func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigList") @@ -518,13 +519,13 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey } type ApiTsigReadRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigReadRequest) Fields(fields string) ApiTsigReadRequest { r.fields = &fields return r @@ -540,26 +541,27 @@ TsigRead Retrieve the TSIG key. Use this method to retrieve a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadRequest { return ApiTsigReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return KeysReadTSIGKeyResponse +// +// @return KeysReadTSIGKeyResponse func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigRead") @@ -639,10 +641,10 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey } type ApiTsigUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - body *KeysTSIGKey + id string + body *KeysTSIGKey } func (r ApiTsigUpdateRequest) Body(body KeysTSIGKey) ApiTsigUpdateRequest { @@ -660,26 +662,27 @@ TsigUpdate Update the TSIG key. Use this method to update a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest { return ApiTsigUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return KeysUpdateTSIGKeyResponse +// +// @return KeysUpdateTSIGKeyResponse func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateTSIGKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigUpdate") @@ -714,16 +717,16 @@ func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/keys/api_upload.go b/keys/api_upload.go index 8c14f17..d91ba24 100644 --- a/keys/api_upload.go +++ b/keys/api_upload.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,17 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type UploadAPI interface { /* - UploadUpload Upload content to the keys service. + UploadUpload Upload content to the keys service. - Use this method to upload specified content type to the keys service. + Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ UploadUpload(ctx context.Context) ApiUploadUploadRequest @@ -41,9 +40,9 @@ type UploadAPI interface { type UploadAPIService internal.Service type ApiUploadUploadRequest struct { - ctx context.Context + ctx context.Context ApiService UploadAPI - body *UploadRequest + body *UploadRequest } func (r ApiUploadUploadRequest) Body(body UploadRequest) ApiUploadUploadRequest { @@ -60,24 +59,25 @@ UploadUpload Upload content to the keys service. Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequest { return ApiUploadUploadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return DdiuploadResponse +// +// @return DdiuploadResponse func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*DdiuploadResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DdiuploadResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DdiuploadResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UploadAPIService.UploadUpload") @@ -111,16 +111,16 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } - // body params - localVarPostBody = r.body + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { diff --git a/keys/client.go b/keys/client.go index 286dc91..b3649a4 100644 --- a/keys/client.go +++ b/keys/client.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package keys import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,20 +19,20 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DDI Keys API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services GenerateTsigAPI GenerateTsigAPI - KerberosAPI KerberosAPI - TsigAPI TsigAPI - UploadAPI UploadAPI + KerberosAPI KerberosAPI + TsigAPI TsigAPI + UploadAPI UploadAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.GenerateTsigAPI = (*GenerateTsigAPIService)(&c.Common) diff --git a/keys/model_ddiupload_response.go b/keys/model_ddiupload_response.go index e220432..a58ddfb 100644 --- a/keys/model_ddiupload_response.go +++ b/keys/model_ddiupload_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -106,7 +106,7 @@ func (o *DdiuploadResponse) SetWarning(v string) { } func (o DdiuploadResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,5 +159,3 @@ func (v *NullableDdiuploadResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_kerberos_key.go b/keys/model_kerberos_key.go index 4285f1e..ee036c9 100644 --- a/keys/model_kerberos_key.go +++ b/keys/model_kerberos_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -311,7 +311,7 @@ func (o *KerberosKey) SetVersion(v int64) { } func (o KerberosKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,5 +382,3 @@ func (v *NullableKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_kerberos_keys.go b/keys/model_kerberos_keys.go index 78817e6..1c06064 100644 --- a/keys/model_kerberos_keys.go +++ b/keys/model_kerberos_keys.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KerberosKeys) SetItems(v []KerberosKey) { } func (o KerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_create_tsig_key_response.go b/keys/model_keys_create_tsig_key_response.go index bfe51e4..edd0da5 100644 --- a/keys/model_keys_create_tsig_key_response.go +++ b/keys/model_keys_create_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysCreateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysCreateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysCreateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_generate_tsig_response.go b/keys/model_keys_generate_tsig_response.go index 5a6ee49..85f10e4 100644 --- a/keys/model_keys_generate_tsig_response.go +++ b/keys/model_keys_generate_tsig_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysGenerateTSIGResponse) SetResult(v KeysGenerateTSIGResult) { } func (o KeysGenerateTSIGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysGenerateTSIGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_generate_tsig_result.go b/keys/model_keys_generate_tsig_result.go index 9b7dab8..4f6b49d 100644 --- a/keys/model_keys_generate_tsig_result.go +++ b/keys/model_keys_generate_tsig_result.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysGenerateTSIGResult) SetSecret(v string) { } func (o KeysGenerateTSIGResult) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableKeysGenerateTSIGResult) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_list_kerberos_key_response.go b/keys/model_keys_list_kerberos_key_response.go index 31006cc..5966a99 100644 --- a/keys/model_keys_list_kerberos_key_response.go +++ b/keys/model_keys_list_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListKerberosKeyResponse) SetResults(v []KerberosKey) { } func (o KeysListKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableKeysListKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_list_tsig_key_response.go b/keys/model_keys_list_tsig_key_response.go index 5d90120..2a6d699 100644 --- a/keys/model_keys_list_tsig_key_response.go +++ b/keys/model_keys_list_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListTSIGKeyResponse) SetResults(v []KeysTSIGKey) { } func (o KeysListTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableKeysListTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_read_kerberos_key_response.go b/keys/model_keys_read_kerberos_key_response.go index daeeb0c..dce9578 100644 --- a/keys/model_keys_read_kerberos_key_response.go +++ b/keys/model_keys_read_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysReadKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysReadKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_read_tsig_key_response.go b/keys/model_keys_read_tsig_key_response.go index 3eee404..fdc725c 100644 --- a/keys/model_keys_read_tsig_key_response.go +++ b/keys/model_keys_read_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysReadTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysReadTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 2e98702..bb5cb3d 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,10 +11,10 @@ API version: v1 package keys import ( - "encoding/json" - "time" "bytes" + "encoding/json" "fmt" + "time" ) // checks if the KeysTSIGKey type satisfies the MappedNullable interface at compile time @@ -336,7 +336,7 @@ func (o *KeysTSIGKey) SetUpdatedAt(v time.Time) { } func (o KeysTSIGKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -385,10 +385,10 @@ func (o *KeysTSIGKey) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -444,5 +444,3 @@ func (v *NullableKeysTSIGKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_update_kerberos_key_response.go b/keys/model_keys_update_kerberos_key_response.go index 189d271..9e83ae5 100644 --- a/keys/model_keys_update_kerberos_key_response.go +++ b/keys/model_keys_update_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysUpdateKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysUpdateKerberosKeyResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_update_tsig_key_response.go b/keys/model_keys_update_tsig_key_response.go index 2082989..dc1acd7 100644 --- a/keys/model_keys_update_tsig_key_response.go +++ b/keys/model_keys_update_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysUpdateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysUpdateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_protobuf_field_mask.go b/keys/model_protobuf_field_mask.go index 33973a0..c76ddb4 100644 --- a/keys/model_protobuf_field_mask.go +++ b/keys/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_upload_content_type.go b/keys/model_upload_content_type.go index 4052062..dbdf50c 100644 --- a/keys/model_upload_content_type.go +++ b/keys/model_upload_content_type.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -21,7 +21,7 @@ type UploadContentType string // List of uploadContentType const ( UPLOADCONTENTTYPE_UNKNOWN UploadContentType = "UNKNOWN" - UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" + UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" ) // All allowed values of UploadContentType enum @@ -108,4 +108,3 @@ func (v *NullableUploadContentType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - diff --git a/keys/model_upload_request.go b/keys/model_upload_request.go index 351fa56..4bdedcf 100644 --- a/keys/model_upload_request.go +++ b/keys/model_upload_request.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,8 +11,8 @@ API version: v1 package keys import ( - "encoding/json" "bytes" + "encoding/json" "fmt" ) @@ -24,11 +24,11 @@ type UploadRequest struct { // The description for uploaded content. May contain 0 to 1024 characters. Can include UTF-8. Comment *string `json:"comment,omitempty"` // Base64 encoded content. - Content string `json:"content"` - Fields *ProtobufFieldMask `json:"fields,omitempty"` + Content string `json:"content"` + Fields *ProtobufFieldMask `json:"fields,omitempty"` // The tags for uploaded content in JSON format. Tags map[string]interface{} `json:"tags,omitempty"` - Type UploadContentType `json:"type"` + Type UploadContentType `json:"type"` } type _UploadRequest UploadRequest @@ -199,7 +199,7 @@ func (o *UploadRequest) SetType(v UploadContentType) { } func (o UploadRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -236,10 +236,10 @@ func (o *UploadRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err; + return err } - for _, requiredProperty := range(requiredProperties) { + for _, requiredProperty := range requiredProperties { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -295,5 +295,3 @@ func (v *NullableUploadRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/utils.go b/keys/utils.go index 51922c8..9d1e0fd 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ From af9a75d83a1ae7dc76cd82d8dc7f50db99386a30 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 1 Feb 2024 10:00:58 -0800 Subject: [PATCH 07/18] test runs, more fields needed to be test --- keys/api_tsig.go | 1 + keys/model_keys_tsig_key.go | 2 + keys/test/api_tsig_test.go | 88 +++++++++++++++++++++++------------- keys/test/api_upload_test.go | 11 ++--- 4 files changed, 65 insertions(+), 37 deletions(-) diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 7aa8083..31480a8 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -13,6 +13,7 @@ package keys import ( "bytes" "context" + _ "github.com/infobloxopen/bloxone-go-client/dns_config" "io" "net/http" "net/url" diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index bb5cb3d..02efb33 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -15,6 +15,7 @@ import ( "encoding/json" "fmt" "time" + ) // checks if the KeysTSIGKey type satisfies the MappedNullable interface at compile time @@ -40,6 +41,7 @@ type KeysTSIGKey struct { Tags map[string]interface{} `json:"tags,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` + res interface{} } type _KeysTSIGKey KeysTSIGKey diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index c11a32a..31eee82 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -7,54 +7,76 @@ Testing TsigAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( "context" - "testing" - + "github.com/infobloxopen/bloxone-go-client/client" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "net/http" + "strings" + "testing" ) func Test_keys_TsigAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + rq := require.New(t) + c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) + rq.NoError(err) + apiClient := c.KeysAPI + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Comment: nil, // or use: String("This is a comment") + CreatedAt: nil, // or use: Time(time.Now()) + Id: nil, //openapiclient.PtrString("123"), + Name: "dummyKey36", + ProtocolName: nil, // or use: String("protocolName") + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + Tags: nil, //make(map[string]interface{}), + UpdatedAt: nil, // or use: Time(time.Now()) + } + var createResp *openapiclient.KeysCreateTSIGKeyResponse // replace with the actual type of resp + var httpRes *http.Response t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Execute() + //t.Skip("skip test") // remove to run test + ctx := context.Background() + req := apiClient.TsigAPI.TsigCreate(ctx) + req = req.Body(dummyKey) + createResp, httpRes, err = req.Execute() require.Nil(t, err) - require.NotNil(t, resp) + require.NotNil(t, createResp) assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string + t.Run("Test TsigAPIService TsigList", func(t *testing.T) { - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() + //t.Skip("skip test") // remove to run test + req := apiClient.TsigAPI.TsigList(context.Background()).Fields("name") + resp, httpRes, err := req.Execute() require.Nil(t, err) + require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigList", func(t *testing.T) { + t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.TsigAPI.TsigList(context.Background()).Execute() + var id string + id = *createResp.GetResult().Id + lastSlash := strings.LastIndex(id, "/") + uuid := string(id[lastSlash+1:]) + + req := apiClient.TsigAPI.TsigRead(context.Background(), uuid) + req.Fields("name") + resp, httpRes, err := req.Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -62,13 +84,17 @@ func Test_keys_TsigAPIService(t *testing.T) { }) - t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { + t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test var id string + id = *createResp.GetResult().Id + lastSlash := strings.LastIndex(id, "/") + uuid := id[lastSlash+1:] + req := apiClient.TsigAPI.TsigUpdate(context.Background(), uuid).Body(dummyKey) - resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Execute() + resp, httpRes, err := req.Execute() require.Nil(t, err) require.NotNil(t, resp) @@ -76,16 +102,16 @@ func Test_keys_TsigAPIService(t *testing.T) { }) - t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test + t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Execute() + var id = *createResp.GetResult().Id + lastSlash := strings.LastIndex(id, "/") + uuid := string(id[lastSlash+1:]) + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), uuid).Execute() require.Nil(t, err) - require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) }) diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index f2cd257..220be43 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -11,19 +11,18 @@ package keys import ( "context" + "github.com/infobloxopen/bloxone-go-client/client" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) func Test_keys_UploadAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + rq := require.New(t) + c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) + rq.NoError(err) + apiClient := c.KeysAPI t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { From 399e247d8c409943fa0ca4eea012da5146247e6b Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Tue, 13 Feb 2024 09:52:59 -0800 Subject: [PATCH 08/18] tests done, except for kerberos --- keys/.openapi-generator/FILES | 2 + keys/test/api_generate_tsig_test.go | 62 ++++++-- keys/test/api_kerberos_test.go | 206 ++++++++++++++++++++----- keys/test/api_tsig_test.go | 231 ++++++++++++++++++---------- keys/test/api_upload_test.go | 68 ++++++-- 5 files changed, 417 insertions(+), 152 deletions(-) diff --git a/keys/.openapi-generator/FILES b/keys/.openapi-generator/FILES index 619bfc0..a5d04a4 100644 --- a/keys/.openapi-generator/FILES +++ b/keys/.openapi-generator/FILES @@ -40,4 +40,6 @@ model_keys_update_tsig_key_response.go model_protobuf_field_mask.go model_upload_content_type.go model_upload_request.go +test/api_generate_tsig_test.go +test/api_upload_test.go utils.go diff --git a/keys/test/api_generate_tsig_test.go b/keys/test/api_generate_tsig_test.go index 3ea00f9..8f29e45 100644 --- a/keys/test/api_generate_tsig_test.go +++ b/keys/test/api_generate_tsig_test.go @@ -7,34 +7,62 @@ Testing GenerateTsigAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" + "encoding/json" "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -func Test_keys_GenerateTsigAPIService(t *testing.T) { +//type RoundTripFunc func(req *http.Request) *http.Response +// +//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { +// return f(req), nil +//} +// +//func NewTestClient(fn RoundTripFunc) *http.Client { +// return &http.Client{ +// Transport: RoundTripFunc(fn), +// } +//} +func Test_keys_GenerateTsigAPIService(t *testing.T) { configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test GenerateTsigAPIService GenerateTsigGenerateTSIG", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + dummyKey := openapiclient.KeysGenerateTSIGResult{ + Secret: openapiclient.PtrString("XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc="), + } + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/generate_tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + require.Equal(t, "hmac_sha256", req.URL.Query().Get("algorithm")) + response := openapiclient.KeysGenerateTSIGResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } }) - + apiClient := openapiclient.NewAPIClient(configuration) + request := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm("hmac_sha256") + response, httpRes, err := request.Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) + require.NotNil(t, response) + require.Equal(t, "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", *response.Result.Secret) } diff --git a/keys/test/api_kerberos_test.go b/keys/test/api_kerberos_test.go index 21283c8..6b54d87 100644 --- a/keys/test/api_kerberos_test.go +++ b/keys/test/api_kerberos_test.go @@ -7,75 +7,201 @@ Testing KerberosAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" + "encoding/json" "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -func Test_keys_KerberosAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { +//type RoundTripFunc func(req *http.Request) *http.Response +// +//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { +// return f(req), nil +//} +// +//func NewTestClient(fn RoundTripFunc) *http.Client { +// return &http.Client{ +// Transport: RoundTripFunc(fn), +// } +//} - t.Skip("skip test") // remove to run test +func Test_keys_KerberosAPIService(t *testing.T) { - var id string + t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { - httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() + t.Skip("skip test") + + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysReadKerberosKeyResponse{ + Result: &openapiclient.KerberosKey{ + Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), + Comment: openapiclient.PtrString("Test Kerberos Key"), + Id: nil, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), "dummyKey").Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test KerberosAPIService KerberosList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + t.Run("Test KerberosAPIService KerberosKeyList", func(t *testing.T) { + + t.Skip("skip test") + + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysListKerberosKeyResponse{ + Results: []openapiclient.KerberosKey{ + { + Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), + Comment: openapiclient.PtrString("Test Kerberos Key"), + Id: nil, + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.KerberosAPI.KerberosList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.NotEmpty(t, resp.Results) }) - t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Execute() + t.Run("Test KerberosAPIService KerberosUpdate", func(t *testing.T) { + t.Skip("skip test") + + dummyKey := openapiclient.KerberosKey{ + Algorithm: openapiclient.PtrString("RFC 3961"), + Comment: openapiclient.PtrString("Test Update Kerberos Key"), + Id: nil, + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KerberosKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysUpdateKerberosKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + updateRequest := apiClient.KerberosAPI.KerberosUpdate(context.Background(), "dummyKey").Body(dummyKey) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test KerberosAPIService KerberosUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Execute() - + t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { + + t.Skip("skip test") + + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysUpdateTSIGKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 200, httpRes.StatusCode) + }) + t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { + t.Skip("skip test") + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey36", req.URL.Path) + return &http.Response{ + StatusCode: 204, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: make(http.Header), + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), "dummyKey36").Execute() + require.Nil(t, err) + require.Equal(t, 204, httpRes.StatusCode) }) } diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index 31eee82..27e02c0 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -1,119 +1,182 @@ -/* -DDI Keys API - -Testing TsigAPIService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package keys_test import ( + "bytes" "context" - "github.com/infobloxopen/bloxone-go-client/client" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "io" "net/http" - "strings" "testing" ) -func Test_keys_TsigAPIService(t *testing.T) { - rq := require.New(t) - c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) - rq.NoError(err) - apiClient := c.KeysAPI - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Comment: nil, // or use: String("This is a comment") - CreatedAt: nil, // or use: Time(time.Now()) - Id: nil, //openapiclient.PtrString("123"), - Name: "dummyKey36", - ProtocolName: nil, // or use: String("protocolName") - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - Tags: nil, //make(map[string]interface{}), - UpdatedAt: nil, // or use: Time(time.Now()) - } - var createResp *openapiclient.KeysCreateTSIGKeyResponse // replace with the actual type of resp - var httpRes *http.Response +type RoundTripFunc func(req *http.Request) *http.Response - t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} - //t.Skip("skip test") // remove to run test +func NewTestClient(fn RoundTripFunc) *http.Client { + return &http.Client{ + Transport: RoundTripFunc(fn), + } +} - ctx := context.Background() - req := apiClient.TsigAPI.TsigCreate(ctx) - req = req.Body(dummyKey) - createResp, httpRes, err = req.Execute() +func Test_keys_TsigAPIService(t *testing.T) { + t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysCreateTSIGKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(dummyKey).Execute() require.Nil(t, err) - require.NotNil(t, createResp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigList", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - req := apiClient.TsigAPI.TsigList(context.Background()).Fields("name") - resp, httpRes, err := req.Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysListTSIGKeyResponse{ + Results: []openapiclient.KeysTSIGKey{ + { + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.TsigAPI.TsigList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.NotEmpty(t, resp.Results) }) t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - var id string - id = *createResp.GetResult().Id - lastSlash := strings.LastIndex(id, "/") - uuid := string(id[lastSlash+1:]) - - req := apiClient.TsigAPI.TsigRead(context.Background(), uuid) - req.Fields("name") - resp, httpRes, err := req.Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysListTSIGKeyResponse{ + Results: []openapiclient.KeysTSIGKey{ + { + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), "dummyKey36").Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - var id string - id = *createResp.GetResult().Id - lastSlash := strings.LastIndex(id, "/") - uuid := id[lastSlash+1:] - req := apiClient.TsigAPI.TsigUpdate(context.Background(), uuid).Body(dummyKey) - - resp, httpRes, err := req.Execute() - + dummyKey := openapiclient.KeysTSIGKey{ + Algorithm: openapiclient.PtrString("hmac_sha256"), + Name: "dummyKey36", + Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", + } + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyKey, reqBody) + + response := openapiclient.KeysUpdateTSIGKeyResponse{ + Result: &dummyKey, + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - var id = *createResp.GetResult().Id - lastSlash := strings.LastIndex(id, "/") - uuid := string(id[lastSlash+1:]) - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), uuid).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + return &http.Response{ + StatusCode: 204, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: make(http.Header), + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), "dummyKey36").Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 204, httpRes.StatusCode) }) - } diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index 220be43..65676c8 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -7,33 +7,79 @@ Testing UploadAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package keys +package keys_test import ( + "bytes" "context" - "github.com/infobloxopen/bloxone-go-client/client" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) func Test_keys_UploadAPIService(t *testing.T) { - rq := require.New(t) - c, err := client.NewAPIClient(client.Configuration{ClientName: "test"}) - rq.NoError(err) - apiClient := c.KeysAPI t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { + // Assuming that UploadRequest is the request body type for the UploadUpload API + dummyRequest := openapiclient.UploadRequest{ + Comment: openapiclient.PtrString("This is a test upload"), + Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 + //Fields: &openapiclient.ProtobufFieldMask{}, // Fill this as per your requirements + //Tags: map[string]interface{}{ + // "tag1": "value1", + // "tag2": "value2", + //}, + Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type + } - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/keys/upload", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + var reqBody openapiclient.UploadRequest + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyRequest, reqBody) - resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Execute() + response := openapiclient.DdiuploadResponse{ + KerberosKeys: &openapiclient.KerberosKeys{ + Items: []openapiclient.KerberosKey{ + { + Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), + Comment: openapiclient.PtrString("This is a test Kerberos key"), + Domain: openapiclient.PtrString("example.com"), + Id: openapiclient.PtrString("123"), + //Principal: openapiclient.PtrString("test_principal"), + //Tags: map[string]interface{}{"tag1": "value1", "tag2": "value2"}, + //UploadedAt: openapiclient.PtrString("2022-01-01T00:00:00Z"), + //Version: openapiclient.PtrInt64(1), + }, + }, + }, + Warning: openapiclient.PtrString("This is a test warning"), + } + body, err := json.Marshal(response) + require.NoError(t, err) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{ + "Content-Type": {"application/json"}, + }, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(dummyRequest).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) }) } From 15c510d6619383ead9fa49a765db42e63a3fa22f Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 15 Feb 2024 09:41:49 -0800 Subject: [PATCH 09/18] keys done, dns waiting --- dns_config/test/api_acl_test.go | 237 +++++++++++++--- dns_config/test/api_auth_nsg_test.go | 228 +++++++++++++--- dns_config/test/api_auth_zone_test.go | 255 ++++++++++++++---- dns_config/test/api_cache_flush_test.go | 59 ++-- .../test/api_convert_domain_name_test.go | 61 +++-- dns_config/test/api_convert_rname_test.go | 54 +++- dns_config/test/api_host_test.go | 144 ++++++++-- 7 files changed, 840 insertions(+), 198 deletions(-) diff --git a/dns_config/test/api_acl_test.go b/dns_config/test/api_acl_test.go index 46d107e..847e155 100644 --- a/dns_config/test/api_acl_test.go +++ b/dns_config/test/api_acl_test.go @@ -7,87 +7,244 @@ Testing AclAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" "testing" +) - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" +type RoundTripFunc func(req *http.Request) *http.Response - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" -) +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} -func Test_dns_config_AclAPIService(t *testing.T) { +func NewTestClient(fn RoundTripFunc) *http.Client { + return &http.Client{ + Transport: RoundTripFunc(fn), + } +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_AclAPIService(t *testing.T) { t.Run("Test AclAPIService AclCreate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AclAPI.AclCreate(context.Background()).Execute() + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - }) + var reqBody dns_config.ConfigACL + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyAcl, reqBody) - t.Run("Test AclAPIService AclDelete", func(t *testing.T) { + response := dns_config.ConfigCreateACLResponse{ + Result: &dummyAcl, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Skip("skip test") // remove to run test + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - var id string + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - httpRes, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + resp, httpRes, err := aclAPI.AclAPI.AclCreate(ctx).Body(dummyAcl).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) }) - t.Run("Test AclAPIService AclList", func(t *testing.T) { + t.Run("Test AclAPIService AclRead", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AclAPI.AclList(context.Background()).Execute() + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) - }) - - t.Run("Test AclAPIService AclRead", func(t *testing.T) { + response := dns_config.ConfigReadACLResponse{ + Result: &dummyAcl, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Skip("skip test") // remove to run test + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - var id string + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AclAPI.AclRead(context.Background(), id).Execute() + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + readRequest := aclAPI.AclAPI.AclRead(ctx, *dummyAcl.Id) + resp, httpRes, err := aclAPI.AclAPI.AclReadExecute(readRequest) require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAcl, *resp.Result) + }) + + t.Run("Test AclAPIService AclList", func(t *testing.T) { + //t.Skip("skip test") // remove to run test + + dummyAclList := []dns_config.ConfigACL{ + { + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId1"), + Name: "dummyAclName1", + }, + { + Comment: openapiclient.PtrString("This is another dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId2"), + Name: "dummyAclName2", + }, + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + + response := dns_config.ConfigListACLResponse{ + Results: dummyAclList, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + resp, httpRes, err := aclAPI.AclAPI.AclList(ctx).Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAclList, resp.Results) }) t.Run("Test AclAPIService AclUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test + + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } + + updatedAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), + Id: dummyAcl.Id, + Name: "updatedDummyAclName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + + response := dns_config.ConfigUpdateACLResponse{ + Result: &updatedAcl, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + updateRequest := aclAPI.AclAPI.AclUpdate(ctx, *dummyAcl.Id).Body(updatedAcl) + resp, httpRes, err := updateRequest.Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, updatedAcl, *resp.Result) + }) - var id string + t.Run("Test AclAPIService AclDelete", func(t *testing.T) { - resp, httpRes, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Execute() + //t.Skip("skip test") // remove to run test - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + dummyAcl := dns_config.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + aclAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + httpRes, err := aclAPI.AclAPI.AclDelete(ctx, *dummyAcl.Id).Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_nsg_test.go b/dns_config/test/api_auth_nsg_test.go index 365aee3..97027a0 100644 --- a/dns_config/test/api_auth_nsg_test.go +++ b/dns_config/test/api_auth_nsg_test.go @@ -1,93 +1,237 @@ /* DNS Configuration API -Testing AuthNsgAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_AuthNsgAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + t.Run("Test AuthNesAPIService AuthNesCreate", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), + Id: openapiclient.PtrString("dummyAuthNesId"), + Name: "dummyAuthNesName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) - t.Run("Test AuthNsgAPIService AuthNsgCreate", func(t *testing.T) { + response := dns_config.ConfigCreateAuthNSGResponse{ + Result: &dummyAuthNsg, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Skip("skip test") // remove to run test + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authNesAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + createRequest := authNesAPI.AuthNsgAPI.AuthNsgCreate(ctx).Body(dummyAuthNsg) + resp, httpRes, err := createRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthNsg, *resp.Result) }) - t.Run("Test AuthNsgAPIService AuthNsgDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test + t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test - httpRes, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId"), + Name: "dummyAuthNsgName", + } - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) - }) + response := dns_config.ConfigReadAuthNSGResponse{ + Result: &dummyAuthNsg, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Execute() + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + readRequest := authNsgAPI.AuthNsgAPI.AuthNsgRead(ctx, *dummyAuthNsg.Id) + resp, httpRes, err := readRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthNsg, *resp.Result) }) - t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test + t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test + + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId"), + Name: "dummyAuthNsgName", + } + + updatedAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), + Id: dummyAuthNsg.Id, + Name: "updatedDummyAuthNsgName", + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + + response := dns_config.ConfigUpdateAuthNSGResponse{ + Result: &updatedAuthNsg, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + updateRequest := authNsgAPI.AuthNsgAPI.AuthNsgUpdate(ctx, *dummyAuthNsg.Id).Body(updatedAuthNsg) + resp, httpRes, err := updateRequest.Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, updatedAuthNsg, *resp.Result) + }) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Execute() + t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + //t.Skip("skip test") // remove to run test + + dummyAuthNsgList := []dns_config.ConfigAuthNSG{ + { + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId1"), + Name: "dummyAuthNsgName1", + }, + { + Comment: openapiclient.PtrString("This is another dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId2"), + Name: "dummyAuthNsgName2", + }, + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + + response := dns_config.ConfigListAuthNSGResponse{ + Results: dummyAuthNsgList, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + listRequest := authNsgAPI.AuthNsgAPI.AuthNsgList(ctx) + resp, httpRes, err := listRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthNsgList, resp.Results) }) - t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { + t.Run("Test AuthNsgAPIService AuthNsgDelete", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - var id string + dummyAuthNsg := dns_config.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), + Id: openapiclient.PtrString("dummyAuthNsgId"), + Name: "dummyAuthNsgName", + } - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Execute() + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authNsgAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + deleteRequest := authNsgAPI.AuthNsgAPI.AuthNsgDelete(ctx, *dummyAuthNsg.Id) + httpRes, err := deleteRequest.Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index bb3daaa..a03bc4c 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -1,105 +1,270 @@ /* DNS Configuration API -Testing AuthZoneAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_AuthZoneAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { + t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Execute() + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) - }) + response := dns_config.ConfigCreateAuthZoneResponse{ + Result: &dummyAuthZone, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { + return &http.Response{ + StatusCode: 201, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Execute() + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + createRequest := authZoneAPI.AuthZoneAPI.AuthZoneCreate(ctx).Body(dummyAuthZone) + resp, httpRes, err := createRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 201, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, *resp.Result) }) - t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { + t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigCopyAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + + dummyConfigCopyResponse := dns_config.ConfigCopyResponse{ + Description: openapiclient.PtrString("This is a copy of the dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyCopyId"), + JobId: openapiclient.PtrString("dummyJobId"), + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + //require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + + response := dns_config.ConfigCopyAuthZoneResponse{ + Result: &dummyConfigCopyResponse, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 201, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + copyRequest := authZoneAPI.AuthZoneAPI.AuthZoneCopy(ctx).Body(dummyAuthZone) + resp, httpRes, err := copyRequest.Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, 201, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, *resp.Result) + }) - t.Skip("skip test") // remove to run test + t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { - var id string + //t.Skip("skip test") // remove to run test - httpRes, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) - }) + response := dns_config.ConfigReadAuthZoneResponse{ + Result: &dummyAuthZone, + } + body, err := json.Marshal(response) + require.NoError(t, err) - t.Run("Test AuthZoneAPIService AuthZoneList", func(t *testing.T) { + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - t.Skip("skip test") // remove to run test + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Execute() + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + readRequest := authZoneAPI.AuthZoneAPI.AuthZoneRead(ctx, *dummyAuthZone.Id) + resp, httpRes, err := readRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, *resp.Result) }) - t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { + t.Run("Test AuthZoneAPIService AuthZoneList", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) - t.Skip("skip test") // remove to run test + response := dns_config.ConfigListAuthZoneResponse{ + Results: []dns_config.ConfigAuthZone{dummyAuthZone}, + } + body, err := json.Marshal(response) + require.NoError(t, err) - var id string + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + listRequest := authZoneAPI.AuthZoneAPI.AuthZoneList(ctx) + resp, httpRes, err := listRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, dummyAuthZone, resp.Results[0]) }) t.Run("Test AuthZoneAPIService AuthZoneUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + + updatedAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), + Id: dummyAuthZone.Id, + } + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + + response := dns_config.ConfigUpdateAuthZoneResponse{ + Result: &updatedAuthZone, + } + body, err := json.Marshal(response) + require.NoError(t, err) - var id string + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Execute() + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + updateRequest := authZoneAPI.AuthZoneAPI.AuthZoneUpdate(ctx, *dummyAuthZone.Id).Body(updatedAuthZone) + resp, httpRes, err := updateRequest.Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, updatedAuthZone, *resp.Result) + }) + + t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { + + //t.Skip("skip test") // remove to run test + + dummyAuthZone := dns_config.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), + } + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "DELETE", req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + authZoneAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + httpRes, err := authZoneAPI.AuthZoneAPI.AuthZoneDelete(ctx, *dummyAuthZone.Id).Execute() + require.Nil(t, err) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_cache_flush_test.go b/dns_config/test/api_cache_flush_test.go index a7ee097..7558b84 100644 --- a/dns_config/test/api_cache_flush_test.go +++ b/dns_config/test/api_cache_flush_test.go @@ -1,40 +1,65 @@ /* DNS Configuration API -Testing CacheFlushAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_CacheFlushAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test CacheFlushAPIService CacheFlushCreate", func(t *testing.T) { + // Create a dummy CacheFlush object + dummyCacheFlush := dns_config.ConfigCacheFlush{ + FlushSubdomains: openapiclient.PtrBool(true), + Fqdn: openapiclient.PtrString("dummyFqdn"), + Ophid: openapiclient.PtrString("dummyOphid"), + ServiceId: openapiclient.PtrString("dummyServiceId"), + Ttl: openapiclient.PtrInt64(120), + ViewName: openapiclient.PtrString("dummyViewName"), + } - t.Skip("skip test") // remove to run test + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "POST", req.Method) + require.Equal(t, "/api/ddi/v1/dns/cache_flush", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - resp, httpRes, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Execute() + var reqBody dns_config.ConfigCacheFlush + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dummyCacheFlush, reqBody) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) - }) + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + cacheFlushAPI := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + _, httpRes, err := cacheFlushAPI.CacheFlushAPI.CacheFlushCreate(ctx).Body(dummyCacheFlush).Execute() + require.Nil(t, err) + //require.NotNil(t, resp) + require.Equal(t, 200, httpRes.StatusCode) + }) } diff --git a/dns_config/test/api_convert_domain_name_test.go b/dns_config/test/api_convert_domain_name_test.go index 108d68d..4d3b7ec 100644 --- a/dns_config/test/api_convert_domain_name_test.go +++ b/dns_config/test/api_convert_domain_name_test.go @@ -1,42 +1,63 @@ /* DNS Configuration API -Testing ConvertDomainNameAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" + "github.com/stretchr/testify/require" + "io" + "net/http" + "testing" ) func Test_dns_config_ConvertDomainNameAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test ConvertDomainNameAPIService ConvertDomainNameConvert", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var domainName string - - resp, httpRes, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() - + // Create a dummy domain name + dummyDomainName := "example.com" + + testClient := NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/convert_domain_name/"+dummyDomainName, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := dns_config.ConfigConvertDomainName{ + Idn: openapiclient.PtrString("example.com"), + Punycode: openapiclient.PtrString("xn--example-2ya.com"), + } + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + + convertDomain := dns_config.NewAPIClient(configuration) + ctx := context.Background() + + resp, httpRes, err := convertDomain.ConvertDomainNameAPI.ConvertDomainNameConvert(ctx, dummyDomainName).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Nil(t, resp.Result) + require.Equal(t, 200, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_convert_rname_test.go b/dns_config/test/api_convert_rname_test.go index 23ddedf..7f166c6 100644 --- a/dns_config/test/api_convert_rname_test.go +++ b/dns_config/test/api_convert_rname_test.go @@ -1,41 +1,69 @@ /* DNS Configuration API -Testing ConvertRnameAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" + "io" + "net/http" + "testing" ) func Test_dns_config_ConvertRnameAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test ConvertRnameAPIService ConvertRnameConvertRName", func(t *testing.T) { - t.Skip("skip test") // remove to run test + // Define a dummy email address + emailAddress := "test@example.com" + + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/convert_rname/"+emailAddress, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigConvertRNameResponse{ + Rname: openapiclient.PtrString("test.example.com."), + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient - var emailAddress string + convertRename := dns_config.NewAPIClient(configuration) + ctx := context.Background() - resp, httpRes, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() + resp, httpRes, err := convertRename.ConvertRnameAPI.ConvertRnameConvertRName(ctx, emailAddress).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "test.example.com.", *resp.Rname) }) diff --git a/dns_config/test/api_host_test.go b/dns_config/test/api_host_test.go index 8965b8e..2950634 100644 --- a/dns_config/test/api_host_test.go +++ b/dns_config/test/api_host_test.go @@ -1,67 +1,169 @@ /* DNS Configuration API -Testing HostAPIService +Testing AclAPIService */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" - "testing" - + "encoding/json" + "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" + "io" + "net/http" + "testing" ) func Test_dns_config_HostAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test HostAPIService HostList", func(t *testing.T) { - t.Skip("skip test") // remove to run test - + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/host", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigListHostResponse{ + Results: []dns_config.ConfigHost{ + { + Id: openapiclient.PtrString("host1"), + AbsoluteName: openapiclient.PtrString("host1.example.com"), + }, + { + Id: openapiclient.PtrString("host2"), + AbsoluteName: openapiclient.PtrString("host2.example.com"), + }, + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + // Create a new API client with the mock HTTP client + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + apiClient := dns_config.NewAPIClient(configuration) + + // Call the method and check the response resp, httpRes, err := apiClient.HostAPI.HostList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "host1", *resp.Results[0].Id) + assert.Equal(t, "host1.example.com", *resp.Results[0].AbsoluteName) + assert.Equal(t, "host2", *resp.Results[1].Id) + assert.Equal(t, "host2.example.com", *resp.Results[1].AbsoluteName) }) t.Run("Test HostAPIService HostRead", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "GET", req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigReadHostResponse{ + Result: &dns_config.ConfigHost{ + Id: openapiclient.PtrString("host1"), + AbsoluteName: openapiclient.PtrString("host1.example.com"), + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + // Create a new API client with the mock HTTP client + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + apiClient := dns_config.NewAPIClient(configuration) + + // Call the method and check the response + id := "host1" resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), id).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "host1", *resp.Result.Id) + assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) }) t.Run("Test HostAPIService HostUpdate", func(t *testing.T) { - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Execute() + // Create a mock HTTP client + testClient := NewTestClient(func(req *http.Request) *http.Response { + // Check the request parameters + require.Equal(t, "PATCH", req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + // Create a dummy response + response := dns_config.ConfigReadHostResponse{ + Result: &dns_config.ConfigHost{ + Id: openapiclient.PtrString("host1"), + AbsoluteName: openapiclient.PtrString("host1.example.com"), + }, + } + body, err := json.Marshal(response) + require.NoError(t, err) + + // Return the dummy response + return &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + // Create a new API client with the mock HTTP client + configuration := internal.NewConfiguration() + configuration.HTTPClient = testClient + apiClient := dns_config.NewAPIClient(configuration) + + // Call the method and check the response + id := "host1" + hostUpdateInput := dns_config.ConfigHost{ + AbsoluteName: openapiclient.PtrString("host1.example.com"), + } + resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(hostUpdateInput).Execute() require.Nil(t, err) require.NotNil(t, resp) assert.Equal(t, 200, httpRes.StatusCode) + assert.Equal(t, "host1", *resp.Result.Id) + assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) }) From e54dc656b637144f4bf31d6ae5c7ea4eed90a6c9 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Sun, 25 Feb 2024 20:43:11 -0800 Subject: [PATCH 10/18] Complete unit tests for dns_data, dns_config, and keys modules --- dns_config/.openapi-generator-ignore | 3 + dns_config/.openapi-generator/FILES | 126 -------- dns_config/test/api_acl_test.go | 220 +++++--------- dns_config/test/api_auth_nsg_test.go | 224 +++++---------- dns_config/test/api_auth_zone_test.go | 269 +++++++----------- dns_config/test/api_cache_flush_test.go | 55 ++-- .../test/api_convert_domain_name_test.go | 43 ++- dns_config/test/api_convert_rname_test.go | 48 ++-- dns_config/test/api_delegation_test.go | 176 ++++++++---- dns_config/test/api_forward_nsg_test.go | 170 ++++++++--- dns_config/test/api_forward_zone_test.go | 236 +++++++++++---- dns_config/test/api_global_test.go | 131 ++++++--- dns_config/test/api_host_test.go | 140 +++------ dns_config/test/api_lbdn_test.go | 154 +++++++--- dns_config/test/api_server_test.go | 154 +++++++--- dns_config/test/api_view_test.go | 193 +++++++++---- dns_data/.openapi-generator/FILES | 1 + dns_data/api_record.go | 256 ++++++++--------- dns_data/model_data_create_record_response.go | 6 +- dns_data/model_data_list_record_response.go | 6 +- dns_data/model_data_read_record_response.go | 6 +- dns_data/model_data_record_inheritance.go | 6 +- ...model_data_soa_serial_increment_request.go | 6 +- ...odel_data_soa_serial_increment_response.go | 6 +- dns_data/model_data_update_record_response.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_data/model_protobuf_field_mask.go | 6 +- dns_data/test/api_record_test.go | 189 ++++++++---- internal/utils.go | 14 + keys/.openapi-generator/FILES | 1 - keys/api_generate_tsig.go | 34 +-- keys/api_tsig.go | 206 +++++++------- keys/api_upload.go | 34 +-- keys/client.go | 14 +- keys/model_ddiupload_response.go | 6 +- keys/model_kerberos_key.go | 6 +- keys/model_kerberos_keys.go | 6 +- keys/model_keys_create_tsig_key_response.go | 6 +- keys/model_keys_generate_tsig_response.go | 6 +- keys/model_keys_generate_tsig_result.go | 6 +- keys/model_keys_list_kerberos_key_response.go | 6 +- keys/model_keys_list_tsig_key_response.go | 6 +- keys/model_keys_read_kerberos_key_response.go | 6 +- keys/model_keys_read_tsig_key_response.go | 6 +- ...model_keys_update_kerberos_key_response.go | 6 +- keys/model_keys_update_tsig_key_response.go | 6 +- keys/model_protobuf_field_mask.go | 6 +- keys/model_upload_content_type.go | 5 +- keys/test/api_generate_tsig_test.go | 66 ++--- keys/test/api_kerberos_test.go | 188 +++++------- keys/test/api_tsig_test.go | 175 +++++------- keys/test/api_upload_test.go | 57 ++-- keys/utils.go | 2 +- 53 files changed, 1919 insertions(+), 1797 deletions(-) diff --git a/dns_config/.openapi-generator-ignore b/dns_config/.openapi-generator-ignore index 7484ee5..9d89018 100644 --- a/dns_config/.openapi-generator-ignore +++ b/dns_config/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +*.go +*.md +!api*test.go diff --git a/dns_config/.openapi-generator/FILES b/dns_config/.openapi-generator/FILES index c1b1372..4279035 100644 --- a/dns_config/.openapi-generator/FILES +++ b/dns_config/.openapi-generator/FILES @@ -1,19 +1,3 @@ -README.md -api_acl.go -api_auth_nsg.go -api_auth_zone.go -api_cache_flush.go -api_convert_domain_name.go -api_convert_rname.go -api_delegation.go -api_forward_nsg.go -api_forward_zone.go -api_global.go -api_host.go -api_lbdn.go -api_server.go -api_view.go -client.go docs/AclAPI.md docs/AuthNsgAPI.md docs/AuthZoneAPI.md @@ -137,113 +121,3 @@ docs/Inheritance2InheritedUInt32.md docs/LbdnAPI.md docs/ServerAPI.md docs/ViewAPI.md -model_auth_zone_external_provider.go -model_config_acl.go -model_config_acl_item.go -model_config_auth_nsg.go -model_config_auth_zone.go -model_config_auth_zone_config.go -model_config_auth_zone_inheritance.go -model_config_bulk_copy_error.go -model_config_bulk_copy_response.go -model_config_bulk_copy_view.go -model_config_cache_flush.go -model_config_convert_domain_name.go -model_config_convert_domain_name_response.go -model_config_convert_r_name_response.go -model_config_copy_auth_zone.go -model_config_copy_auth_zone_response.go -model_config_copy_forward_zone.go -model_config_copy_forward_zone_response.go -model_config_copy_response.go -model_config_create_acl_response.go -model_config_create_auth_nsg_response.go -model_config_create_auth_zone_response.go -model_config_create_delegation_response.go -model_config_create_forward_nsg_response.go -model_config_create_forward_zone_response.go -model_config_create_lbdn_response.go -model_config_create_server_response.go -model_config_create_view_response.go -model_config_custom_root_ns_block.go -model_config_delegation.go -model_config_delegation_server.go -model_config_display_view.go -model_config_dnssec_validation_block.go -model_config_dtc_config.go -model_config_dtc_policy.go -model_config_ecs_block.go -model_config_ecs_zone.go -model_config_external_primary.go -model_config_external_secondary.go -model_config_forward_nsg.go -model_config_forward_zone.go -model_config_forward_zone_config.go -model_config_forwarder.go -model_config_forwarders_block.go -model_config_global.go -model_config_host.go -model_config_host_associated_server.go -model_config_host_inheritance.go -model_config_inherited_acl_items.go -model_config_inherited_custom_root_ns_block.go -model_config_inherited_dnssec_validation_block.go -model_config_inherited_dtc_config.go -model_config_inherited_ecs_block.go -model_config_inherited_forwarders_block.go -model_config_inherited_kerberos_keys.go -model_config_inherited_sort_list_items.go -model_config_inherited_zone_authority.go -model_config_inherited_zone_authority_m_name_block.go -model_config_internal_secondary.go -model_config_kerberos_key.go -model_config_lbdn.go -model_config_list_acl_response.go -model_config_list_auth_nsg_response.go -model_config_list_auth_zone_response.go -model_config_list_delegation_response.go -model_config_list_forward_nsg_response.go -model_config_list_forward_zone_response.go -model_config_list_host_response.go -model_config_list_lbdn_response.go -model_config_list_server_response.go -model_config_list_view_response.go -model_config_read_acl_response.go -model_config_read_auth_nsg_response.go -model_config_read_auth_zone_response.go -model_config_read_delegation_response.go -model_config_read_forward_nsg_response.go -model_config_read_forward_zone_response.go -model_config_read_global_response.go -model_config_read_host_response.go -model_config_read_lbdn_response.go -model_config_read_server_response.go -model_config_read_view_response.go -model_config_root_ns.go -model_config_server.go -model_config_server_inheritance.go -model_config_sort_list_item.go -model_config_trust_anchor.go -model_config_tsig_key.go -model_config_ttl_inheritance.go -model_config_update_acl_response.go -model_config_update_auth_nsg_response.go -model_config_update_auth_zone_response.go -model_config_update_delegation_response.go -model_config_update_forward_nsg_response.go -model_config_update_forward_zone_response.go -model_config_update_global_response.go -model_config_update_host_response.go -model_config_update_lbdn_response.go -model_config_update_server_response.go -model_config_update_view_response.go -model_config_view.go -model_config_view_inheritance.go -model_config_warning.go -model_config_zone_authority.go -model_config_zone_authority_m_name_block.go -model_inheritance2_assigned_host.go -model_inheritance2_inherited_bool.go -model_inheritance2_inherited_string.go -model_inheritance2_inherited_u_int32.go -utils.go diff --git a/dns_config/test/api_acl_test.go b/dns_config/test/api_acl_test.go index 847e155..1ff4711 100644 --- a/dns_config/test/api_acl_test.go +++ b/dns_config/test/api_acl_test.go @@ -13,238 +13,150 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -type RoundTripFunc func(req *http.Request) *http.Response + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" +) -func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { - return f(req), nil +var dns_config_Post = openapiclient.ConfigACL{ + Comment: openapiclient.PtrString("This is a dummy ACL for testing."), + Id: openapiclient.PtrString("dummyAclId"), + Name: "dummyAclName", } -func NewTestClient(fn RoundTripFunc) *http.Client { - return &http.Client{ - Transport: RoundTripFunc(fn), - } +var dns_config_Patch = openapiclient.ConfigACL{ + Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), + Id: dns_config_Post.Id, + Name: "updatedDummyAclName", } func Test_dns_config_AclAPIService(t *testing.T) { t.Run("Test AclAPIService AclCreate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) - var reqBody dns_config.ConfigACL + var reqBody openapiclient.ConfigACL require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyAcl, reqBody) + require.Equal(t, dns_config_Post, reqBody) - response := dns_config.ConfigCreateACLResponse{ - Result: &dummyAcl, - } + response := openapiclient.ConfigCreateACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := aclAPI.AclAPI.AclCreate(ctx).Body(dummyAcl).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclCreate(context.Background()).Body(dns_config_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AclAPIService AclRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + t.Run("Test AclAPIService AclList", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigReadACLResponse{ - Result: &dummyAcl, - } + response := openapiclient.ConfigListACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - readRequest := aclAPI.AclAPI.AclRead(ctx, *dummyAcl.Id) - resp, httpRes, err := aclAPI.AclAPI.AclReadExecute(readRequest) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAcl, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AclAPIService AclList", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAclList := []dns_config.ConfigACL{ - { - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId1"), - Name: "dummyAclName1", - }, - { - Comment: openapiclient.PtrString("This is another dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId2"), - Name: "dummyAclName2", - }, - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl", req.URL.Path) + t.Run("Test AclAPIService AclRead", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigListACLResponse{ - Results: dummyAclList, - } + response := openapiclient.ConfigReadACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := aclAPI.AclAPI.AclList(ctx).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclRead(context.Background(), *dns_config_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAclList, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AclAPIService AclUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - updatedAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), - Id: dummyAcl.Id, - Name: "updatedDummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + var reqBody openapiclient.ConfigACL + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, dns_config_Patch, reqBody) - response := dns_config.ConfigUpdateACLResponse{ - Result: &updatedAcl, - } + response := openapiclient.ConfigUpdateACLResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - updateRequest := aclAPI.AclAPI.AclUpdate(ctx, *dummyAcl.Id).Body(updatedAcl) - resp, httpRes, err := updateRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AclAPI.AclUpdate(context.Background(), *dns_config_Patch.Id).Body(dns_config_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, updatedAcl, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AclAPIService AclDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAcl := dns_config.ConfigACL{ - Comment: openapiclient.PtrString("This is a dummy ACL for testing."), - Id: openapiclient.PtrString("dummyAclId"), - Name: "dummyAclName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dummyAcl.Id, req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - aclAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - httpRes, err := aclAPI.AclAPI.AclDelete(ctx, *dummyAcl.Id).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AclAPI.AclDelete(context.Background(), *dns_config_Post.Id).Execute() require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_nsg_test.go b/dns_config/test/api_auth_nsg_test.go index 97027a0..621306d 100644 --- a/dns_config/test/api_auth_nsg_test.go +++ b/dns_config/test/api_auth_nsg_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing AuthNsgAPIService */ @@ -13,225 +13,149 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -func Test_dns_config_AuthNsgAPIService(t *testing.T) { + "github.com/stretchr/testify/require" - t.Run("Test AuthNesAPIService AuthNesCreate", func(t *testing.T) { + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" +) - //t.Skip("skip test") // remove to run test +var ConfigAuthNSG_Post = openapiclient.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), + Id: openapiclient.PtrString("dummyAuthNesId"), + Name: "dummyAuthNesName", +} +var ConfigAuthNSG_Patch = openapiclient.ConfigAuthNSG{ + Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), + Id: ConfigAuthNSG_Post.Id, + Name: "updatedDummyAuthNsgName", +} - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), - Id: openapiclient.PtrString("dummyAuthNesId"), - Name: "dummyAuthNesName", - } +func Test_dns_config_AuthNsgAPIService(t *testing.T) { - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + t.Run("Test AuthNsgAPIService AuthNsgCreate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - response := dns_config.ConfigCreateAuthNSGResponse{ - Result: &dummyAuthNsg, - } + var reqBody openapiclient.ConfigAuthNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthNSG_Post, reqBody) + + response := openapiclient.ConfigCreateAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNesAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - createRequest := authNesAPI.AuthNsgAPI.AuthNsgCreate(ctx).Body(dummyAuthNsg) - resp, httpRes, err := createRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(ConfigAuthNSG_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthNsg, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId"), - Name: "dummyAuthNsgName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigReadAuthNSGResponse{ - Result: &dummyAuthNsg, - } + response := openapiclient.ConfigListAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - readRequest := authNsgAPI.AuthNsgAPI.AuthNsgRead(ctx, *dummyAuthNsg.Id) - resp, httpRes, err := readRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthNsg, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId"), - Name: "dummyAuthNsgName", - } - - updatedAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), - Id: dummyAuthNsg.Id, - Name: "updatedDummyAuthNsgName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + t.Run("Test AuthNsgAPIService AuthNsgRead", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigUpdateAuthNSGResponse{ - Result: &updatedAuthNsg, - } + response := openapiclient.ConfigReadAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - updateRequest := authNsgAPI.AuthNsgAPI.AuthNsgUpdate(ctx, *dummyAuthNsg.Id).Body(updatedAuthNsg) - resp, httpRes, err := updateRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), *ConfigAuthNSG_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, updatedAuthNsg, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthNsgAPIService AuthNsgList", func(t *testing.T) { + t.Run("Test AuthNsgAPIService AuthNsgUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - //t.Skip("skip test") // remove to run test - - dummyAuthNsgList := []dns_config.ConfigAuthNSG{ - { - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId1"), - Name: "dummyAuthNsgName1", - }, - { - Comment: openapiclient.PtrString("This is another dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId2"), - Name: "dummyAuthNsgName2", - }, - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg", req.URL.Path) + var reqBody openapiclient.ConfigAuthNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthNSG_Patch, reqBody) - response := dns_config.ConfigListAuthNSGResponse{ - Results: dummyAuthNsgList, - } + response := openapiclient.ConfigUpdateAuthNSGResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - listRequest := authNsgAPI.AuthNsgAPI.AuthNsgList(ctx) - resp, httpRes, err := listRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), *ConfigAuthNSG_Patch.Id).Body(ConfigAuthNSG_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthNsgList, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AuthNsgAPIService AuthNsgDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthNsg := dns_config.ConfigAuthNSG{ - Comment: openapiclient.PtrString("This is a dummy AuthNsg for testing."), - Id: openapiclient.PtrString("dummyAuthNsgId"), - Name: "dummyAuthNsgName", - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*dummyAuthNsg.Id, req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authNsgAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - deleteRequest := authNsgAPI.AuthNsgAPI.AuthNsgDelete(ctx, *dummyAuthNsg.Id) - httpRes, err := deleteRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), *ConfigAuthNSG_Post.Id).Execute() require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index a03bc4c..5c83e21 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing AuthZoneAPIService */ @@ -13,258 +13,179 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -func Test_dns_config_AuthZoneAPIService(t *testing.T) { + "github.com/stretchr/testify/require" - t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" +) + +var ConfigCopyAuthZone_Post = openapiclient.ConfigCopyAuthZone{ + Comment: openapiclient.PtrString("This is a copyping AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), +} +var ConfigAuthZone_Post = openapiclient.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), + Id: openapiclient.PtrString("dummyAuthZoneId"), +} +var ConfigAuthZone_Patch = openapiclient.ConfigAuthZone{ + Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), + Id: ConfigAuthZone_Post.Id, +} - //t.Skip("skip test") // remove to run test +func Test_dns_config_AuthZoneAPIService(t *testing.T) { - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } + t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) + var reqBody openapiclient.ConfigCopyAuthZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigCopyAuthZone_Post, reqBody) - response := dns_config.ConfigCreateAuthZoneResponse{ - Result: &dummyAuthZone, - } + response := openapiclient.ConfigCopyAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 201, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - createRequest := authZoneAPI.AuthZoneAPI.AuthZoneCreate(ctx).Body(dummyAuthZone) - resp, httpRes, err := createRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(ConfigCopyAuthZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 201, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigCopyAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - dummyConfigCopyResponse := dns_config.ConfigCopyResponse{ - Description: openapiclient.PtrString("This is a copy of the dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyCopyId"), - JobId: openapiclient.PtrString("dummyJobId"), - } + t.Run("Test AuthZoneAPIService AuthZoneCreate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) - //require.Equal(t, "/api/ddi/v1/dns/auth_zone/copy", req.URL.Path) + var reqBody openapiclient.ConfigAuthZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthZone_Post, reqBody) - response := dns_config.ConfigCopyAuthZoneResponse{ - Result: &dummyConfigCopyResponse, - } + response := openapiclient.ConfigCreateAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 201, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - copyRequest := authZoneAPI.AuthZoneAPI.AuthZoneCopy(ctx).Body(dummyAuthZone) - resp, httpRes, err := copyRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(ConfigAuthZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 201, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) - - response := dns_config.ConfigReadAuthZoneResponse{ - Result: &dummyAuthZone, - } - body, err := json.Marshal(response) - require.NoError(t, err) + t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) return &http.Response{ - StatusCode: 200, - Body: io.NopCloser(bytes.NewReader(body)), + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - readRequest := authZoneAPI.AuthZoneAPI.AuthZoneRead(ctx, *dummyAuthZone.Id) - resp, httpRes, err := readRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), *ConfigAuthZone_Post.Id).Execute() require.Nil(t, err) - require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AuthZoneAPIService AuthZoneList", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/dns/auth_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigListAuthZoneResponse{ - Results: []dns_config.ConfigAuthZone{dummyAuthZone}, - } + response := openapiclient.ConfigListAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - listRequest := authZoneAPI.AuthZoneAPI.AuthZoneList(ctx) - resp, httpRes, err := listRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, dummyAuthZone, resp.Results[0]) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneUpdate", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test - - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } - - updatedAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), - Id: dummyAuthZone.Id, - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + t.Run("Test AuthZoneAPIService AuthZoneRead", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigUpdateAuthZoneResponse{ - Result: &updatedAuthZone, - } + response := openapiclient.ConfigReadAuthZoneResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - updateRequest := authZoneAPI.AuthZoneAPI.AuthZoneUpdate(ctx, *dummyAuthZone.Id).Body(updatedAuthZone) - resp, httpRes, err := updateRequest.Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), *ConfigAuthZone_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.Equal(t, updatedAuthZone, *resp.Result) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AuthZoneAPIService AuthZoneDelete", func(t *testing.T) { - - //t.Skip("skip test") // remove to run test + t.Run("Test AuthZoneAPIService AuthZoneUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - dummyAuthZone := dns_config.ConfigAuthZone{ - Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), - Id: openapiclient.PtrString("dummyAuthZoneId"), - } + var reqBody openapiclient.ConfigAuthZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigAuthZone_Patch, reqBody) - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*dummyAuthZone.Id, req.URL.Path) + response := openapiclient.ConfigUpdateAuthZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) return &http.Response{ - StatusCode: 200, - Body: io.NopCloser(bytes.NewReader([]byte{})), + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - authZoneAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - httpRes, err := authZoneAPI.AuthZoneAPI.AuthZoneDelete(ctx, *dummyAuthZone.Id).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), *ConfigAuthZone_Patch.Id).Body(ConfigAuthZone_Patch).Execute() require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) + require.NotNil(t, resp) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_cache_flush_test.go b/dns_config/test/api_cache_flush_test.go index 7558b84..58a35a0 100644 --- a/dns_config/test/api_cache_flush_test.go +++ b/dns_config/test/api_cache_flush_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing CacheFlushAPIService */ @@ -13,53 +13,48 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var ConfigCacheFlush_Post = openapiclient.ConfigCacheFlush{ + FlushSubdomains: openapiclient.PtrBool(true), + Fqdn: openapiclient.PtrString("dummyFqdn"), + Ophid: openapiclient.PtrString("dummyOphid"), + ServiceId: openapiclient.PtrString("dummyServiceId"), + Ttl: openapiclient.PtrInt64(120), + ViewName: openapiclient.PtrString("dummyViewName"), +} + func Test_dns_config_CacheFlushAPIService(t *testing.T) { t.Run("Test CacheFlushAPIService CacheFlushCreate", func(t *testing.T) { - // Create a dummy CacheFlush object - dummyCacheFlush := dns_config.ConfigCacheFlush{ - FlushSubdomains: openapiclient.PtrBool(true), - Fqdn: openapiclient.PtrString("dummyFqdn"), - Ophid: openapiclient.PtrString("dummyOphid"), - ServiceId: openapiclient.PtrString("dummyServiceId"), - Ttl: openapiclient.PtrInt64(120), - ViewName: openapiclient.PtrString("dummyViewName"), - } - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/dns/cache_flush", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) - var reqBody dns_config.ConfigCacheFlush + var reqBody openapiclient.ConfigCacheFlush require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyCacheFlush, reqBody) + require.Equal(t, ConfigCacheFlush_Post, reqBody) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader([]byte{})), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - cacheFlushAPI := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - _, httpRes, err := cacheFlushAPI.CacheFlushAPI.CacheFlushCreate(ctx).Body(dummyCacheFlush).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + _, httpRes, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(ConfigCacheFlush_Post).Execute() require.Nil(t, err) - //require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) + } diff --git a/dns_config/test/api_convert_domain_name_test.go b/dns_config/test/api_convert_domain_name_test.go index 4d3b7ec..5df948e 100644 --- a/dns_config/test/api_convert_domain_name_test.go +++ b/dns_config/test/api_convert_domain_name_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing ConvertDomainNameAPIService */ @@ -13,51 +13,42 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var domainName = "example.com" + func Test_dns_config_ConvertDomainNameAPIService(t *testing.T) { t.Run("Test ConvertDomainNameAPIService ConvertDomainNameConvert", func(t *testing.T) { - // Create a dummy domain name - dummyDomainName := "example.com" - - testClient := NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/convert_domain_name/"+dummyDomainName, req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/convert_domain_name/"+domainName, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := dns_config.ConfigConvertDomainName{ - Idn: openapiclient.PtrString("example.com"), - Punycode: openapiclient.PtrString("xn--example-2ya.com"), - } + response := openapiclient.ConfigConvertDomainNameResponse{} body, err := json.Marshal(response) require.NoError(t, err) return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - convertDomain := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := convertDomain.ConvertDomainNameAPI.ConvertDomainNameConvert(ctx, dummyDomainName).Execute() + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Nil(t, resp.Result) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_convert_rname_test.go b/dns_config/test/api_convert_rname_test.go index 7f166c6..630f4a2 100644 --- a/dns_config/test/api_convert_rname_test.go +++ b/dns_config/test/api_convert_rname_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing ConvertRnameAPIService */ @@ -13,58 +13,42 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var emailAddress = "test@example.com" + func Test_dns_config_ConvertRnameAPIService(t *testing.T) { t.Run("Test ConvertRnameAPIService ConvertRnameConvertRName", func(t *testing.T) { - - // Define a dummy email address - emailAddress := "test@example.com" - - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "GET", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/dns/convert_rname/"+emailAddress, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - // Create a dummy response - response := dns_config.ConfigConvertRNameResponse{ - Rname: openapiclient.PtrString("test.example.com."), - } + response := openapiclient.ConfigConvertRNameResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - - convertRename := dns_config.NewAPIClient(configuration) - ctx := context.Background() - - resp, httpRes, err := convertRename.ConvertRnameAPI.ConvertRnameConvertRName(ctx, emailAddress).Execute() - + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "test.example.com.", *resp.Rname) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_delegation_test.go b/dns_config/test/api_delegation_test.go index 9833d9f..13d19bd 100644 --- a/dns_config/test/api_delegation_test.go +++ b/dns_config/test/api_delegation_test.go @@ -7,87 +7,167 @@ Testing DelegationAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_DelegationAPIService(t *testing.T) { +var ConfigDelegation_Post = openapiclient.ConfigDelegation{ + Id: openapiclient.PtrString("ConfigDelegationPost"), + Comment: nil, + DelegationServers: nil, + Disabled: nil, + Fqdn: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + View: nil, +} +var ConfigDelegation_Patch = openapiclient.ConfigDelegation{ + Id: openapiclient.PtrString("ConfigDelegationPatch"), + Comment: nil, + DelegationServers: nil, + Disabled: nil, + Fqdn: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + View: nil, +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_DelegationAPIService(t *testing.T) { t.Run("Test DelegationAPIService DelegationCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigDelegation + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigDelegation_Post, reqBody) + + response := openapiclient.ConfigCreateDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(ConfigDelegation_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DelegationAPIService DelegationDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DelegationAPIService DelegationList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.DelegationAPI.DelegationList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DelegationAPIService DelegationRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DelegationAPI.DelegationRead(context.Background(), *ConfigDelegation_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DelegationAPIService DelegationUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + var reqBody openapiclient.ConfigDelegation + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigDelegation_Patch, reqBody) + + response := openapiclient.ConfigUpdateDelegationResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), *ConfigDelegation_Patch.Id).Body(ConfigDelegation_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + t.Run("Test DelegationAPIService DelegationDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), *ConfigDelegation_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_forward_nsg_test.go b/dns_config/test/api_forward_nsg_test.go index 8d9ac14..26929e6 100644 --- a/dns_config/test/api_forward_nsg_test.go +++ b/dns_config/test/api_forward_nsg_test.go @@ -7,87 +7,167 @@ Testing ForwardNsgAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ForwardNsgAPIService(t *testing.T) { +var ConfigForwardNSG_Post = openapiclient.ConfigForwardNSG{ + Id: openapiclient.PtrString("ConfigForwardNSGPost"), + Comment: nil, + ExternalForwarders: nil, + ForwardersOnly: nil, + Hosts: nil, + InternalForwarders: nil, + Name: "", + Nsgs: nil, + Tags: nil, +} +var ConfigForwardNSG_Patch = openapiclient.ConfigForwardNSG{ + Id: openapiclient.PtrString("ConfigForwardNSGPatch"), + Comment: nil, + ExternalForwarders: nil, + ForwardersOnly: nil, + Hosts: nil, + InternalForwarders: nil, + Name: "", + Nsgs: nil, + Tags: nil, +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_ForwardNsgAPIService(t *testing.T) { t.Run("Test ForwardNsgAPIService ForwardNsgCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigForwardNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardNSG_Post, reqBody) + + response := openapiclient.ConfigCreateForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(ConfigForwardNSG_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), *ConfigForwardNSG_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), *ConfigForwardNSG_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardNsgAPIService ForwardNsgUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigForwardNSG + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardNSG_Patch, reqBody) + + response := openapiclient.ConfigUpdateForwardNSGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), *ConfigForwardNSG_Patch.Id).Body(ConfigForwardNSG_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_forward_zone_test.go b/dns_config/test/api_forward_zone_test.go index 683d1cd..43ad78d 100644 --- a/dns_config/test/api_forward_zone_test.go +++ b/dns_config/test/api_forward_zone_test.go @@ -7,99 +7,225 @@ Testing ForwardZoneAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ForwardZoneAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ForwardZoneAPIService ForwardZoneCopy", func(t *testing.T) { +var ConfigCopyForwardZone_Post = openapiclient.ConfigCopyForwardZone{ + Id: openapiclient.PtrString("ConfigCopyForwardZonePost"), + Comment: nil, + ExternalForwarders: nil, + Hosts: nil, + InternalForwarders: nil, + Nsgs: nil, + Recursive: nil, + SkipOnError: nil, + TargetView: "", +} +var ConfigForwardZone_Post = openapiclient.ConfigForwardZone{ + Id: openapiclient.PtrString("ConfigForwardZonePost"), + Comment: nil, + CreatedAt: nil, + Disabled: nil, + ExternalForwarders: nil, + ForwardOnly: nil, + Fqdn: nil, + Hosts: nil, + InternalForwarders: nil, + MappedSubnet: nil, + Mapping: nil, + Nsgs: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + UpdatedAt: nil, + View: nil, + Warnings: nil, +} - t.Skip("skip test") // remove to run test +var ConfigForwardZone_Patch = openapiclient.ConfigForwardZone{ + Id: openapiclient.PtrString("ConfigForwardZonePatch"), + Comment: nil, + CreatedAt: nil, + Disabled: nil, + ExternalForwarders: nil, + ForwardOnly: nil, + Fqdn: nil, + Hosts: nil, + InternalForwarders: nil, + MappedSubnet: nil, + Mapping: nil, + Nsgs: nil, + Parent: nil, + ProtocolFqdn: nil, + Tags: nil, + UpdatedAt: nil, + View: nil, + Warnings: nil, +} - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Execute() +func Test_dns_config_ForwardZoneAPIService(t *testing.T) { + t.Run("Test ForwardZoneAPIService ForwardZoneCopy", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigCopyForwardZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigCopyForwardZone_Post, reqBody) + + response := openapiclient.ConfigCopyForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(ConfigCopyForwardZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigForwardZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardZone_Post, reqBody) + + response := openapiclient.ConfigCreateForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(ConfigForwardZone_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ForwardZoneAPIService ForwardZoneDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), *ConfigForwardZone_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ForwardZoneAPIService ForwardZoneUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + var reqBody openapiclient.ConfigForwardZone + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigForwardZone_Patch, reqBody) + + response := openapiclient.ConfigUpdateForwardZoneResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), *ConfigForwardZone_Patch.Id).Body(ConfigForwardZone_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + t.Run("Test ForwardZoneAPIService ForwardZoneDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), *ConfigForwardZone_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_global_test.go b/dns_config/test/api_global_test.go index e114660..ec0001f 100644 --- a/dns_config/test/api_global_test.go +++ b/dns_config/test/api_global_test.go @@ -7,74 +7,133 @@ Testing GlobalAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_GlobalAPIService(t *testing.T) { +var ConfigGlobal_Patch = openapiclient.ConfigGlobal{ + Id: "Patch1", +} +var ConfigGlobal_Patch2 = openapiclient.ConfigGlobal{ + Id: "Patch2", +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_GlobalAPIService(t *testing.T) { t.Run("Test GlobalAPIService GlobalRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalRead2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobal_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), ConfigGlobal_Patch.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigGlobal + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigGlobal_Patch, reqBody) + + response := openapiclient.ConfigUpdateGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(ConfigGlobal_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalUpdate2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobal_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigGlobal + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigGlobal_Patch2, reqBody) + + response := openapiclient.ConfigUpdateGlobalResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), ConfigGlobal_Patch.Id).Body(ConfigGlobal_Patch2).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_host_test.go b/dns_config/test/api_host_test.go index 2950634..cd3e2c9 100644 --- a/dns_config/test/api_host_test.go +++ b/dns_config/test/api_host_test.go @@ -1,7 +1,7 @@ /* DNS Configuration API -Testing AclAPIService +Testing HostAPIService */ @@ -13,158 +13,96 @@ import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/dns_config" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + + "github.com/stretchr/testify/require" + + openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" + "github.com/infobloxopen/bloxone-go-client/internal" ) +var ConfigHost_Patch = openapiclient.ConfigHost{ + Id: openapiclient.PtrString("ConfigHostPatch"), +} + func Test_dns_config_HostAPIService(t *testing.T) { t.Run("Test HostAPIService HostList", func(t *testing.T) { - - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "GET", req.Method) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/dns/host", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - // Create a dummy response - response := dns_config.ConfigListHostResponse{ - Results: []dns_config.ConfigHost{ - { - Id: openapiclient.PtrString("host1"), - AbsoluteName: openapiclient.PtrString("host1.example.com"), - }, - { - Id: openapiclient.PtrString("host2"), - AbsoluteName: openapiclient.PtrString("host2.example.com"), - }, - }, - } + response := openapiclient.ConfigListHostResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - // Create a new API client with the mock HTTP client - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - apiClient := dns_config.NewAPIClient(configuration) - - // Call the method and check the response + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.HostAPI.HostList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "host1", *resp.Results[0].Id) - assert.Equal(t, "host1.example.com", *resp.Results[0].AbsoluteName) - assert.Equal(t, "host2", *resp.Results[1].Id) - assert.Equal(t, "host2.example.com", *resp.Results[1].AbsoluteName) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HostAPIService HostRead", func(t *testing.T) { - - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHost_Patch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - // Create a dummy response - response := dns_config.ConfigReadHostResponse{ - Result: &dns_config.ConfigHost{ - Id: openapiclient.PtrString("host1"), - AbsoluteName: openapiclient.PtrString("host1.example.com"), - }, - } + response := openapiclient.ConfigReadHostResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - // Create a new API client with the mock HTTP client - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - apiClient := dns_config.NewAPIClient(configuration) - - // Call the method and check the response - id := "host1" - resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), id).Execute() - + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), *ConfigHost_Patch.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "host1", *resp.Result.Id) - assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HostAPIService HostUpdate", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHost_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) - // Create a mock HTTP client - testClient := NewTestClient(func(req *http.Request) *http.Response { - // Check the request parameters - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/dns/host/host1", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Accept")) + var reqBody openapiclient.ConfigHost + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigHost_Patch, reqBody) - // Create a dummy response - response := dns_config.ConfigReadHostResponse{ - Result: &dns_config.ConfigHost{ - Id: openapiclient.PtrString("host1"), - AbsoluteName: openapiclient.PtrString("host1.example.com"), - }, - } + response := openapiclient.ConfigUpdateHostResponse{} body, err := json.Marshal(response) require.NoError(t, err) - // Return the dummy response return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - - // Create a new API client with the mock HTTP client - configuration := internal.NewConfiguration() - configuration.HTTPClient = testClient - apiClient := dns_config.NewAPIClient(configuration) - - // Call the method and check the response - id := "host1" - hostUpdateInput := dns_config.ConfigHost{ - AbsoluteName: openapiclient.PtrString("host1.example.com"), - } - resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(hostUpdateInput).Execute() - + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), *ConfigHost_Patch.Id).Body(ConfigHost_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - assert.Equal(t, "host1", *resp.Result.Id) - assert.Equal(t, "host1.example.com", *resp.Result.AbsoluteName) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_lbdn_test.go b/dns_config/test/api_lbdn_test.go index 6433b4a..382ddb7 100644 --- a/dns_config/test/api_lbdn_test.go +++ b/dns_config/test/api_lbdn_test.go @@ -7,87 +7,151 @@ Testing LbdnAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_LbdnAPIService(t *testing.T) { +var ConfigLBDN_Post = openapiclient.ConfigLBDN{ + Id: openapiclient.PtrString("ConfigLBDNPost"), +} +var ConfigLBDN_Patch = openapiclient.ConfigLBDN{ + Id: openapiclient.PtrString("ConfigLBDNPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_LbdnAPIService(t *testing.T) { t.Run("Test LbdnAPIService LbdnCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigLBDN + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigLBDN_Post, reqBody) + + response := openapiclient.ConfigCreateLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(ConfigLBDN_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), *ConfigLBDN_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.LbdnAPI.LbdnList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LbdnAPI.LbdnRead(context.Background(), *ConfigLBDN_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test LbdnAPIService LbdnUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigLBDN + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigLBDN_Patch, reqBody) + + response := openapiclient.ConfigUpdateLBDNResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), *ConfigLBDN_Patch.Id).Body(ConfigLBDN_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_server_test.go b/dns_config/test/api_server_test.go index 485d79f..a2fb260 100644 --- a/dns_config/test/api_server_test.go +++ b/dns_config/test/api_server_test.go @@ -7,87 +7,151 @@ Testing ServerAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ServerAPIService(t *testing.T) { +var ConfigServer_Post = openapiclient.ConfigServer{ + Id: openapiclient.PtrString("ConfigServerPost"), +} +var ConfigServer_Patch = openapiclient.ConfigServer{ + Id: openapiclient.PtrString("ConfigServerPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_ServerAPIService(t *testing.T) { t.Run("Test ServerAPIService ServerCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigServer + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigServer_Post, reqBody) + + response := openapiclient.ConfigCreateServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(ConfigServer_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *ConfigServer_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ServerAPI.ServerList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *ConfigServer_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigServer + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigServer_Patch, reqBody) + + response := openapiclient.ConfigUpdateServerResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *ConfigServer_Patch.Id).Body(ConfigServer_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_config/test/api_view_test.go b/dns_config/test/api_view_test.go index 47b4c37..29e73bb 100644 --- a/dns_config/test/api_view_test.go +++ b/dns_config/test/api_view_test.go @@ -7,99 +7,188 @@ Testing ViewAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_config +package dns_config_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_config" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_config_ViewAPIService(t *testing.T) { +var ConfigBulkCopyView_Post = openapiclient.ConfigBulkCopyView{ + AuthZoneConfig: nil, + ForwardZoneConfig: nil, + Recursive: nil, + Resources: nil, + SecondaryZoneConfig: nil, + SkipOnError: nil, + Target: "TargetPost", +} +var ConfigView_Post = openapiclient.ConfigView{ + Id: openapiclient.PtrString("ConfigViewPost"), +} +var ConfigView_Patch = openapiclient.ConfigView{ + Id: openapiclient.PtrString("ConfigViewPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_config_ViewAPIService(t *testing.T) { t.Run("Test ViewAPIService ViewBulkCopy", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/bulk_copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigBulkCopyView + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigBulkCopyView_Post, reqBody) + + response := openapiclient.ConfigBulkCopyResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(ConfigBulkCopyView_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ViewAPI.ViewCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigView + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigView_Post, reqBody) + + response := openapiclient.ConfigCreateViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(ConfigView_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ViewAPI.ViewDelete(context.Background(), *ConfigView_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigListViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ViewAPI.ViewList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.ConfigReadViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewRead(context.Background(), *ConfigView_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ViewAPIService ViewUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.ConfigView + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, ConfigView_Patch, reqBody) + + response := openapiclient.ConfigUpdateViewResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ViewAPI.ViewUpdate(context.Background(), *ConfigView_Patch.Id).Body(ConfigView_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/dns_data/.openapi-generator/FILES b/dns_data/.openapi-generator/FILES index 606c946..0c87762 100644 --- a/dns_data/.openapi-generator/FILES +++ b/dns_data/.openapi-generator/FILES @@ -22,4 +22,5 @@ model_data_soa_serial_increment_response.go model_data_update_record_response.go model_inheritance2_inherited_u_int32.go model_protobuf_field_mask.go +test/api_record_test.go utils.go diff --git a/dns_data/api_record.go b/dns_data/api_record.go index 3400bef..3caac75 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,18 +18,19 @@ import ( "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type RecordAPI interface { /* - RecordCreate Create the DNS resource record. + RecordCreate Create the DNS resource record. - Use this method to create a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to create a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ RecordCreate(ctx context.Context) ApiRecordCreateRequest @@ -37,27 +38,27 @@ type RecordAPI interface { // @return DataCreateRecordResponse RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) /* - RecordDelete Move the DNS resource record to recycle bin. + RecordDelete Move the DNS resource record to recycle bin. - Use this method to move a DNS __Record__ object to the recycle bin. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to move a DNS __Record__ object to the recycle bin. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest // RecordDeleteExecute executes the request RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) /* - RecordList Retrieve DNS resource records. + RecordList Retrieve DNS resource records. - Use this method to retrieve DNS __Record__ objects. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve DNS __Record__ objects. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ RecordList(ctx context.Context) ApiRecordListRequest @@ -65,14 +66,14 @@ type RecordAPI interface { // @return DataListRecordResponse RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) /* - RecordRead Retrieve the DNS resource record. + RecordRead Retrieve the DNS resource record. - Use this method to retrieve a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ RecordRead(ctx context.Context, id string) ApiRecordReadRequest @@ -80,14 +81,14 @@ type RecordAPI interface { // @return DataReadRecordResponse RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) /* - RecordSOASerialIncrement Increment serial number for the SOA record. + RecordSOASerialIncrement Increment serial number for the SOA record. - Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest @@ -95,14 +96,14 @@ type RecordAPI interface { // @return DataSOASerialIncrementResponse RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) /* - RecordUpdate Update the DNS resource record. + RecordUpdate Update the DNS resource record. - Use this method to update a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to update a DNS __Record__ object. +A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest @@ -115,10 +116,10 @@ type RecordAPI interface { type RecordAPIService internal.Service type ApiRecordCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - body *DataRecord - inherit *string + body *DataRecord + inherit *string } func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { @@ -142,25 +143,24 @@ RecordCreate Create the DNS resource record. Use this method to create a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequest { return ApiRecordCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DataCreateRecordResponse +// @return DataCreateRecordResponse func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataCreateRecordResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataCreateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordCreate") @@ -252,9 +252,9 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC } type ApiRecordDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string + id string } func (r ApiRecordDeleteRequest) Execute() (*http.Response, error) { @@ -267,24 +267,24 @@ RecordDelete Move the DNS resource record to recycle bin. Use this method to move a DNS __Record__ object to the recycle bin. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ func (a *RecordAPIService) RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest { return ApiRecordDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordDelete") @@ -356,50 +356,50 @@ func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http. } type ApiRecordListRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordListRequest) Fields(fields string) ApiRecordListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRecordListRequest) Filter(filter string) ApiRecordListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRecordListRequest) Offset(offset int32) ApiRecordListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRecordListRequest) Limit(limit int32) ApiRecordListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRecordListRequest) PageToken(pageToken string) ApiRecordListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRecordListRequest) OrderBy(orderBy string) ApiRecordListRequest { r.orderBy = &orderBy return r @@ -433,25 +433,24 @@ RecordList Retrieve DNS resource records. Use this method to retrieve DNS __Record__ objects. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest { return ApiRecordListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DataListRecordResponse +// @return DataListRecordResponse func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataListRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataListRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordList") @@ -554,14 +553,14 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR } type ApiRecordReadRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordReadRequest) Fields(fields string) ApiRecordReadRequest { r.fields = &fields return r @@ -583,27 +582,26 @@ RecordRead Retrieve the DNS resource record. Use this method to retrieve a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordReadRequest { return ApiRecordReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataReadRecordResponse +// @return DataReadRecordResponse func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataReadRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataReadRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordRead") @@ -686,10 +684,10 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR } type ApiRecordSOASerialIncrementRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataSOASerialIncrementRequest + id string + body *DataSOASerialIncrementRequest } func (r ApiRecordSOASerialIncrementRequest) Body(body DataSOASerialIncrementRequest) ApiRecordSOASerialIncrementRequest { @@ -707,27 +705,26 @@ RecordSOASerialIncrement Increment serial number for the SOA record. Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest { return ApiRecordSOASerialIncrementRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataSOASerialIncrementResponse +// @return DataSOASerialIncrementResponse func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataSOASerialIncrementResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataSOASerialIncrementResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordSOASerialIncrement") @@ -809,11 +806,11 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI } type ApiRecordUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataRecord - inherit *string + id string + body *DataRecord + inherit *string } func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { @@ -837,27 +834,26 @@ RecordUpdate Update the DNS resource record. Use this method to update a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest { return ApiRecordUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return DataUpdateRecordResponse +// @return DataUpdateRecordResponse func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataUpdateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataUpdateRecordResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataUpdateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordUpdate") diff --git a/dns_data/model_data_create_record_response.go b/dns_data/model_data_create_record_response.go index 870d899..2914142 100644 --- a/dns_data/model_data_create_record_response.go +++ b/dns_data/model_data_create_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataCreateRecordResponse) SetResult(v DataRecord) { } func (o DataCreateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataCreateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_list_record_response.go b/dns_data/model_data_list_record_response.go index e633b11..8ce789e 100644 --- a/dns_data/model_data_list_record_response.go +++ b/dns_data/model_data_list_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *DataListRecordResponse) SetResults(v []DataRecord) { } func (o DataListRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableDataListRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_read_record_response.go b/dns_data/model_data_read_record_response.go index 7541c04..57ccdab 100644 --- a/dns_data/model_data_read_record_response.go +++ b/dns_data/model_data_read_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataReadRecordResponse) SetResult(v DataRecord) { } func (o DataReadRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataReadRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_record_inheritance.go b/dns_data/model_data_record_inheritance.go index 55e5209..88f08ec 100644 --- a/dns_data/model_data_record_inheritance.go +++ b/dns_data/model_data_record_inheritance.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataRecordInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o DataRecordInheritance) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataRecordInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_soa_serial_increment_request.go b/dns_data/model_data_soa_serial_increment_request.go index ce4dabf..2ae5f8c 100644 --- a/dns_data/model_data_soa_serial_increment_request.go +++ b/dns_data/model_data_soa_serial_increment_request.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -140,7 +140,7 @@ func (o *DataSOASerialIncrementRequest) SetSerialIncrement(v int64) { } func (o DataSOASerialIncrementRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,3 +196,5 @@ func (v *NullableDataSOASerialIncrementRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_soa_serial_increment_response.go b/dns_data/model_data_soa_serial_increment_response.go index 352d117..cc83af7 100644 --- a/dns_data/model_data_soa_serial_increment_response.go +++ b/dns_data/model_data_soa_serial_increment_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataSOASerialIncrementResponse) SetResult(v DataRecord) { } func (o DataSOASerialIncrementResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataSOASerialIncrementResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_data_update_record_response.go b/dns_data/model_data_update_record_response.go index aca7ee5..ac6d08d 100644 --- a/dns_data/model_data_update_record_response.go +++ b/dns_data/model_data_update_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataUpdateRecordResponse) SetResult(v DataRecord) { } func (o DataUpdateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableDataUpdateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_inheritance2_inherited_u_int32.go b/dns_data/model_inheritance2_inherited_u_int32.go index c23f897..9d2885f 100644 --- a/dns_data/model_inheritance2_inherited_u_int32.go +++ b/dns_data/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,3 +234,5 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/model_protobuf_field_mask.go b/dns_data/model_protobuf_field_mask.go index 17ded5d..21401df 100644 --- a/dns_data/model_protobuf_field_mask.go +++ b/dns_data/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/dns_data/test/api_record_test.go b/dns_data/test/api_record_test.go index 8d3ff42..bc33028 100644 --- a/dns_data/test/api_record_test.go +++ b/dns_data/test/api_record_test.go @@ -7,101 +7,182 @@ Testing RecordAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package dns_data +package dns_data_test import ( + "bytes" "context" + "encoding/json" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" openapiclient "github.com/infobloxopen/bloxone-go-client/dns_data" "github.com/infobloxopen/bloxone-go-client/internal" ) -func Test_dns_data_RecordAPIService(t *testing.T) { +var DataRecord_Post = openapiclient.DataRecord{ + Id: openapiclient.PtrString("DataRecordPost"), +} +var DataSOASerialIncrementRequest_Post = openapiclient.DataSOASerialIncrementRequest{ + Id: openapiclient.PtrString("IncrementRequest"), +} +var DataRecord_Patch = openapiclient.DataRecord{ + Id: openapiclient.PtrString("DataRecordPatch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_dns_data_RecordAPIService(t *testing.T) { t.Run("Test RecordAPIService RecordCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.RecordAPI.RecordCreate(context.Background()).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.DataRecord + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, DataRecord_Post, reqBody) + + response := openapiclient.DataCreateRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(DataRecord_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.RecordAPI.RecordDelete(context.Background(), *DataRecord_Post.Id).Execute() require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.DataListRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.RecordAPI.RecordList(context.Background()).Execute() - require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.DataReadRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordRead(context.Background(), *DataRecord_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordSOASerialIncrement", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataSOASerialIncrementRequest_Post.Id+"/serial_increment", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.DataSOASerialIncrementRequest + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, DataSOASerialIncrementRequest_Post, reqBody) + + response := openapiclient.DataSOASerialIncrementResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), *DataSOASerialIncrementRequest_Post.Id).Body(DataSOASerialIncrementRequest_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RecordAPIService RecordUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Execute() - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.DataRecord + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, DataRecord_Patch, reqBody) + + response := openapiclient.DataUpdateRecordResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), *DataRecord_Patch.Id).Body(DataRecord_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/internal/utils.go b/internal/utils.go index 3600f5b..da62760 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -1,5 +1,19 @@ package internal +import "net/http" + type MappedNullable interface { ToMap() (map[string]interface{}, error) } + +type RoundTripFunc func(req *http.Request) *http.Response + +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} + +func NewTestClient(testFn RoundTripFunc) *http.Client { + return &http.Client{ + Transport: RoundTripFunc(testFn), + } +} diff --git a/keys/.openapi-generator/FILES b/keys/.openapi-generator/FILES index a5d04a4..8cf4475 100644 --- a/keys/.openapi-generator/FILES +++ b/keys/.openapi-generator/FILES @@ -40,6 +40,5 @@ model_keys_update_tsig_key_response.go model_protobuf_field_mask.go model_upload_content_type.go model_upload_request.go -test/api_generate_tsig_test.go test/api_upload_test.go utils.go diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index 68f2022..1a8c350 100644 --- a/keys/api_generate_tsig.go +++ b/keys/api_generate_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,17 +17,18 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type GenerateTsigAPI interface { /* - GenerateTsigGenerateTSIG Generate TSIG key with a random secret. + GenerateTsigGenerateTSIG Generate TSIG key with a random secret. - Use this method to generate a TSIG key with a random secret using the specified algorithm. + Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest @@ -40,9 +41,9 @@ type GenerateTsigAPI interface { type GenerateTsigAPIService internal.Service type ApiGenerateTsigGenerateTSIGRequest struct { - ctx context.Context + ctx context.Context ApiService GenerateTsigAPI - algorithm *string + algorithm *string } // The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. @@ -60,25 +61,24 @@ GenerateTsigGenerateTSIG Generate TSIG key with a random secret. Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest { return ApiGenerateTsigGenerateTSIGRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysGenerateTSIGResponse +// @return KeysGenerateTSIGResponse func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTsigGenerateTSIGRequest) (*KeysGenerateTSIGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysGenerateTSIGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysGenerateTSIGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GenerateTsigAPIService.GenerateTsigGenerateTSIG") diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 31480a8..875d85c 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -13,24 +13,24 @@ package keys import ( "bytes" "context" - _ "github.com/infobloxopen/bloxone-go-client/dns_config" "io" "net/http" "net/url" "strings" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type TsigAPI interface { /* - TsigCreate Create the TSIG key. + TsigCreate Create the TSIG key. - Use this method to create a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to create a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ TsigCreate(ctx context.Context) ApiTsigCreateRequest @@ -38,27 +38,27 @@ type TsigAPI interface { // @return KeysCreateTSIGKeyResponse TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) /* - TsigDelete Delete the TSIG key. + TsigDelete Delete the TSIG key. - Use this method to delete a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to delete a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest // TsigDeleteExecute executes the request TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) /* - TsigList Retrieve TSIG keys. + TsigList Retrieve TSIG keys. - Use this method to retrieve __TSIGKey__ objects. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve __TSIGKey__ objects. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ TsigList(ctx context.Context) ApiTsigListRequest @@ -66,14 +66,14 @@ type TsigAPI interface { // @return KeysListTSIGKeyResponse TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) /* - TsigRead Retrieve the TSIG key. + TsigRead Retrieve the TSIG key. - Use this method to retrieve a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ TsigRead(ctx context.Context, id string) ApiTsigReadRequest @@ -81,14 +81,14 @@ type TsigAPI interface { // @return KeysReadTSIGKeyResponse TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) /* - TsigUpdate Update the TSIG key. + TsigUpdate Update the TSIG key. - Use this method to update a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to update a __TSIGKey__ object. +A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest @@ -101,9 +101,9 @@ type TsigAPI interface { type TsigAPIService internal.Service type ApiTsigCreateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - body *KeysTSIGKey + body *KeysTSIGKey } func (r ApiTsigCreateRequest) Body(body KeysTSIGKey) ApiTsigCreateRequest { @@ -121,25 +121,24 @@ TsigCreate Create the TSIG key. Use this method to create a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { return ApiTsigCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysCreateTSIGKeyResponse +// @return KeysCreateTSIGKeyResponse func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysCreateTSIGKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysCreateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigCreate") @@ -228,9 +227,9 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT } type ApiTsigDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string + id string } func (r ApiTsigDeleteRequest) Execute() (*http.Response, error) { @@ -243,24 +242,24 @@ TsigDelete Delete the TSIG key. Use this method to delete a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ func (a *TsigAPIService) TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest { return ApiTsigDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigDelete") @@ -332,49 +331,49 @@ func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Respon } type ApiTsigListRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigListRequest) Fields(fields string) ApiTsigListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiTsigListRequest) Filter(filter string) ApiTsigListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiTsigListRequest) Offset(offset int32) ApiTsigListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiTsigListRequest) Limit(limit int32) ApiTsigListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiTsigListRequest) PageToken(pageToken string) ApiTsigListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiTsigListRequest) OrderBy(orderBy string) ApiTsigListRequest { r.orderBy = &orderBy return r @@ -402,25 +401,24 @@ TsigList Retrieve TSIG keys. Use this method to retrieve __TSIGKey__ objects. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { return ApiTsigListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return KeysListTSIGKeyResponse +// @return KeysListTSIGKeyResponse func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigList") @@ -520,13 +518,13 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey } type ApiTsigReadRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigReadRequest) Fields(fields string) ApiTsigReadRequest { r.fields = &fields return r @@ -542,27 +540,26 @@ TsigRead Retrieve the TSIG key. Use this method to retrieve a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadRequest { return ApiTsigReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysReadTSIGKeyResponse +// @return KeysReadTSIGKeyResponse func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigRead") @@ -642,10 +639,10 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey } type ApiTsigUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - body *KeysTSIGKey + id string + body *KeysTSIGKey } func (r ApiTsigUpdateRequest) Body(body KeysTSIGKey) ApiTsigUpdateRequest { @@ -663,27 +660,26 @@ TsigUpdate Update the TSIG key. Use this method to update a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest { return ApiTsigUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// -// @return KeysUpdateTSIGKeyResponse +// @return KeysUpdateTSIGKeyResponse func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateTSIGKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigUpdate") diff --git a/keys/api_upload.go b/keys/api_upload.go index d91ba24..9b28757 100644 --- a/keys/api_upload.go +++ b/keys/api_upload.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,17 +17,18 @@ import ( "net/http" "net/url" - "github.com/infobloxopen/bloxone-go-client/internal" +"github.com/infobloxopen/bloxone-go-client/internal" ) + type UploadAPI interface { /* - UploadUpload Upload content to the keys service. + UploadUpload Upload content to the keys service. - Use this method to upload specified content type to the keys service. + Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ UploadUpload(ctx context.Context) ApiUploadUploadRequest @@ -40,9 +41,9 @@ type UploadAPI interface { type UploadAPIService internal.Service type ApiUploadUploadRequest struct { - ctx context.Context + ctx context.Context ApiService UploadAPI - body *UploadRequest + body *UploadRequest } func (r ApiUploadUploadRequest) Body(body UploadRequest) ApiUploadUploadRequest { @@ -59,25 +60,24 @@ UploadUpload Upload content to the keys service. Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequest { return ApiUploadUploadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// -// @return DdiuploadResponse +// @return DdiuploadResponse func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*DdiuploadResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DdiuploadResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DdiuploadResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UploadAPIService.UploadUpload") diff --git a/keys/client.go b/keys/client.go index b3649a4..286dc91 100644 --- a/keys/client.go +++ b/keys/client.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package keys import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,20 +19,20 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DDI Keys API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services GenerateTsigAPI GenerateTsigAPI - KerberosAPI KerberosAPI - TsigAPI TsigAPI - UploadAPI UploadAPI + KerberosAPI KerberosAPI + TsigAPI TsigAPI + UploadAPI UploadAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.GenerateTsigAPI = (*GenerateTsigAPIService)(&c.Common) diff --git a/keys/model_ddiupload_response.go b/keys/model_ddiupload_response.go index a58ddfb..e220432 100644 --- a/keys/model_ddiupload_response.go +++ b/keys/model_ddiupload_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -106,7 +106,7 @@ func (o *DdiuploadResponse) SetWarning(v string) { } func (o DdiuploadResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,3 +159,5 @@ func (v *NullableDdiuploadResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_kerberos_key.go b/keys/model_kerberos_key.go index ee036c9..4285f1e 100644 --- a/keys/model_kerberos_key.go +++ b/keys/model_kerberos_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -311,7 +311,7 @@ func (o *KerberosKey) SetVersion(v int64) { } func (o KerberosKey) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,3 +382,5 @@ func (v *NullableKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_kerberos_keys.go b/keys/model_kerberos_keys.go index 1c06064..78817e6 100644 --- a/keys/model_kerberos_keys.go +++ b/keys/model_kerberos_keys.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KerberosKeys) SetItems(v []KerberosKey) { } func (o KerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_create_tsig_key_response.go b/keys/model_keys_create_tsig_key_response.go index edd0da5..bfe51e4 100644 --- a/keys/model_keys_create_tsig_key_response.go +++ b/keys/model_keys_create_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysCreateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysCreateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysCreateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_generate_tsig_response.go b/keys/model_keys_generate_tsig_response.go index 85f10e4..5a6ee49 100644 --- a/keys/model_keys_generate_tsig_response.go +++ b/keys/model_keys_generate_tsig_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysGenerateTSIGResponse) SetResult(v KeysGenerateTSIGResult) { } func (o KeysGenerateTSIGResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysGenerateTSIGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_generate_tsig_result.go b/keys/model_keys_generate_tsig_result.go index 4f6b49d..9b7dab8 100644 --- a/keys/model_keys_generate_tsig_result.go +++ b/keys/model_keys_generate_tsig_result.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysGenerateTSIGResult) SetSecret(v string) { } func (o KeysGenerateTSIGResult) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysGenerateTSIGResult) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_list_kerberos_key_response.go b/keys/model_keys_list_kerberos_key_response.go index 5966a99..31006cc 100644 --- a/keys/model_keys_list_kerberos_key_response.go +++ b/keys/model_keys_list_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListKerberosKeyResponse) SetResults(v []KerberosKey) { } func (o KeysListKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysListKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_list_tsig_key_response.go b/keys/model_keys_list_tsig_key_response.go index 2a6d699..5d90120 100644 --- a/keys/model_keys_list_tsig_key_response.go +++ b/keys/model_keys_list_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListTSIGKeyResponse) SetResults(v []KeysTSIGKey) { } func (o KeysListTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableKeysListTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_read_kerberos_key_response.go b/keys/model_keys_read_kerberos_key_response.go index dce9578..daeeb0c 100644 --- a/keys/model_keys_read_kerberos_key_response.go +++ b/keys/model_keys_read_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysReadKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysReadKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_read_tsig_key_response.go b/keys/model_keys_read_tsig_key_response.go index fdc725c..3eee404 100644 --- a/keys/model_keys_read_tsig_key_response.go +++ b/keys/model_keys_read_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysReadTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysReadTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_update_kerberos_key_response.go b/keys/model_keys_update_kerberos_key_response.go index 9e83ae5..189d271 100644 --- a/keys/model_keys_update_kerberos_key_response.go +++ b/keys/model_keys_update_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysUpdateKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysUpdateKerberosKeyResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_keys_update_tsig_key_response.go b/keys/model_keys_update_tsig_key_response.go index dc1acd7..2082989 100644 --- a/keys/model_keys_update_tsig_key_response.go +++ b/keys/model_keys_update_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysUpdateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,3 +122,5 @@ func (v *NullableKeysUpdateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_protobuf_field_mask.go b/keys/model_protobuf_field_mask.go index c76ddb4..33973a0 100644 --- a/keys/model_protobuf_field_mask.go +++ b/keys/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,3 +123,5 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/keys/model_upload_content_type.go b/keys/model_upload_content_type.go index dbdf50c..4052062 100644 --- a/keys/model_upload_content_type.go +++ b/keys/model_upload_content_type.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -21,7 +21,7 @@ type UploadContentType string // List of uploadContentType const ( UPLOADCONTENTTYPE_UNKNOWN UploadContentType = "UNKNOWN" - UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" + UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" ) // All allowed values of UploadContentType enum @@ -108,3 +108,4 @@ func (v *NullableUploadContentType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + diff --git a/keys/test/api_generate_tsig_test.go b/keys/test/api_generate_tsig_test.go index 8f29e45..5b5d0c3 100644 --- a/keys/test/api_generate_tsig_test.go +++ b/keys/test/api_generate_tsig_test.go @@ -13,56 +13,40 @@ import ( "bytes" "context" "encoding/json" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -//type RoundTripFunc func(req *http.Request) *http.Response -// -//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { -// return f(req), nil -//} -// -//func NewTestClient(fn RoundTripFunc) *http.Client { -// return &http.Client{ -// Transport: RoundTripFunc(fn), -// } -//} - func Test_keys_GenerateTsigAPIService(t *testing.T) { - configuration := internal.NewConfiguration() - dummyKey := openapiclient.KeysGenerateTSIGResult{ - Secret: openapiclient.PtrString("XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc="), - } - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/generate_tsig", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Accept")) - require.Equal(t, "hmac_sha256", req.URL.Query().Get("algorithm")) - response := openapiclient.KeysGenerateTSIGResponse{ - Result: &dummyKey, - } - body, err := json.Marshal(response) - require.NoError(t, err) - return &http.Response{ - StatusCode: 200, - Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, - } + t.Run("Test GenerateTsigAPIService GenerateTsigGenerateTSIG", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/generate_tsig", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.KeysGenerateTSIGResponse{} + body, err := json.Marshal(response) + require.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Execute() + require.Nil(t, err) + require.NotNil(t, resp) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - apiClient := openapiclient.NewAPIClient(configuration) - request := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm("hmac_sha256") - response, httpRes, err := request.Execute() - require.Nil(t, err) - require.Equal(t, 200, httpRes.StatusCode) - require.NotNil(t, response) - require.Equal(t, "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", *response.Result.Secret) + } diff --git a/keys/test/api_kerberos_test.go b/keys/test/api_kerberos_test.go index 6b54d87..240fe01 100644 --- a/keys/test/api_kerberos_test.go +++ b/keys/test/api_kerberos_test.go @@ -13,195 +13,145 @@ import ( "bytes" "context" "encoding/json" - "github.com/stretchr/testify/require" "io" "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -//type RoundTripFunc func(req *http.Request) *http.Response -// -//func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { -// return f(req), nil -//} -// -//func NewTestClient(fn RoundTripFunc) *http.Client { -// return &http.Client{ -// Transport: RoundTripFunc(fn), -// } -//} +var KerberosKey_Patch = openapiclient.KerberosKey{ + Id: openapiclient.PtrString("KerberosKeyPost"), +} +var KerberosKey_Post = openapiclient.KerberosKey{ + Id: openapiclient.PtrString("KerberosKeyPatch"), +} func Test_keys_KerberosAPIService(t *testing.T) { - t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { + t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Post.Id, req.URL.Path) - t.Skip("skip test") + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), *KerberosKey_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + t.Run("Test KerberosAPIService KerberosList", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysReadKerberosKeyResponse{ - Result: &openapiclient.KerberosKey{ - Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), - Comment: openapiclient.PtrString("Test Kerberos Key"), - Id: nil, - }, - } + response := openapiclient.KeysListKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), "dummyKey").Execute() - + resp, httpRes, err := apiClient.KerberosAPI.KerberosList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test KerberosAPIService KerberosKeyList", func(t *testing.T) { - - t.Skip("skip test") - + t.Run("Test KerberosAPIService KerberosRead", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Post.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysListKerberosKeyResponse{ - Results: []openapiclient.KerberosKey{ - { - Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), - Comment: openapiclient.PtrString("Test Kerberos Key"), - Id: nil, - }, - }, - } + response := openapiclient.KeysReadKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KerberosList(context.Background()).Execute() + resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), *KerberosKey_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.NotEmpty(t, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test KerberosAPIService KerberosUpdate", func(t *testing.T) { - - t.Skip("skip test") - - dummyKey := openapiclient.KerberosKey{ - Algorithm: openapiclient.PtrString("RFC 3961"), - Comment: openapiclient.PtrString("Test Update Kerberos Key"), - Id: nil, - } configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Content-Type")) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + var reqBody openapiclient.KerberosKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KerberosKey_Patch, reqBody) - response := openapiclient.KeysUpdateKerberosKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysUpdateKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - updateRequest := apiClient.KerberosAPI.KerberosUpdate(context.Background(), "dummyKey").Body(dummyKey) - resp, httpRes, err := updateRequest.Execute() + resp, httpRes, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), *KerberosKey_Patch.Id).Body(KerberosKey_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - - t.Skip("skip test") - - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - } + t.Run("Test KerberosAPIService KeysKerberosPost", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/keys/kerberos", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) - var reqBody openapiclient.KeysTSIGKey + + var reqBody openapiclient.KerberosKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KerberosKey_Post, reqBody) - response := openapiclient.KeysUpdateTSIGKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysListKerberosKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) - resp, httpRes, err := updateRequest.Execute() + resp, httpRes, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(KerberosKey_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - }) - - t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { - t.Skip("skip test") - configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/dummyKey36", req.URL.Path) - return &http.Response{ - StatusCode: 204, - Body: io.NopCloser(bytes.NewReader([]byte{})), - Header: make(http.Header), - } - }) - apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), "dummyKey36").Execute() - require.Nil(t, err) - require.Equal(t, 204, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index 27e02c0..061e845 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -1,182 +1,157 @@ +/* +DDI Keys API + +Testing TsigAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + package keys_test import ( "bytes" "context" "encoding/json" - "github.com/infobloxopen/bloxone-go-client/internal" - openapiclient "github.com/infobloxopen/bloxone-go-client/keys" - "github.com/stretchr/testify/require" "io" "net/http" "testing" -) -type RoundTripFunc func(req *http.Request) *http.Response + "github.com/stretchr/testify/require" -func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { - return f(req), nil -} + "github.com/infobloxopen/bloxone-go-client/internal" + openapiclient "github.com/infobloxopen/bloxone-go-client/keys" +) -func NewTestClient(fn RoundTripFunc) *http.Client { - return &http.Client{ - Transport: RoundTripFunc(fn), - } +var KeysTSIGKey_Post = openapiclient.KeysTSIGKey{ + Id: openapiclient.PtrString("KeysTsigPost"), +} +var KeysTSIGKey_Patch = openapiclient.KeysTSIGKey{ + Id: openapiclient.PtrString("KeysTsigPatch"), } func Test_keys_TsigAPIService(t *testing.T) { + t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - } configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KeysTSIGKey_Post, reqBody) - response := openapiclient.KeysCreateTSIGKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysCreateTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(dummyKey).Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(KeysTSIGKey_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) + }) + + t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), *KeysTSIGKey_Post.Id).Execute() + require.Nil(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigList", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) require.Equal(t, "/api/ddi/v1/keys/tsig", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysListTSIGKeyResponse{ - Results: []openapiclient.KeysTSIGKey{ - { - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - }, - }, - } + response := openapiclient.KeysListTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.TsigAPI.TsigList(context.Background()).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) - require.NotEmpty(t, resp.Results) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test TsigAPIService TsigRead", func(t *testing.T) { configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "GET", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Post.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) - response := openapiclient.KeysListTSIGKeyResponse{ - Results: []openapiclient.KeysTSIGKey{ - { - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - }, - }, - } + response := openapiclient.KeysReadTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), "dummyKey36").Execute() - + resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), *KeysTSIGKey_Post.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) + t.Run("Test TsigAPIService TsigUpdate", func(t *testing.T) { - dummyKey := openapiclient.KeysTSIGKey{ - Algorithm: openapiclient.PtrString("hmac_sha256"), - Name: "dummyKey36", - Secret: "XOJvQkcX6Og0CHFg+rQ27pqAB+EhSjVoI4Bs/JWegBc=", - } configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "PATCH", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Patch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.KeysTSIGKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyKey, reqBody) + require.Equal(t, KeysTSIGKey_Patch, reqBody) - response := openapiclient.KeysUpdateTSIGKeyResponse{ - Result: &dummyKey, - } + response := openapiclient.KeysUpdateTSIGKeyResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) apiClient := openapiclient.NewAPIClient(configuration) - updateRequest := apiClient.TsigAPI.TsigUpdate(context.Background(), "dummyKey36").Body(dummyKey) - resp, httpRes, err := updateRequest.Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigUpdate(context.Background(), *KeysTSIGKey_Patch.Id).Body(KeysTSIGKey_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test TsigAPIService TsigDelete", func(t *testing.T) { - configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "DELETE", req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/dummyKey36", req.URL.Path) - return &http.Response{ - StatusCode: 204, - Body: io.NopCloser(bytes.NewReader([]byte{})), - Header: make(http.Header), - } - }) - apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), "dummyKey36").Execute() - require.Nil(t, err) - require.Equal(t, 204, httpRes.StatusCode) - }) } diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index 65676c8..a42a744 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -23,63 +23,40 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) +var UploadRequest_Post = openapiclient.UploadRequest{ + Comment: openapiclient.PtrString("Upload Request"), + Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 + Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type +} + func Test_keys_UploadAPIService(t *testing.T) { t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { - // Assuming that UploadRequest is the request body type for the UploadUpload API - dummyRequest := openapiclient.UploadRequest{ - Comment: openapiclient.PtrString("This is a test upload"), - Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 - //Fields: &openapiclient.ProtobufFieldMask{}, // Fill this as per your requirements - //Tags: map[string]interface{}{ - // "tag1": "value1", - // "tag2": "value2", - //}, - Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type - } - configuration := internal.NewConfiguration() - configuration.HTTPClient = NewTestClient(func(req *http.Request) *http.Response { - require.Equal(t, "POST", req.Method) + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) require.Equal(t, "/api/ddi/v1/keys/upload", req.URL.Path) - require.Equal(t, "application/json", req.Header.Get("Accept")) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + var reqBody openapiclient.UploadRequest require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dummyRequest, reqBody) + require.Equal(t, UploadRequest_Post, reqBody) - response := openapiclient.DdiuploadResponse{ - KerberosKeys: &openapiclient.KerberosKeys{ - Items: []openapiclient.KerberosKey{ - { - Algorithm: openapiclient.PtrString("aes256-cts-hmac-sha1-96"), - Comment: openapiclient.PtrString("This is a test Kerberos key"), - Domain: openapiclient.PtrString("example.com"), - Id: openapiclient.PtrString("123"), - //Principal: openapiclient.PtrString("test_principal"), - //Tags: map[string]interface{}{"tag1": "value1", "tag2": "value2"}, - //UploadedAt: openapiclient.PtrString("2022-01-01T00:00:00Z"), - //Version: openapiclient.PtrInt64(1), - }, - }, - }, - Warning: openapiclient.PtrString("This is a test warning"), - } + response := openapiclient.DdiuploadResponse{} body, err := json.Marshal(response) require.NoError(t, err) + return &http.Response{ - StatusCode: 200, + StatusCode: http.StatusOK, Body: io.NopCloser(bytes.NewReader(body)), - Header: map[string][]string{ - "Content-Type": {"application/json"}, - }, + Header: map[string][]string{"Content-Type": {"application/json"}}, } }) - apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(dummyRequest).Execute() + resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(UploadRequest_Post).Execute() require.Nil(t, err) require.NotNil(t, resp) - require.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/keys/utils.go b/keys/utils.go index 9d1e0fd..51922c8 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ From bc41d39d8cee92b72bd8f3a7d3f0be665a4b29d0 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Tue, 27 Feb 2024 14:33:39 -0800 Subject: [PATCH 11/18] Tests --- ipam/.openapi-generator-ignore | 3 +++ keys/.openapi-generator-ignore | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ipam/.openapi-generator-ignore b/ipam/.openapi-generator-ignore index 7484ee5..9d89018 100644 --- a/ipam/.openapi-generator-ignore +++ b/ipam/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +*.go +*.md +!api*test.go diff --git a/keys/.openapi-generator-ignore b/keys/.openapi-generator-ignore index 7484ee5..9d89018 100644 --- a/keys/.openapi-generator-ignore +++ b/keys/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +*.go +*.md +!api*test.go From f87b1f083440f5879adbffbc33558a38030b26bf Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Tue, 27 Feb 2024 16:41:05 -0800 Subject: [PATCH 12/18] Unit Tests For Keys, DNS With Generator Working at version 7.3.0 - Unit tests for keys and dns completed, with generator upgraded to 7.3.0 - Ran go fmt ./..., but the equivalence make fmt failed --- dns_config/.openapi-generator-ignore | 3 - dns_config/.openapi-generator/FILES | 126 ++++++++ dns_config/api_acl.go | 81 +++-- dns_config/api_auth_nsg.go | 81 +++-- dns_config/api_auth_zone.go | 93 +++--- dns_config/api_cache_flush.go | 12 +- dns_config/api_convert_domain_name.go | 2 + dns_config/api_convert_rname.go | 2 + dns_config/api_delegation.go | 81 +++-- dns_config/api_forward_nsg.go | 81 +++-- dns_config/api_forward_zone.go | 93 +++--- dns_config/api_global.go | 52 ++-- dns_config/api_host.go | 48 ++- dns_config/api_lbdn.go | 25 +- dns_config/api_server.go | 81 +++-- dns_config/api_view.go | 95 +++--- dns_config/docs/ConfigForwarder.md | 9 +- dns_config/model_config_forwarder.go | 36 +-- dns_data/.openapi-generator/FILES | 1 - dns_data/api_record.go | 283 +++++++++--------- dns_data/model_data_create_record_response.go | 6 +- dns_data/model_data_list_record_response.go | 6 +- dns_data/model_data_read_record_response.go | 6 +- dns_data/model_data_record_inheritance.go | 6 +- ...model_data_soa_serial_increment_request.go | 6 +- ...odel_data_soa_serial_increment_response.go | 6 +- dns_data/model_data_update_record_response.go | 6 +- .../model_inheritance2_inherited_u_int32.go | 6 +- dns_data/model_protobuf_field_mask.go | 6 +- infra_mgmt/api_detail.go | 4 + infra_mgmt/api_hosts.go | 115 ++++--- infra_mgmt/api_services.go | 83 +++-- infra_provision/api_ui_join_token.go | 52 ++-- infra_provision/api_uicsr.go | 42 ++- ipam/.openapi-generator-ignore | 3 - ipam/api_address.go | 81 +++-- ipam/api_address_block.go | 179 +++++------ ipam/api_asm.go | 40 +-- ipam/api_dhcp_host.go | 50 ++-- ipam/api_dns_usage.go | 4 + ipam/api_filter.go | 2 + ipam/api_fixed_address.go | 81 +++-- ipam/api_global.go | 52 ++-- ipam/api_ha_group.go | 73 ++--- ipam/api_hardware_filter.go | 81 +++-- ipam/api_ip_space.go | 115 ++++--- ipam/api_ipam_host.go | 81 +++-- ipam/api_leases_command.go | 12 +- ipam/api_option_code.go | 65 ++-- ipam/api_option_filter.go | 81 +++-- ipam/api_option_group.go | 81 +++-- ipam/api_option_space.go | 81 +++-- ipam/api_range.go | 109 ++++--- ipam/api_server.go | 81 +++-- ipam/api_subnet.go | 123 ++++---- keys/.openapi-generator-ignore | 3 - keys/.openapi-generator/FILES | 1 - keys/api_generate_tsig.go | 36 +-- keys/api_kerberos.go | 55 ++-- keys/api_tsig.go | 230 +++++++------- keys/api_upload.go | 44 ++- keys/client.go | 14 +- keys/model_ddiupload_response.go | 6 +- keys/model_kerberos_key.go | 6 +- keys/model_kerberos_keys.go | 6 +- keys/model_keys_create_tsig_key_response.go | 6 +- keys/model_keys_generate_tsig_response.go | 6 +- keys/model_keys_generate_tsig_result.go | 6 +- keys/model_keys_list_kerberos_key_response.go | 6 +- keys/model_keys_list_tsig_key_response.go | 6 +- keys/model_keys_read_kerberos_key_response.go | 6 +- keys/model_keys_read_tsig_key_response.go | 6 +- keys/model_keys_tsig_key.go | 2 - ...model_keys_update_kerberos_key_response.go | 6 +- keys/model_keys_update_tsig_key_response.go | 6 +- keys/model_protobuf_field_mask.go | 6 +- keys/model_upload_content_type.go | 5 +- keys/utils.go | 2 +- 78 files changed, 1781 insertions(+), 1799 deletions(-) diff --git a/dns_config/.openapi-generator-ignore b/dns_config/.openapi-generator-ignore index 9d89018..7484ee5 100644 --- a/dns_config/.openapi-generator-ignore +++ b/dns_config/.openapi-generator-ignore @@ -21,6 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -*.go -*.md -!api*test.go diff --git a/dns_config/.openapi-generator/FILES b/dns_config/.openapi-generator/FILES index 4279035..c1b1372 100644 --- a/dns_config/.openapi-generator/FILES +++ b/dns_config/.openapi-generator/FILES @@ -1,3 +1,19 @@ +README.md +api_acl.go +api_auth_nsg.go +api_auth_zone.go +api_cache_flush.go +api_convert_domain_name.go +api_convert_rname.go +api_delegation.go +api_forward_nsg.go +api_forward_zone.go +api_global.go +api_host.go +api_lbdn.go +api_server.go +api_view.go +client.go docs/AclAPI.md docs/AuthNsgAPI.md docs/AuthZoneAPI.md @@ -121,3 +137,113 @@ docs/Inheritance2InheritedUInt32.md docs/LbdnAPI.md docs/ServerAPI.md docs/ViewAPI.md +model_auth_zone_external_provider.go +model_config_acl.go +model_config_acl_item.go +model_config_auth_nsg.go +model_config_auth_zone.go +model_config_auth_zone_config.go +model_config_auth_zone_inheritance.go +model_config_bulk_copy_error.go +model_config_bulk_copy_response.go +model_config_bulk_copy_view.go +model_config_cache_flush.go +model_config_convert_domain_name.go +model_config_convert_domain_name_response.go +model_config_convert_r_name_response.go +model_config_copy_auth_zone.go +model_config_copy_auth_zone_response.go +model_config_copy_forward_zone.go +model_config_copy_forward_zone_response.go +model_config_copy_response.go +model_config_create_acl_response.go +model_config_create_auth_nsg_response.go +model_config_create_auth_zone_response.go +model_config_create_delegation_response.go +model_config_create_forward_nsg_response.go +model_config_create_forward_zone_response.go +model_config_create_lbdn_response.go +model_config_create_server_response.go +model_config_create_view_response.go +model_config_custom_root_ns_block.go +model_config_delegation.go +model_config_delegation_server.go +model_config_display_view.go +model_config_dnssec_validation_block.go +model_config_dtc_config.go +model_config_dtc_policy.go +model_config_ecs_block.go +model_config_ecs_zone.go +model_config_external_primary.go +model_config_external_secondary.go +model_config_forward_nsg.go +model_config_forward_zone.go +model_config_forward_zone_config.go +model_config_forwarder.go +model_config_forwarders_block.go +model_config_global.go +model_config_host.go +model_config_host_associated_server.go +model_config_host_inheritance.go +model_config_inherited_acl_items.go +model_config_inherited_custom_root_ns_block.go +model_config_inherited_dnssec_validation_block.go +model_config_inherited_dtc_config.go +model_config_inherited_ecs_block.go +model_config_inherited_forwarders_block.go +model_config_inherited_kerberos_keys.go +model_config_inherited_sort_list_items.go +model_config_inherited_zone_authority.go +model_config_inherited_zone_authority_m_name_block.go +model_config_internal_secondary.go +model_config_kerberos_key.go +model_config_lbdn.go +model_config_list_acl_response.go +model_config_list_auth_nsg_response.go +model_config_list_auth_zone_response.go +model_config_list_delegation_response.go +model_config_list_forward_nsg_response.go +model_config_list_forward_zone_response.go +model_config_list_host_response.go +model_config_list_lbdn_response.go +model_config_list_server_response.go +model_config_list_view_response.go +model_config_read_acl_response.go +model_config_read_auth_nsg_response.go +model_config_read_auth_zone_response.go +model_config_read_delegation_response.go +model_config_read_forward_nsg_response.go +model_config_read_forward_zone_response.go +model_config_read_global_response.go +model_config_read_host_response.go +model_config_read_lbdn_response.go +model_config_read_server_response.go +model_config_read_view_response.go +model_config_root_ns.go +model_config_server.go +model_config_server_inheritance.go +model_config_sort_list_item.go +model_config_trust_anchor.go +model_config_tsig_key.go +model_config_ttl_inheritance.go +model_config_update_acl_response.go +model_config_update_auth_nsg_response.go +model_config_update_auth_zone_response.go +model_config_update_delegation_response.go +model_config_update_forward_nsg_response.go +model_config_update_forward_zone_response.go +model_config_update_global_response.go +model_config_update_host_response.go +model_config_update_lbdn_response.go +model_config_update_server_response.go +model_config_update_view_response.go +model_config_view.go +model_config_view_inheritance.go +model_config_warning.go +model_config_zone_authority.go +model_config_zone_authority_m_name_block.go +model_inheritance2_assigned_host.go +model_inheritance2_inherited_bool.go +model_inheritance2_inherited_string.go +model_inheritance2_inherited_u_int32.go +utils.go diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index c06e786..a6ee629 100644 --- a/dns_config/api_acl.go +++ b/dns_config/api_acl.go @@ -22,72 +22,77 @@ import ( ) type AclAPI interface { + /* - AclCreate Create the ACL object. + AclCreate Create the ACL object. - Use this method to create an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to create an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ AclCreate(ctx context.Context) ApiAclCreateRequest // AclCreateExecute executes the request // @return ConfigCreateACLResponse AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) + /* - AclDelete Move the ACL object to Recyclebin. + AclDelete Move the ACL object to Recyclebin. - Use this method to move an ACL object to Recyclebin. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to move an ACL object to Recyclebin. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ AclDelete(ctx context.Context, id string) ApiAclDeleteRequest // AclDeleteExecute executes the request AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) + /* - AclList List ACL objects. + AclList List ACL objects. - Use this method to list ACL objects. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to list ACL objects. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ AclList(ctx context.Context) ApiAclListRequest // AclListExecute executes the request // @return ConfigListACLResponse AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) + /* - AclRead Read the ACL object. + AclRead Read the ACL object. - Use this method to read an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to read an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ AclRead(ctx context.Context, id string) ApiAclReadRequest // AclReadExecute executes the request // @return ConfigReadACLResponse AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) + /* - AclUpdate Update the ACL object. + AclUpdate Update the ACL object. - Use this method to update an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to update an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest @@ -172,14 +177,6 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLRespo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLRespo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateAC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_auth_nsg.go b/dns_config/api_auth_nsg.go index d2ed1ca..87ac335 100644 --- a/dns_config/api_auth_nsg.go +++ b/dns_config/api_auth_nsg.go @@ -22,72 +22,77 @@ import ( ) type AuthNsgAPI interface { + /* - AuthNsgCreate Create the AuthNSG object. + AuthNsgCreate Create the AuthNSG object. - Use this method to create an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to create an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest // AuthNsgCreateExecute executes the request // @return ConfigCreateAuthNSGResponse AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) + /* - AuthNsgDelete Move the AuthNSG object to Recyclebin. + AuthNsgDelete Move the AuthNSG object to Recyclebin. - Use this method to move an AuthNSG object to Recyclebin. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to move an AuthNSG object to Recyclebin. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest // AuthNsgDeleteExecute executes the request AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) + /* - AuthNsgList List AuthNSG objects. + AuthNsgList List AuthNSG objects. - Use this method to list AuthNSG objects. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to list AuthNSG objects. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ AuthNsgList(ctx context.Context) ApiAuthNsgListRequest // AuthNsgListExecute executes the request // @return ConfigListAuthNSGResponse AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) + /* - AuthNsgRead Read the AuthNSG object. + AuthNsgRead Read the AuthNSG object. - Use this method to read an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to read an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest // AuthNsgReadExecute executes the request // @return ConfigReadAuthNSGResponse AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) + /* - AuthNsgUpdate Update the AuthNSG object. + AuthNsgUpdate Update the AuthNSG object. - Use this method to update an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to update an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest @@ -172,14 +177,6 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*Config newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*Config newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*Co newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_auth_zone.go b/dns_config/api_auth_zone.go index c95502a..7399faf 100644 --- a/dns_config/api_auth_zone.go +++ b/dns_config/api_auth_zone.go @@ -22,86 +22,92 @@ import ( ) type AuthZoneAPI interface { + /* - AuthZoneCopy Copies the __AuthZone__ object. + AuthZoneCopy Copies the __AuthZone__ object. - Use this method to copy an __AuthZone__ object to a different __View__. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to copy an __AuthZone__ object to a different __View__. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest // AuthZoneCopyExecute executes the request // @return ConfigCopyAuthZoneResponse AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) + /* - AuthZoneCreate Create the AuthZone object. + AuthZoneCreate Create the AuthZone object. - Use this method to create an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to create an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest // AuthZoneCreateExecute executes the request // @return ConfigCreateAuthZoneResponse AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) + /* - AuthZoneDelete Moves the AuthZone object to Recyclebin. + AuthZoneDelete Moves the AuthZone object to Recyclebin. - Use this method to move an AuthZone object to Recyclebin. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to move an AuthZone object to Recyclebin. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest // AuthZoneDeleteExecute executes the request AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) + /* - AuthZoneList List AuthZone objects. + AuthZoneList List AuthZone objects. - Use this method to list AuthZone objects. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to list AuthZone objects. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ AuthZoneList(ctx context.Context) ApiAuthZoneListRequest // AuthZoneListExecute executes the request // @return ConfigListAuthZoneResponse AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) + /* - AuthZoneRead Read the AuthZone object. + AuthZoneRead Read the AuthZone object. - Use this method to read an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to read an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest // AuthZoneReadExecute executes the request // @return ConfigReadAuthZoneResponse AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) + /* - AuthZoneUpdate Update the AuthZone object. + AuthZoneUpdate Update the AuthZone object. - Use this method to update an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to update an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest @@ -229,6 +235,7 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -315,14 +322,6 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -366,6 +365,7 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -668,6 +668,7 @@ func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -800,6 +801,7 @@ func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -890,14 +892,6 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -941,5 +935,6 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_cache_flush.go b/dns_config/api_cache_flush.go index f3ca335..5d107ae 100644 --- a/dns_config/api_cache_flush.go +++ b/dns_config/api_cache_flush.go @@ -21,14 +21,15 @@ import ( ) type CacheFlushAPI interface { + /* - CacheFlushCreate Create the Cache Flush object. + CacheFlushCreate Create the Cache Flush object. - Use this method to create a Cache Flush object. - The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. + Use this method to create a Cache Flush object. + The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest @@ -156,5 +157,6 @@ func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_convert_domain_name.go b/dns_config/api_convert_domain_name.go index cc1d7af..3c9e5b0 100644 --- a/dns_config/api_convert_domain_name.go +++ b/dns_config/api_convert_domain_name.go @@ -22,6 +22,7 @@ import ( ) type ConvertDomainNameAPI interface { + /* ConvertDomainNameConvert Convert the object. @@ -149,5 +150,6 @@ func (a *ConvertDomainNameAPIService) ConvertDomainNameConvertExecute(r ApiConve newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_convert_rname.go b/dns_config/api_convert_rname.go index e15f007..317d931 100644 --- a/dns_config/api_convert_rname.go +++ b/dns_config/api_convert_rname.go @@ -22,6 +22,7 @@ import ( ) type ConvertRnameAPI interface { + /* ConvertRnameConvertRName Convert the object. @@ -149,5 +150,6 @@ func (a *ConvertRnameAPIService) ConvertRnameConvertRNameExecute(r ApiConvertRna newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_delegation.go b/dns_config/api_delegation.go index 1aae7b6..3599ee3 100644 --- a/dns_config/api_delegation.go +++ b/dns_config/api_delegation.go @@ -22,72 +22,77 @@ import ( ) type DelegationAPI interface { + /* - DelegationCreate Create the Delegation object. + DelegationCreate Create the Delegation object. - Use this method to create a Delegation object. - This object (_dns/delegation_) represents a zone delegation. + Use this method to create a Delegation object. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ DelegationCreate(ctx context.Context) ApiDelegationCreateRequest // DelegationCreateExecute executes the request // @return ConfigCreateDelegationResponse DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) + /* - DelegationDelete Moves the Delegation object to Recyclebin. + DelegationDelete Moves the Delegation object to Recyclebin. - Use this method to move a Delegation object to Recyclebin. - This object (_dns/delegation_) represents a zone delegation. + Use this method to move a Delegation object to Recyclebin. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest // DelegationDeleteExecute executes the request DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) + /* - DelegationList List Delegation objects. + DelegationList List Delegation objects. - Use this method to list Delegation objects. - This object (_dns/delegation_) represents a zone delegation. + Use this method to list Delegation objects. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ DelegationList(ctx context.Context) ApiDelegationListRequest // DelegationListExecute executes the request // @return ConfigListDelegationResponse DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) + /* - DelegationRead Read the Delegation object. + DelegationRead Read the Delegation object. - Use this method to read a Delegation object. - This object (_dns/delegation)_ represents a zone delegation. + Use this method to read a Delegation object. + This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest // DelegationReadExecute executes the request // @return ConfigReadDelegationResponse DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) + /* - DelegationUpdate Update the Delegation object. + DelegationUpdate Update the Delegation object. - Use this method to update a Delegation object. - This object (_dns/delegation_) represents a zone delegation. + Use this method to update a Delegation object. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest @@ -172,14 +177,6 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_forward_nsg.go b/dns_config/api_forward_nsg.go index 8d33d4b..b27a0ea 100644 --- a/dns_config/api_forward_nsg.go +++ b/dns_config/api_forward_nsg.go @@ -22,72 +22,77 @@ import ( ) type ForwardNsgAPI interface { + /* - ForwardNsgCreate Create the ForwardNSG object. + ForwardNsgCreate Create the ForwardNSG object. - Use this method to create a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to create a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest // ForwardNsgCreateExecute executes the request // @return ConfigCreateForwardNSGResponse ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) + /* - ForwardNsgDelete Move the ForwardNSG object to Recyclebin. + ForwardNsgDelete Move the ForwardNSG object to Recyclebin. - Use this method to move a ForwardNSG object to Recyclebin. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to move a ForwardNSG object to Recyclebin. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest // ForwardNsgDeleteExecute executes the request ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) + /* - ForwardNsgList List ForwardNSG objects. + ForwardNsgList List ForwardNSG objects. - Use this method to list ForwardNSG objects. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to list ForwardNSG objects. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest // ForwardNsgListExecute executes the request // @return ConfigListForwardNSGResponse ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) + /* - ForwardNsgRead Read the ForwardNSG object. + ForwardNsgRead Read the ForwardNSG object. - Use this method to read a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to read a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest // ForwardNsgReadExecute executes the request // @return ConfigReadForwardNSGResponse ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) + /* - ForwardNsgUpdate Update the ForwardNSG object. + ForwardNsgUpdate Update the ForwardNSG object. - Use this method to update a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to update a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest @@ -172,14 +177,6 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_forward_zone.go b/dns_config/api_forward_zone.go index 762417b..050208e 100644 --- a/dns_config/api_forward_zone.go +++ b/dns_config/api_forward_zone.go @@ -22,86 +22,92 @@ import ( ) type ForwardZoneAPI interface { + /* - ForwardZoneCopy Copies the __ForwardZone__ object. + ForwardZoneCopy Copies the __ForwardZone__ object. - Use this method to copy an __ForwardZone__ object to a different __View__. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to copy an __ForwardZone__ object to a different __View__. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest // ForwardZoneCopyExecute executes the request // @return ConfigCopyForwardZoneResponse ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) + /* - ForwardZoneCreate Create the ForwardZone object. + ForwardZoneCreate Create the ForwardZone object. - Use this method to create a ForwardZone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to create a ForwardZone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest // ForwardZoneCreateExecute executes the request // @return ConfigCreateForwardZoneResponse ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) + /* - ForwardZoneDelete Move the Forward Zone object to Recyclebin. + ForwardZoneDelete Move the Forward Zone object to Recyclebin. - Use this method to move a Forward Zone object to Recyclebin. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to move a Forward Zone object to Recyclebin. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest // ForwardZoneDeleteExecute executes the request ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) + /* - ForwardZoneList List Forward Zone objects. + ForwardZoneList List Forward Zone objects. - Use this method to list Forward Zone objects. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to list Forward Zone objects. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest // ForwardZoneListExecute executes the request // @return ConfigListForwardZoneResponse ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) + /* - ForwardZoneRead Read the Forward Zone object. + ForwardZoneRead Read the Forward Zone object. - Use this method to read a Forward Zone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to read a Forward Zone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest // ForwardZoneReadExecute executes the request // @return ConfigReadForwardZoneResponse ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) + /* - ForwardZoneUpdate Update the Forward Zone object. + ForwardZoneUpdate Update the Forward Zone object. - Use this method to update a Forward Zone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to update a Forward Zone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest @@ -229,6 +235,7 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -305,14 +312,6 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -356,6 +355,7 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -648,6 +648,7 @@ func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -770,6 +771,7 @@ func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -850,14 +852,6 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -901,5 +895,6 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_global.go b/dns_config/api_global.go index 736b322..0c98b92 100644 --- a/dns_config/api_global.go +++ b/dns_config/api_global.go @@ -22,58 +22,62 @@ import ( ) type GlobalAPI interface { + /* - GlobalRead Read the Global configuration object. + GlobalRead Read the Global configuration object. - Use this method to read the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest // GlobalReadExecute executes the request // @return ConfigReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) + /* - GlobalRead2 Read the Global configuration object. + GlobalRead2 Read the Global configuration object. - Use this method to read the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request // GlobalRead2Execute executes the request // @return ConfigReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) + /* - GlobalUpdate Update the Global configuration object. + GlobalUpdate Update the Global configuration object. - Use this method to update the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest // GlobalUpdateExecute executes the request // @return ConfigUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) + /* - GlobalUpdate2 Update the Global configuration object. + GlobalUpdate2 Update the Global configuration object. - Use this method to update the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request @@ -200,6 +204,7 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigRea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -322,6 +327,7 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -441,6 +447,7 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -564,5 +571,6 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_host.go b/dns_config/api_host.go index fbef892..5a21638 100644 --- a/dns_config/api_host.go +++ b/dns_config/api_host.go @@ -22,44 +22,47 @@ import ( ) type HostAPI interface { + /* - HostList List DNS Host objects. + HostList List DNS Host objects. - Use this method to list DNS Host objects. - A DNS Host object associates DNS configuration with hosts. + Use this method to list DNS Host objects. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ HostList(ctx context.Context) ApiHostListRequest // HostListExecute executes the request // @return ConfigListHostResponse HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) + /* - HostRead Read the DNS Host object. + HostRead Read the DNS Host object. - Use this method to read a DNS Host object. - A DNS Host object associates DNS configuration with hosts. + Use this method to read a DNS Host object. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ HostRead(ctx context.Context, id string) ApiHostReadRequest // HostReadExecute executes the request // @return ConfigReadHostResponse HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) + /* - HostUpdate Update the DNS Host object. + HostUpdate Update the DNS Host object. - Use this method to update a DNS Host object. - A DNS Host object associates DNS configuration with hosts. + Use this method to update a DNS Host object. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest @@ -266,6 +269,7 @@ func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -398,6 +402,7 @@ func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -488,14 +493,6 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -539,5 +536,6 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_lbdn.go b/dns_config/api_lbdn.go index 33c2318..964f9a3 100644 --- a/dns_config/api_lbdn.go +++ b/dns_config/api_lbdn.go @@ -22,6 +22,7 @@ import ( ) type LbdnAPI interface { + /* LbdnCreate Create the __LBDN__ object. @@ -35,6 +36,7 @@ type LbdnAPI interface { // LbdnCreateExecute executes the request // @return ConfigCreateLBDNResponse LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) + /* LbdnDelete Delete the __LBDN__ object. @@ -48,6 +50,7 @@ type LbdnAPI interface { // LbdnDeleteExecute executes the request LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Response, error) + /* LbdnList List __LBDN__ objects. @@ -61,6 +64,7 @@ type LbdnAPI interface { // LbdnListExecute executes the request // @return ConfigListLBDNResponse LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) + /* LbdnRead Read the __LBDN__ object. @@ -75,6 +79,7 @@ type LbdnAPI interface { // LbdnReadExecute executes the request // @return ConfigReadLBDNResponse LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) + /* LbdnUpdate Update the __LBDN__ object. @@ -166,14 +171,6 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -217,6 +214,7 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -507,6 +505,7 @@ func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -628,6 +627,7 @@ func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -707,14 +707,6 @@ func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -758,5 +750,6 @@ func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_server.go b/dns_config/api_server.go index f759fa5..e6474e3 100644 --- a/dns_config/api_server.go +++ b/dns_config/api_server.go @@ -22,72 +22,77 @@ import ( ) type ServerAPI interface { + /* - ServerCreate Create the Server object. + ServerCreate Create the Server object. - Use this method to create a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest // ServerCreateExecute executes the request // @return ConfigCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) + /* - ServerDelete Move the Server object to Recyclebin. + ServerDelete Move the Server object to Recyclebin. - Use this method to move a Server object to Recyclebin. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a Server object to Recyclebin. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) + /* - ServerList List Server objects. + ServerList List Server objects. - Use this method to list Server objects. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to list Server objects. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest // ServerListExecute executes the request // @return ConfigListServerResponse ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) + /* - ServerRead Read the Server object. + ServerRead Read the Server object. - Use this method to read a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to read a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest // ServerReadExecute executes the request // @return ConfigReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) + /* - ServerUpdate Update the Server object. + ServerUpdate Update the Server object. - Use this method to update a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest @@ -182,14 +187,6 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -233,6 +230,7 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -535,6 +533,7 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigLis newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -667,6 +666,7 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigRea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -757,14 +757,6 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -808,5 +800,6 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_view.go b/dns_config/api_view.go index 5bd8d32..7ae3fe4 100644 --- a/dns_config/api_view.go +++ b/dns_config/api_view.go @@ -22,87 +22,93 @@ import ( ) type ViewAPI interface { + /* - ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. + ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. - Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. - The __AuthZone__ object represents an authoritative zone. - The __ForwardZone__ object represents a forwarding zone. + Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. + The __AuthZone__ object represents an authoritative zone. + The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest // ViewBulkCopyExecute executes the request // @return ConfigBulkCopyResponse ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) + /* - ViewCreate Create the View object. + ViewCreate Create the View object. - Use this method to create a View object. - Named collection of DNS View settings. + Use this method to create a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ ViewCreate(ctx context.Context) ApiViewCreateRequest // ViewCreateExecute executes the request // @return ConfigCreateViewResponse ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) + /* - ViewDelete Move the View object to Recyclebin. + ViewDelete Move the View object to Recyclebin. - Use this method to move a View object to Recyclebin. - Named collection of DNS View settings. + Use this method to move a View object to Recyclebin. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest // ViewDeleteExecute executes the request ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) + /* - ViewList List View objects. + ViewList List View objects. - Use this method to list View objects. - Named collection of DNS View settings. + Use this method to list View objects. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ ViewList(ctx context.Context) ApiViewListRequest // ViewListExecute executes the request // @return ConfigListViewResponse ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) + /* - ViewRead Read the View object. + ViewRead Read the View object. - Use this method to read a View object. - Named collection of DNS View settings. + Use this method to read a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ ViewRead(ctx context.Context, id string) ApiViewReadRequest // ViewReadExecute executes the request // @return ConfigReadViewResponse ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) + /* - ViewUpdate Update the View object. + ViewUpdate Update the View object. - Use this method to update a View object. - Named collection of DNS View settings. + Use this method to update a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest @@ -231,6 +237,7 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -317,14 +324,6 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -368,6 +367,7 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -670,6 +670,7 @@ func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -802,6 +803,7 @@ func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -892,14 +894,6 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -943,5 +937,6 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/docs/ConfigForwarder.md b/dns_config/docs/ConfigForwarder.md index 2304007..6394250 100644 --- a/dns_config/docs/ConfigForwarder.md +++ b/dns_config/docs/ConfigForwarder.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Address** | **string** | Server IP address. | -**Fqdn** | Pointer to **string** | Server FQDN. | [optional] +**Fqdn** | **string** | Server FQDN. | **ProtocolFqdn** | Pointer to **string** | Server FQDN in punycode. | [optional] [readonly] ## Methods ### NewConfigForwarder -`func NewConfigForwarder(address string, ) *ConfigForwarder` +`func NewConfigForwarder(address string, fqdn string, ) *ConfigForwarder` NewConfigForwarder instantiates a new ConfigForwarder object This constructor will assign default values to properties that have it defined, @@ -66,11 +66,6 @@ and a boolean to check if the value has been set. SetFqdn sets Fqdn field to given value. -### HasFqdn - -`func (o *ConfigForwarder) HasFqdn() bool` - -HasFqdn returns a boolean if a field has been set. ### GetProtocolFqdn diff --git a/dns_config/model_config_forwarder.go b/dns_config/model_config_forwarder.go index 2a455ee..236ecc6 100644 --- a/dns_config/model_config_forwarder.go +++ b/dns_config/model_config_forwarder.go @@ -24,7 +24,7 @@ type ConfigForwarder struct { // Server IP address. Address string `json:"address"` // Server FQDN. - Fqdn *string `json:"fqdn,omitempty"` + Fqdn string `json:"fqdn"` // Server FQDN in punycode. ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } @@ -35,9 +35,10 @@ type _ConfigForwarder ConfigForwarder // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewConfigForwarder(address string) *ConfigForwarder { +func NewConfigForwarder(address string, fqdn string) *ConfigForwarder { this := ConfigForwarder{} this.Address = address + this.Fqdn = fqdn return &this } @@ -73,36 +74,28 @@ func (o *ConfigForwarder) SetAddress(v string) { o.Address = v } -// GetFqdn returns the Fqdn field value if set, zero value otherwise. +// GetFqdn returns the Fqdn field value func (o *ConfigForwarder) GetFqdn() string { - if o == nil || IsNil(o.Fqdn) { + if o == nil { var ret string return ret } - return *o.Fqdn + + return o.Fqdn } -// GetFqdnOk returns a tuple with the Fqdn field value if set, nil otherwise +// GetFqdnOk returns a tuple with the Fqdn field value // and a boolean to check if the value has been set. func (o *ConfigForwarder) GetFqdnOk() (*string, bool) { - if o == nil || IsNil(o.Fqdn) { + if o == nil { return nil, false } - return o.Fqdn, true -} - -// HasFqdn returns a boolean if a field has been set. -func (o *ConfigForwarder) HasFqdn() bool { - if o != nil && !IsNil(o.Fqdn) { - return true - } - - return false + return &o.Fqdn, true } -// SetFqdn gets a reference to the given string and assigns it to the Fqdn field. +// SetFqdn sets field value func (o *ConfigForwarder) SetFqdn(v string) { - o.Fqdn = &v + o.Fqdn = v } // GetProtocolFqdn returns the ProtocolFqdn field value if set, zero value otherwise. @@ -148,9 +141,7 @@ func (o ConfigForwarder) MarshalJSON() ([]byte, error) { func (o ConfigForwarder) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["address"] = o.Address - if !IsNil(o.Fqdn) { - toSerialize["fqdn"] = o.Fqdn - } + toSerialize["fqdn"] = o.Fqdn if !IsNil(o.ProtocolFqdn) { toSerialize["protocol_fqdn"] = o.ProtocolFqdn } @@ -163,6 +154,7 @@ func (o *ConfigForwarder) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "address", + "fqdn", } allProperties := make(map[string]interface{}) diff --git a/dns_data/.openapi-generator/FILES b/dns_data/.openapi-generator/FILES index 0c87762..606c946 100644 --- a/dns_data/.openapi-generator/FILES +++ b/dns_data/.openapi-generator/FILES @@ -22,5 +22,4 @@ model_data_soa_serial_increment_response.go model_data_update_record_response.go model_inheritance2_inherited_u_int32.go model_protobuf_field_mask.go -test/api_record_test.go utils.go diff --git a/dns_data/api_record.go b/dns_data/api_record.go index 3caac75..e6f6b3d 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,92 +18,97 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type RecordAPI interface { + /* - RecordCreate Create the DNS resource record. + RecordCreate Create the DNS resource record. - Use this method to create a DNS __Record__ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to create a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ RecordCreate(ctx context.Context) ApiRecordCreateRequest // RecordCreateExecute executes the request // @return DataCreateRecordResponse RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) + /* - RecordDelete Move the DNS resource record to recycle bin. + RecordDelete Move the DNS resource record to recycle bin. - Use this method to move a DNS __Record__ object to the recycle bin. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to move a DNS __Record__ object to the recycle bin. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest // RecordDeleteExecute executes the request RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) + /* - RecordList Retrieve DNS resource records. + RecordList Retrieve DNS resource records. - Use this method to retrieve DNS __Record__ objects. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve DNS __Record__ objects. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ RecordList(ctx context.Context) ApiRecordListRequest // RecordListExecute executes the request // @return DataListRecordResponse RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) + /* - RecordRead Retrieve the DNS resource record. + RecordRead Retrieve the DNS resource record. - Use this method to retrieve a DNS __Record__ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ RecordRead(ctx context.Context, id string) ApiRecordReadRequest // RecordReadExecute executes the request // @return DataReadRecordResponse RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) + /* - RecordSOASerialIncrement Increment serial number for the SOA record. + RecordSOASerialIncrement Increment serial number for the SOA record. - Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest // RecordSOASerialIncrementExecute executes the request // @return DataSOASerialIncrementResponse RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) + /* - RecordUpdate Update the DNS resource record. + RecordUpdate Update the DNS resource record. - Use this method to update a DNS __Record__ object. -A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to update a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest @@ -116,10 +121,10 @@ A __Record__ object represents a DNS resource record in an authoritative zone. type RecordAPIService internal.Service type ApiRecordCreateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - body *DataRecord - inherit *string + body *DataRecord + inherit *string } func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { @@ -143,24 +148,25 @@ RecordCreate Create the DNS resource record. Use this method to create a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequest { return ApiRecordCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return DataCreateRecordResponse +// +// @return DataCreateRecordResponse func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataCreateRecordResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataCreateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordCreate") @@ -197,14 +203,6 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -248,13 +246,14 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiRecordDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string + id string } func (r ApiRecordDeleteRequest) Execute() (*http.Response, error) { @@ -267,24 +266,24 @@ RecordDelete Move the DNS resource record to recycle bin. Use this method to move a DNS __Record__ object to the recycle bin. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ func (a *RecordAPIService) RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest { return ApiRecordDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordDelete") @@ -356,50 +355,50 @@ func (a *RecordAPIService) RecordDeleteExecute(r ApiRecordDeleteRequest) (*http. } type ApiRecordListRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string - inherit *string -} - -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string + inherit *string +} + +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordListRequest) Fields(fields string) ApiRecordListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRecordListRequest) Filter(filter string) ApiRecordListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRecordListRequest) Offset(offset int32) ApiRecordListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRecordListRequest) Limit(limit int32) ApiRecordListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRecordListRequest) PageToken(pageToken string) ApiRecordListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRecordListRequest) OrderBy(orderBy string) ApiRecordListRequest { r.orderBy = &orderBy return r @@ -433,24 +432,25 @@ RecordList Retrieve DNS resource records. Use this method to retrieve DNS __Record__ objects. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest { return ApiRecordListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return DataListRecordResponse +// +// @return DataListRecordResponse func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataListRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataListRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordList") @@ -549,18 +549,19 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiRecordReadRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - fields *string - inherit *string + id string + fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordReadRequest) Fields(fields string) ApiRecordReadRequest { r.fields = &fields return r @@ -582,26 +583,27 @@ RecordRead Retrieve the DNS resource record. Use this method to retrieve a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordReadRequest { return ApiRecordReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return DataReadRecordResponse +// +// @return DataReadRecordResponse func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataReadRecordResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataReadRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordRead") @@ -680,14 +682,15 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiRecordSOASerialIncrementRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataSOASerialIncrementRequest + id string + body *DataSOASerialIncrementRequest } func (r ApiRecordSOASerialIncrementRequest) Body(body DataSOASerialIncrementRequest) ApiRecordSOASerialIncrementRequest { @@ -705,26 +708,27 @@ RecordSOASerialIncrement Increment serial number for the SOA record. Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest { return ApiRecordSOASerialIncrementRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return DataSOASerialIncrementResponse +// +// @return DataSOASerialIncrementResponse func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataSOASerialIncrementResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataSOASerialIncrementResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordSOASerialIncrement") @@ -802,15 +806,16 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiRecordUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService RecordAPI - id string - body *DataRecord - inherit *string + id string + body *DataRecord + inherit *string } func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { @@ -834,26 +839,27 @@ RecordUpdate Update the DNS resource record. Use this method to update a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest { return ApiRecordUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return DataUpdateRecordResponse +// +// @return DataUpdateRecordResponse func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataUpdateRecordResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DataUpdateRecordResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DataUpdateRecordResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "RecordAPIService.RecordUpdate") @@ -891,14 +897,6 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -942,5 +940,6 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_data/model_data_create_record_response.go b/dns_data/model_data_create_record_response.go index 2914142..870d899 100644 --- a/dns_data/model_data_create_record_response.go +++ b/dns_data/model_data_create_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataCreateRecordResponse) SetResult(v DataRecord) { } func (o DataCreateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataCreateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_list_record_response.go b/dns_data/model_data_list_record_response.go index 8ce789e..e633b11 100644 --- a/dns_data/model_data_list_record_response.go +++ b/dns_data/model_data_list_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *DataListRecordResponse) SetResults(v []DataRecord) { } func (o DataListRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableDataListRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_read_record_response.go b/dns_data/model_data_read_record_response.go index 57ccdab..7541c04 100644 --- a/dns_data/model_data_read_record_response.go +++ b/dns_data/model_data_read_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataReadRecordResponse) SetResult(v DataRecord) { } func (o DataReadRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataReadRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_record_inheritance.go b/dns_data/model_data_record_inheritance.go index 88f08ec..55e5209 100644 --- a/dns_data/model_data_record_inheritance.go +++ b/dns_data/model_data_record_inheritance.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataRecordInheritance) SetTtl(v Inheritance2InheritedUInt32) { } func (o DataRecordInheritance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataRecordInheritance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_soa_serial_increment_request.go b/dns_data/model_data_soa_serial_increment_request.go index 2ae5f8c..ce4dabf 100644 --- a/dns_data/model_data_soa_serial_increment_request.go +++ b/dns_data/model_data_soa_serial_increment_request.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -140,7 +140,7 @@ func (o *DataSOASerialIncrementRequest) SetSerialIncrement(v int64) { } func (o DataSOASerialIncrementRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -196,5 +196,3 @@ func (v *NullableDataSOASerialIncrementRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_soa_serial_increment_response.go b/dns_data/model_data_soa_serial_increment_response.go index cc83af7..352d117 100644 --- a/dns_data/model_data_soa_serial_increment_response.go +++ b/dns_data/model_data_soa_serial_increment_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataSOASerialIncrementResponse) SetResult(v DataRecord) { } func (o DataSOASerialIncrementResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataSOASerialIncrementResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_data_update_record_response.go b/dns_data/model_data_update_record_response.go index ac6d08d..aca7ee5 100644 --- a/dns_data/model_data_update_record_response.go +++ b/dns_data/model_data_update_record_response.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *DataUpdateRecordResponse) SetResult(v DataRecord) { } func (o DataUpdateRecordResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableDataUpdateRecordResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_inheritance2_inherited_u_int32.go b/dns_data/model_inheritance2_inherited_u_int32.go index 9d2885f..c23f897 100644 --- a/dns_data/model_inheritance2_inherited_u_int32.go +++ b/dns_data/model_inheritance2_inherited_u_int32.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -175,7 +175,7 @@ func (o *Inheritance2InheritedUInt32) SetValue(v int64) { } func (o Inheritance2InheritedUInt32) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -234,5 +234,3 @@ func (v *NullableInheritance2InheritedUInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/dns_data/model_protobuf_field_mask.go b/dns_data/model_protobuf_field_mask.go index 21401df..17ded5d 100644 --- a/dns_data/model_protobuf_field_mask.go +++ b/dns_data/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/infra_mgmt/api_detail.go b/infra_mgmt/api_detail.go index 5f04bf8..cb3d549 100644 --- a/infra_mgmt/api_detail.go +++ b/infra_mgmt/api_detail.go @@ -21,6 +21,7 @@ import ( ) type DetailAPI interface { + /* DetailHostsList List all the Hosts along with its associated Services (applications). @@ -32,6 +33,7 @@ type DetailAPI interface { // DetailHostsListExecute executes the request // @return InfraListDetailHostsResponse DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) + /* DetailServicesList List all the Services (applications) along with its associated Hosts. @@ -230,6 +232,7 @@ func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -415,5 +418,6 @@ func (a *DetailAPIService) DetailServicesListExecute(r ApiDetailServicesListRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_mgmt/api_hosts.go b/infra_mgmt/api_hosts.go index 159f42a..4c614f0 100644 --- a/infra_mgmt/api_hosts.go +++ b/infra_mgmt/api_hosts.go @@ -22,49 +22,53 @@ import ( ) type HostsAPI interface { + /* - HostsAssignTags Assign tags for list of hosts. + HostsAssignTags Assign tags for list of hosts. - Validation: - - "ids" is required. - - "tags" is required. + Validation: + - "ids" is required. + - "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest // HostsAssignTagsExecute executes the request // @return map[string]interface{} HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) + /* - HostsCreate Create a Host resource. + HostsCreate Create a Host resource. - Validation: - - "display_name" is required and should be unique. + Validation: + - "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ HostsCreate(ctx context.Context) ApiHostsCreateRequest // HostsCreateExecute executes the request // @return InfraCreateHostResponse HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) + /* - HostsDelete Delete a Host resource. + HostsDelete Delete a Host resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest // HostsDeleteExecute executes the request HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Response, error) + /* HostsDisconnect Disconnect a Host by resource ID. @@ -79,6 +83,7 @@ type HostsAPI interface { // HostsDisconnectExecute executes the request // @return map[string]interface{} HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) + /* HostsList List all the Host resources for an account. @@ -90,21 +95,23 @@ type HostsAPI interface { // HostsListExecute executes the request // @return InfraListHostResponse HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) + /* - HostsRead Get a Host resource. + HostsRead Get a Host resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ HostsRead(ctx context.Context, id string) ApiHostsReadRequest // HostsReadExecute executes the request // @return InfraGetHostResponse HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) + /* HostsReplace Migrate a Host's configuration from one to another. @@ -118,32 +125,34 @@ type HostsAPI interface { // HostsReplaceExecute executes the request // @return map[string]interface{} HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) + /* - HostsUnassignTags Unassign tag for the list hosts. + HostsUnassignTags Unassign tag for the list hosts. - Validation: - - "ids" is required. - - "keys" is required. + Validation: + - "ids" is required. + - "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest // HostsUnassignTagsExecute executes the request // @return map[string]interface{} HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) + /* - HostsUpdate Update a Host resource. + HostsUpdate Update a Host resource. - Validation: - - "id" is required. - - "display_name" is required and should be unique. - - "pool_id" is required. + Validation: + - "id" is required. + - "display_name" is required and should be unique. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest @@ -229,14 +238,6 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -280,6 +281,7 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -356,14 +358,6 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -407,6 +401,7 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -633,6 +628,7 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -818,6 +814,7 @@ func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHos newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -930,6 +927,7 @@ func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHost newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1054,6 +1052,7 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1174,6 +1173,7 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1256,14 +1256,6 @@ func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpd if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1307,5 +1299,6 @@ func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_mgmt/api_services.go b/infra_mgmt/api_services.go index 0de1c2d..b76de6d 100644 --- a/infra_mgmt/api_services.go +++ b/infra_mgmt/api_services.go @@ -22,6 +22,7 @@ import ( ) type ServicesAPI interface { + /* ServicesApplications List applications (Service types) for a particular account. @@ -35,36 +36,39 @@ type ServicesAPI interface { // ServicesApplicationsExecute executes the request // @return InfraApplicationsResponse ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) + /* - ServicesCreate Create a Service resource. + ServicesCreate Create a Service resource. - Validation: - - "name" is required and should be unique. - - "service_type" is required. - - "pool_id" is required. + Validation: + - "name" is required and should be unique. + - "service_type" is required. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ ServicesCreate(ctx context.Context) ApiServicesCreateRequest // ServicesCreateExecute executes the request // @return InfraCreateServiceResponse ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) + /* - ServicesDelete Delete a Service resource. + ServicesDelete Delete a Service resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest // ServicesDeleteExecute executes the request ServicesDeleteExecute(r ApiServicesDeleteRequest) (*http.Response, error) + /* ServicesList List all the Service resources for an account. @@ -76,33 +80,35 @@ type ServicesAPI interface { // ServicesListExecute executes the request // @return InfraListServiceResponse ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) + /* - ServicesRead Read a Service resource. + ServicesRead Read a Service resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ ServicesRead(ctx context.Context, id string) ApiServicesReadRequest // ServicesReadExecute executes the request // @return InfraGetServiceResponse ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) + /* - ServicesUpdate Update a Service resource. + ServicesUpdate Update a Service resource. - Validation: - - "id" is required. - - "name" is required and should be unique. - - "service_type" is required. - - "pool_id" is required. + Validation: + - "id" is required. + - "name" is required and should be unique. + - "service_type" is required. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest @@ -228,6 +234,7 @@ func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicatio newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -306,14 +313,6 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -357,6 +356,7 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -646,6 +646,7 @@ func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*Inf newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -758,6 +759,7 @@ func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*Inf newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -841,14 +843,6 @@ func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -892,5 +886,6 @@ func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_provision/api_ui_join_token.go b/infra_provision/api_ui_join_token.go index 7b25b49..8a966e1 100644 --- a/infra_provision/api_ui_join_token.go +++ b/infra_provision/api_ui_join_token.go @@ -22,21 +22,23 @@ import ( ) type UIJoinTokenAPI interface { + /* - UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. + UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. - Validation: - - "name" is required and should be unique. - - "description" is optioanl. + Validation: + - "name" is required and should be unique. + - "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest // UIJoinTokenCreateExecute executes the request // @return HostactivationCreateJoinTokenResponse UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) + /* UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. @@ -48,6 +50,7 @@ type UIJoinTokenAPI interface { // UIJoinTokenDeleteExecute executes the request UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteRequest) (*http.Response, error) + /* UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. @@ -58,6 +61,7 @@ type UIJoinTokenAPI interface { // UIJoinTokenDeleteSetExecute executes the request UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDeleteSetRequest) (*http.Response, error) + /* UIJoinTokenList User can list the join tokens for an account. @@ -71,6 +75,7 @@ type UIJoinTokenAPI interface { // UIJoinTokenListExecute executes the request // @return HostactivationListJoinTokenResponse UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) + /* UIJoinTokenRead User can get the join token providing its resource id in the parameter. @@ -83,16 +88,17 @@ type UIJoinTokenAPI interface { // UIJoinTokenReadExecute executes the request // @return HostactivationReadJoinTokenResponse UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) + /* - UIJoinTokenUpdate User can modify the tags or expiration time of a join token. + UIJoinTokenUpdate User can modify the tags or expiration time of a join token. - Validation: Following fields is needed. Provide what needs to be - - "expires_at" - - "tags" + Validation: Following fields is needed. Provide what needs to be + - "expires_at" + - "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest @@ -178,14 +184,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -229,6 +227,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -615,6 +614,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -734,6 +734,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -815,14 +816,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -866,5 +859,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_provision/api_uicsr.go b/infra_provision/api_uicsr.go index 70c6546..45b5cce 100644 --- a/infra_provision/api_uicsr.go +++ b/infra_provision/api_uicsr.go @@ -22,6 +22,7 @@ import ( ) type UICSRAPI interface { + /* UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. @@ -34,6 +35,7 @@ type UICSRAPI interface { // UICSRApproveExecute executes the request // @return map[string]interface{} UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) + /* UICSRDeny Marks the certificate signing request as denied. @@ -46,6 +48,7 @@ type UICSRAPI interface { // UICSRDenyExecute executes the request // @return map[string]interface{} UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) + /* UICSRList User can list the certificate signing requests for an account. @@ -57,34 +60,36 @@ type UICSRAPI interface { // UICSRListExecute executes the request // @return HostactivationListCSRsResponse UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) + /* - UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). - Validation: - - one of "cert_serial" or "ophid" should be provided - - "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). + Validation: + - one of "cert_serial" or "ophid" should be provided + - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest // UICSRRevokeExecute executes the request // @return map[string]interface{} UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) + /* - UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). - Validation: - - one of "cert_serial" or "ophid" should be provided - - "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). + Validation: + - one of "cert_serial" or "ophid" should be provided + - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request @@ -213,6 +218,7 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -333,6 +339,7 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -508,6 +515,7 @@ func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*Hostactivati newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -633,6 +641,7 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -758,5 +767,6 @@ func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/.openapi-generator-ignore b/ipam/.openapi-generator-ignore index 9d89018..7484ee5 100644 --- a/ipam/.openapi-generator-ignore +++ b/ipam/.openapi-generator-ignore @@ -21,6 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -*.go -*.md -!api*test.go diff --git a/ipam/api_address.go b/ipam/api_address.go index c8e8fc7..f6acc99 100644 --- a/ipam/api_address.go +++ b/ipam/api_address.go @@ -22,72 +22,77 @@ import ( ) type AddressAPI interface { + /* - AddressCreate Create the IP address. + AddressCreate Create the IP address. - Use this method to create an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to create an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ AddressCreate(ctx context.Context) ApiAddressCreateRequest // AddressCreateExecute executes the request // @return IpamsvcCreateAddressResponse AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) + /* - AddressDelete Move the IP address to the recycle bin. + AddressDelete Move the IP address to the recycle bin. - Use this method to move an __Address__ object to the recycle bin. - The __Address__ object represents any single IP address within a given IP space. + Use this method to move an __Address__ object to the recycle bin. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest // AddressDeleteExecute executes the request AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) + /* - AddressList Retrieve IP addresses. + AddressList Retrieve IP addresses. - Use this method to retrieve __Address__ objects. - The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve __Address__ objects. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ AddressList(ctx context.Context) ApiAddressListRequest // AddressListExecute executes the request // @return IpamsvcListAddressResponse AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) + /* - AddressRead Retrieve the IP address. + AddressRead Retrieve the IP address. - Use this method to retrieve an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ AddressRead(ctx context.Context, id string) ApiAddressReadRequest // AddressReadExecute executes the request // @return IpamsvcReadAddressResponse AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) + /* - AddressUpdate Update the IP address. + AddressUpdate Update the IP address. - Use this method to update an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to update an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest @@ -172,14 +177,6 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -533,6 +531,7 @@ func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -655,6 +654,7 @@ func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -735,14 +735,6 @@ func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -786,5 +778,6 @@ func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_address_block.go b/ipam/api_address_block.go index 481539c..c2047b0 100644 --- a/ipam/api_address_block.go +++ b/ipam/api_address_block.go @@ -22,177 +22,189 @@ import ( ) type AddressBlockAPI interface { + /* - AddressBlockCopy Copy the address block. + AddressBlockCopy Copy the address block. - Use this method to copy an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to copy an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest // AddressBlockCopyExecute executes the request // @return IpamsvcCopyAddressBlockResponse AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) + /* - AddressBlockCreate Create the address block. + AddressBlockCreate Create the address block. - Use this method to create an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to create an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest // AddressBlockCreateExecute executes the request // @return IpamsvcCreateAddressBlockResponse AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) + /* - AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. + AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. - Use this method to create a Next Available __AddressBlock__ object. - The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to create a Next Available __AddressBlock__ object. + The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest // AddressBlockCreateNextAvailableABExecute executes the request // @return IpamsvcCreateNextAvailableABResponse AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) + /* - AddressBlockCreateNextAvailableIP Allocate the next available IP address. + AddressBlockCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest // AddressBlockCreateNextAvailableIPExecute executes the request // @return IpamsvcCreateNextAvailableIPResponse AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) + /* - AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. + AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. - Use this method to create a Next Available __Subnet__ object. - The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to create a Next Available __Subnet__ object. + The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest // AddressBlockCreateNextAvailableSubnetExecute executes the request // @return IpamsvcCreateNextAvailableSubnetResponse AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) + /* - AddressBlockDelete Move the address block to the recycle bin. + AddressBlockDelete Move the address block to the recycle bin. - Use this method to move an __AddressBlock__ object to the recycle bin. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to move an __AddressBlock__ object to the recycle bin. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest // AddressBlockDeleteExecute executes the request AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) + /* - AddressBlockList Retrieve the address blocks. + AddressBlockList Retrieve the address blocks. - Use this method to retrieve __AddressBlock__ objects. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve __AddressBlock__ objects. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ AddressBlockList(ctx context.Context) ApiAddressBlockListRequest // AddressBlockListExecute executes the request // @return IpamsvcListAddressBlockResponse AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) + /* - AddressBlockListNextAvailableAB List Next Available Address Block objects. + AddressBlockListNextAvailableAB List Next Available Address Block objects. - Use this method to list Next Available __AddressBlock__ objects. - The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to list Next Available __AddressBlock__ objects. + The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest // AddressBlockListNextAvailableABExecute executes the request // @return IpamsvcNextAvailableABResponse AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) + /* - AddressBlockListNextAvailableIP Retrieve the next available IP address. + AddressBlockListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest // AddressBlockListNextAvailableIPExecute executes the request // @return IpamsvcNextAvailableIPResponse AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) + /* - AddressBlockListNextAvailableSubnet List Next Available Subnet objects. + AddressBlockListNextAvailableSubnet List Next Available Subnet objects. - Use this method to list Next Available __Subnet__ objects. - The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to list Next Available __Subnet__ objects. + The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest // AddressBlockListNextAvailableSubnetExecute executes the request // @return IpamsvcNextAvailableSubnetResponse AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) + /* - AddressBlockRead Retrieve the address block. + AddressBlockRead Retrieve the address block. - Use this method to retrieve an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest // AddressBlockReadExecute executes the request // @return IpamsvcReadAddressBlockResponse AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) + /* - AddressBlockUpdate Update the address block. + AddressBlockUpdate Update the address block. - Use this method to update an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to update an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest @@ -324,6 +336,7 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -410,14 +423,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -461,6 +466,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -617,6 +623,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -755,6 +762,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -921,6 +929,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1223,6 +1232,7 @@ func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1375,6 +1385,7 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAdd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1507,6 +1518,7 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAdd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1669,6 +1681,7 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r Ap newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1801,6 +1814,7 @@ func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1891,14 +1905,6 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1942,5 +1948,6 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_asm.go b/ipam/api_asm.go index b2fe742..d33789e 100644 --- a/ipam/api_asm.go +++ b/ipam/api_asm.go @@ -22,44 +22,47 @@ import ( ) type AsmAPI interface { + /* - AsmCreate Update subnet and ranges for Automated Scope Management. + AsmCreate Update subnet and ranges for Automated Scope Management. - Use this method to update the subnet and range for Automated Scope Management. - The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. - This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. + Use this method to update the subnet and range for Automated Scope Management. + The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. + This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ AsmCreate(ctx context.Context) ApiAsmCreateRequest // AsmCreateExecute executes the request // @return IpamsvcCreateASMResponse AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) + /* - AsmList Retrieve suggested updates for Automated Scope Management. + AsmList Retrieve suggested updates for Automated Scope Management. - Use this method to retrieve __ASM__ objects for Automated Scope Management. - The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve __ASM__ objects for Automated Scope Management. + The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ AsmList(ctx context.Context) ApiAsmListRequest // AsmListExecute executes the request // @return IpamsvcListASMResponse AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) + /* - AsmRead Retrieve the suggested update for Automated Scope Management. + AsmRead Retrieve the suggested update for Automated Scope Management. - Use this method to retrieve an __ASM__ object for Automated Scope Management. - The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve an __ASM__ object for Automated Scope Management. + The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ AsmRead(ctx context.Context, id string) ApiAsmReadRequest @@ -188,6 +191,7 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -315,6 +319,7 @@ func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResp newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -437,5 +442,6 @@ func (a *AsmAPIService) AsmReadExecute(r ApiAsmReadRequest) (*IpamsvcReadASMResp newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_dhcp_host.go b/ipam/api_dhcp_host.go index a3d955b..5a4a3c9 100644 --- a/ipam/api_dhcp_host.go +++ b/ipam/api_dhcp_host.go @@ -22,20 +22,22 @@ import ( ) type DhcpHostAPI interface { + /* - DhcpHostList Retrieve DHCP hosts. + DhcpHostList Retrieve DHCP hosts. - Use this method to retrieve DHCP __Host__ objects. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve DHCP __Host__ objects. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ DhcpHostList(ctx context.Context) ApiDhcpHostListRequest // DhcpHostListExecute executes the request // @return IpamsvcListHostResponse DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) + /* DhcpHostListAssociations Retrieve DHCP host associations. @@ -50,30 +52,32 @@ type DhcpHostAPI interface { // DhcpHostListAssociationsExecute executes the request // @return IpamsvcHostAssociationsResponse DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) + /* - DhcpHostRead Retrieve the DHCP host. + DhcpHostRead Retrieve the DHCP host. - Use this method to retrieve a DHCP Host object. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve a DHCP Host object. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest // DhcpHostReadExecute executes the request // @return IpamsvcReadHostResponse DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) + /* - DhcpHostUpdate Update the DHCP hosts. + DhcpHostUpdate Update the DHCP hosts. - Use this method to update a DHCP __Host__ object. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to update a DHCP __Host__ object. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest @@ -270,6 +274,7 @@ func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -381,6 +386,7 @@ func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAs newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -503,6 +509,7 @@ func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -583,14 +590,6 @@ func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -634,5 +633,6 @@ func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_dns_usage.go b/ipam/api_dns_usage.go index ce964cf..009657f 100644 --- a/ipam/api_dns_usage.go +++ b/ipam/api_dns_usage.go @@ -22,6 +22,7 @@ import ( ) type DnsUsageAPI interface { + /* DnsUsageList Retrieve DNS usage for multiple objects. @@ -35,6 +36,7 @@ type DnsUsageAPI interface { // DnsUsageListExecute executes the request // @return IpamsvcListDNSUsageResponse DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) + /* DnsUsageRead Retrieve the DNS usage. @@ -218,6 +220,7 @@ func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -339,5 +342,6 @@ func (a *DnsUsageAPIService) DnsUsageReadExecute(r ApiDnsUsageReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_filter.go b/ipam/api_filter.go index 572f312..173d0a9 100644 --- a/ipam/api_filter.go +++ b/ipam/api_filter.go @@ -21,6 +21,7 @@ import ( ) type FilterAPI interface { + /* FilterList Retrieve DHCP filters. @@ -223,5 +224,6 @@ func (a *FilterAPIService) FilterListExecute(r ApiFilterListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_fixed_address.go b/ipam/api_fixed_address.go index 15ede2e..748cad6 100644 --- a/ipam/api_fixed_address.go +++ b/ipam/api_fixed_address.go @@ -22,72 +22,77 @@ import ( ) type FixedAddressAPI interface { + /* - FixedAddressCreate Create the fixed address. + FixedAddressCreate Create the fixed address. - Use this method to create a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to create a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest // FixedAddressCreateExecute executes the request // @return IpamsvcCreateFixedAddressResponse FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) + /* - FixedAddressDelete Move the fixed address to the recycle bin. + FixedAddressDelete Move the fixed address to the recycle bin. - Use this method to move a __FixedAddress__ object to the recycle bin. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to move a __FixedAddress__ object to the recycle bin. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest // FixedAddressDeleteExecute executes the request FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) + /* - FixedAddressList Retrieve fixed addresses. + FixedAddressList Retrieve fixed addresses. - Use this method to retrieve __FixedAddress__ objects. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve __FixedAddress__ objects. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ FixedAddressList(ctx context.Context) ApiFixedAddressListRequest // FixedAddressListExecute executes the request // @return IpamsvcListFixedAddressResponse FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) + /* - FixedAddressRead Retrieve the fixed address. + FixedAddressRead Retrieve the fixed address. - Use this method to retrieve a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest // FixedAddressReadExecute executes the request // @return IpamsvcReadFixedAddressResponse FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) + /* - FixedAddressUpdate Update the fixed address. + FixedAddressUpdate Update the fixed address. - Use this method to update a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to update a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest @@ -182,14 +187,6 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -233,6 +230,7 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -535,6 +533,7 @@ func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -667,6 +666,7 @@ func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -757,14 +757,6 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -808,5 +800,6 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_global.go b/ipam/api_global.go index d1f14ea..4bf33b3 100644 --- a/ipam/api_global.go +++ b/ipam/api_global.go @@ -22,58 +22,62 @@ import ( ) type GlobalAPI interface { + /* - GlobalRead Retrieve the global configuration. + GlobalRead Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest // GlobalReadExecute executes the request // @return IpamsvcReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) + /* - GlobalRead2 Retrieve the global configuration. + GlobalRead2 Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request // GlobalRead2Execute executes the request // @return IpamsvcReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) + /* - GlobalUpdate Update the global configuration. + GlobalUpdate Update the global configuration. - Use this method to update the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest // GlobalUpdateExecute executes the request // @return IpamsvcUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) + /* - GlobalUpdate2 Update the global configuration. + GlobalUpdate2 Update the global configuration. - Use this method to update the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request @@ -200,6 +204,7 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -322,6 +327,7 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*Ipamsvc newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -441,6 +447,7 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -564,5 +571,6 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_ha_group.go b/ipam/api_ha_group.go index 06a4fc8..2601000 100644 --- a/ipam/api_ha_group.go +++ b/ipam/api_ha_group.go @@ -22,72 +22,77 @@ import ( ) type HaGroupAPI interface { + /* - HaGroupCreate Create the HA group. + HaGroupCreate Create the HA group. - Use this method to create an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to create an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest // HaGroupCreateExecute executes the request // @return IpamsvcCreateHAGroupResponse HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) + /* - HaGroupDelete Delete the HA group. + HaGroupDelete Delete the HA group. - Use this method to delete an __HAGroup__ object. - The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to delete an __HAGroup__ object. + The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest // HaGroupDeleteExecute executes the request HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) + /* - HaGroupList Retrieve HA groups. + HaGroupList Retrieve HA groups. - Use this method to retrieve __HAGroup__ objects. - The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve __HAGroup__ objects. + The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ HaGroupList(ctx context.Context) ApiHaGroupListRequest // HaGroupListExecute executes the request // @return IpamsvcListHAGroupResponse HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) + /* - HaGroupRead Retrieve the HA group. + HaGroupRead Retrieve the HA group. - Use this method to retrieve an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest // HaGroupReadExecute executes the request // @return IpamsvcReadHAGroupResponse HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) + /* - HaGroupUpdate Update the HA group. + HaGroupUpdate Update the HA group. - Use this method to update an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to update an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest @@ -172,14 +177,6 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -525,6 +523,7 @@ func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -657,6 +656,7 @@ func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -780,5 +780,6 @@ func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_hardware_filter.go b/ipam/api_hardware_filter.go index 18649ed..77f0ac5 100644 --- a/ipam/api_hardware_filter.go +++ b/ipam/api_hardware_filter.go @@ -22,72 +22,77 @@ import ( ) type HardwareFilterAPI interface { + /* - HardwareFilterCreate Create the hardware filter. + HardwareFilterCreate Create the hardware filter. - Use this method to create a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest // HardwareFilterCreateExecute executes the request // @return IpamsvcCreateHardwareFilterResponse HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) + /* - HardwareFilterDelete Move the hardware filter to the recycle bin. + HardwareFilterDelete Move the hardware filter to the recycle bin. - Use this method to move a __HardwareFilter__ object to the recycle bin. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move a __HardwareFilter__ object to the recycle bin. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest // HardwareFilterDeleteExecute executes the request HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) + /* - HardwareFilterList Retrieve hardware filters. + HardwareFilterList Retrieve hardware filters. - Use this method to retrieve __HardwareFilter__ objects. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __HardwareFilter__ objects. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest // HardwareFilterListExecute executes the request // @return IpamsvcListHardwareFilterResponse HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) + /* - HardwareFilterRead Retrieve the hardware filter. + HardwareFilterRead Retrieve the hardware filter. - Use this method to retrieve a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest // HardwareFilterReadExecute executes the request // @return IpamsvcReadHardwareFilterResponse HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) + /* - HardwareFilterUpdate Update the hardware filter. + HardwareFilterUpdate Update the hardware filter. - Use this method to update a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest @@ -172,14 +177,6 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilter newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilter newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilt newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_ip_space.go b/ipam/api_ip_space.go index ac81c8b..14a0cea 100644 --- a/ipam/api_ip_space.go +++ b/ipam/api_ip_space.go @@ -22,106 +22,113 @@ import ( ) type IpSpaceAPI interface { + /* - IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. + IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. - Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. - The __IPSpace__ object represents an entire address space. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. + The __IPSpace__ object represents an entire address space. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. - The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. + The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. + The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest // IpSpaceBulkCopyExecute executes the request // @return IpamsvcBulkCopyIPSpaceResponse IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) + /* - IpSpaceCopy Copy the IP space. + IpSpaceCopy Copy the IP space. - Use this method to copy an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to copy an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest // IpSpaceCopyExecute executes the request // @return IpamsvcCopyIPSpaceResponse IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) + /* - IpSpaceCreate Create the IP space. + IpSpaceCreate Create the IP space. - Use this method to create an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to create an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest // IpSpaceCreateExecute executes the request // @return IpamsvcCreateIPSpaceResponse IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) + /* - IpSpaceDelete Move the IP space to the recycle bin. + IpSpaceDelete Move the IP space to the recycle bin. - Use this method to move an __IPSpace__ object to the recycle bin. - The __IPSpace__ object represents an entire address space. + Use this method to move an __IPSpace__ object to the recycle bin. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest // IpSpaceDeleteExecute executes the request IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) + /* - IpSpaceList Retrieve IP spaces. + IpSpaceList Retrieve IP spaces. - Use this method to retrieve __IPSpace__ objects. - The __IPSpace__ object represents an entire address space. + Use this method to retrieve __IPSpace__ objects. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ IpSpaceList(ctx context.Context) ApiIpSpaceListRequest // IpSpaceListExecute executes the request // @return IpamsvcListIPSpaceResponse IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) + /* - IpSpaceRead Retrieve the IP space. + IpSpaceRead Retrieve the IP space. - Use this method to retrieve an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to retrieve an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest // IpSpaceReadExecute executes the request // @return IpamsvcReadIPSpaceResponse IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) + /* - IpSpaceUpdate Update the IP space. + IpSpaceUpdate Update the IP space. - Use this method to update an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to update an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest @@ -254,6 +261,7 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -377,6 +385,7 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -463,14 +472,6 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -514,6 +515,7 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -816,6 +818,7 @@ func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -948,6 +951,7 @@ func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1038,14 +1042,6 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1089,5 +1085,6 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_ipam_host.go b/ipam/api_ipam_host.go index 7e562ec..aec93a6 100644 --- a/ipam/api_ipam_host.go +++ b/ipam/api_ipam_host.go @@ -22,72 +22,77 @@ import ( ) type IpamHostAPI interface { + /* - IpamHostCreate Create the IPAM host. + IpamHostCreate Create the IPAM host. - Use this method to create an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to create an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest // IpamHostCreateExecute executes the request // @return IpamsvcCreateIpamHostResponse IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) + /* - IpamHostDelete Move the IPAM host to the recycle bin. + IpamHostDelete Move the IPAM host to the recycle bin. - Use this method to move an __IpamHost__ object to the recycle bin. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to move an __IpamHost__ object to the recycle bin. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest // IpamHostDeleteExecute executes the request IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) + /* - IpamHostList Retrieve the IPAM hosts. + IpamHostList Retrieve the IPAM hosts. - Use this method to retrieve __IpamHost__ objects. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve __IpamHost__ objects. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ IpamHostList(ctx context.Context) ApiIpamHostListRequest // IpamHostListExecute executes the request // @return IpamsvcListIpamHostResponse IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) + /* - IpamHostRead Retrieve the IPAM host. + IpamHostRead Retrieve the IPAM host. - Use this method to retrieve an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest // IpamHostReadExecute executes the request // @return IpamsvcReadIpamHostResponse IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) + /* - IpamHostUpdate Update the IPAM host. + IpamHostUpdate Update the IPAM host. - Use this method to update an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to update an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest @@ -172,14 +177,6 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -647,6 +646,7 @@ func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -727,14 +727,6 @@ func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -778,5 +770,6 @@ func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_leases_command.go b/ipam/api_leases_command.go index 02fb0c3..429e629 100644 --- a/ipam/api_leases_command.go +++ b/ipam/api_leases_command.go @@ -21,14 +21,15 @@ import ( ) type LeasesCommandAPI interface { + /* - LeasesCommandCreate Perform actions like clearing DHCP lease(s). + LeasesCommandCreate Perform actions like clearing DHCP lease(s). - Use this method to create a __LeasesCommand__ object. - The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). + Use this method to create a __LeasesCommand__ object. + The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest @@ -156,5 +157,6 @@ func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_code.go b/ipam/api_option_code.go index 17006da..3d99ae5 100644 --- a/ipam/api_option_code.go +++ b/ipam/api_option_code.go @@ -22,72 +22,77 @@ import ( ) type OptionCodeAPI interface { + /* - OptionCodeCreate Create the DHCP option code. + OptionCodeCreate Create the DHCP option code. - Use this method to create an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to create an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest // OptionCodeCreateExecute executes the request // @return IpamsvcCreateOptionCodeResponse OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) + /* - OptionCodeDelete Delete the DHCP option code. + OptionCodeDelete Delete the DHCP option code. - Use this method to delete an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to delete an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest // OptionCodeDeleteExecute executes the request OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) + /* - OptionCodeList Retrieve DHCP option codes. + OptionCodeList Retrieve DHCP option codes. - Use this method to retrieve __OptionCode__ objects. - The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve __OptionCode__ objects. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ OptionCodeList(ctx context.Context) ApiOptionCodeListRequest // OptionCodeListExecute executes the request // @return IpamsvcListOptionCodeResponse OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) + /* - OptionCodeRead Retrieve the DHCP option code. + OptionCodeRead Retrieve the DHCP option code. - Use this method to retrieve an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest // OptionCodeReadExecute executes the request // @return IpamsvcReadOptionCodeResponse OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) + /* - OptionCodeUpdate Update the DHCP option code. + OptionCodeUpdate Update the DHCP option code. - Use this method to update an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to update an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest @@ -215,6 +220,7 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -487,6 +493,7 @@ func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -609,6 +616,7 @@ func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -732,5 +740,6 @@ func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_filter.go b/ipam/api_option_filter.go index f49e936..bd0c0cc 100644 --- a/ipam/api_option_filter.go +++ b/ipam/api_option_filter.go @@ -22,72 +22,77 @@ import ( ) type OptionFilterAPI interface { + /* - OptionFilterCreate Create the DHCP option filter. + OptionFilterCreate Create the DHCP option filter. - Use this method to create an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest // OptionFilterCreateExecute executes the request // @return IpamsvcCreateOptionFilterResponse OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) + /* - OptionFilterDelete Move the DHCP option filter to the recycle bin. + OptionFilterDelete Move the DHCP option filter to the recycle bin. - Use this method to move an __OptionFilter__ object to the recycle bin. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move an __OptionFilter__ object to the recycle bin. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest // OptionFilterDeleteExecute executes the request OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) + /* - OptionFilterList Retrieve DHCP option filters. + OptionFilterList Retrieve DHCP option filters. - Use this method to retrieve __OptionFilter__ objects. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __OptionFilter__ objects. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ OptionFilterList(ctx context.Context) ApiOptionFilterListRequest // OptionFilterListExecute executes the request // @return IpamsvcListOptionFilterResponse OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) + /* - OptionFilterRead Retrieve the DHCP option filter. + OptionFilterRead Retrieve the DHCP option filter. - Use this method to retrieve an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest // OptionFilterReadExecute executes the request // @return IpamsvcReadOptionFilterResponse OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) + /* - OptionFilterUpdate Update the DHCP option filter. + OptionFilterUpdate Update the DHCP option filter. - Use this method to update an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest @@ -172,14 +177,6 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpda newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_group.go b/ipam/api_option_group.go index b91cbbd..e489e56 100644 --- a/ipam/api_option_group.go +++ b/ipam/api_option_group.go @@ -22,72 +22,77 @@ import ( ) type OptionGroupAPI interface { + /* - OptionGroupCreate Create the DHCP option group. + OptionGroupCreate Create the DHCP option group. - Use this method to create an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to create an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest // OptionGroupCreateExecute executes the request // @return IpamsvcCreateOptionGroupResponse OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) + /* - OptionGroupDelete Move the DHCP option group to the recycle bin. + OptionGroupDelete Move the DHCP option group to the recycle bin. - Use this method to move an __OptionGroup__ object to the recycle bin. - The __OptionGroup__ object is a named collection of options. + Use this method to move an __OptionGroup__ object to the recycle bin. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest // OptionGroupDeleteExecute executes the request OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) + /* - OptionGroupList Retrieve DHCP option groups. + OptionGroupList Retrieve DHCP option groups. - Use this method to retrieve __OptionGroup__ objects. - The __OptionGroup__ object is a named collection of options. + Use this method to retrieve __OptionGroup__ objects. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ OptionGroupList(ctx context.Context) ApiOptionGroupListRequest // OptionGroupListExecute executes the request // @return IpamsvcListOptionGroupResponse OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) + /* - OptionGroupRead Retrieve the DHCP option group. + OptionGroupRead Retrieve the DHCP option group. - Use this method to retrieve an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to retrieve an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest // OptionGroupReadExecute executes the request // @return IpamsvcReadOptionGroupResponse OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) + /* - OptionGroupUpdate Update the DHCP option group. + OptionGroupUpdate Update the DHCP option group. - Use this method to update an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to update an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest @@ -172,14 +177,6 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_space.go b/ipam/api_option_space.go index babcf62..26f654d 100644 --- a/ipam/api_option_space.go +++ b/ipam/api_option_space.go @@ -22,72 +22,77 @@ import ( ) type OptionSpaceAPI interface { + /* - OptionSpaceCreate Create the DHCP option space. + OptionSpaceCreate Create the DHCP option space. - Use this method to create an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to create an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest // OptionSpaceCreateExecute executes the request // @return IpamsvcCreateOptionSpaceResponse OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) + /* - OptionSpaceDelete Move the DHCP option space to the recycle bin. + OptionSpaceDelete Move the DHCP option space to the recycle bin. - Use this method to move an __OptionSpace__ object to the recycle bin. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to move an __OptionSpace__ object to the recycle bin. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest // OptionSpaceDeleteExecute executes the request OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) + /* - OptionSpaceList Retrieve DHCP option spaces. + OptionSpaceList Retrieve DHCP option spaces. - Use this method to retrieve __OptionSpace__ objects. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve __OptionSpace__ objects. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest // OptionSpaceListExecute executes the request // @return IpamsvcListOptionSpaceResponse OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) + /* - OptionSpaceRead Retrieve the DHCP option space. + OptionSpaceRead Retrieve the DHCP option space. - Use this method to retrieve an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest // OptionSpaceReadExecute executes the request // @return IpamsvcReadOptionSpaceResponse OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) + /* - OptionSpaceUpdate Update the DHCP option space. + OptionSpaceUpdate Update the DHCP option space. - Use this method to update an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to update an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest @@ -172,14 +177,6 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,6 +220,7 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,6 +513,7 @@ func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,6 +636,7 @@ func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,14 +717,6 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -768,5 +760,6 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_range.go b/ipam/api_range.go index e0f0bd6..d0a5a77 100644 --- a/ipam/api_range.go +++ b/ipam/api_range.go @@ -22,102 +22,109 @@ import ( ) type RangeAPI interface { + /* - RangeCreate Create the range. + RangeCreate Create the range. - Use this method to create a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to create a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ RangeCreate(ctx context.Context) ApiRangeCreateRequest // RangeCreateExecute executes the request // @return IpamsvcCreateRangeResponse RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) + /* - RangeCreateNextAvailableIP Allocate the next available IP address. + RangeCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest // RangeCreateNextAvailableIPExecute executes the request // @return IpamsvcCreateNextAvailableIPResponse RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) + /* - RangeDelete Move the range to the recycle bin. + RangeDelete Move the range to the recycle bin. - Use this method to move a __Range__ object to the recycle bin. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to move a __Range__ object to the recycle bin. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest // RangeDeleteExecute executes the request RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) + /* - RangeList Retrieve ranges. + RangeList Retrieve ranges. - Use this method to retrieve __Range__ objects. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve __Range__ objects. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ RangeList(ctx context.Context) ApiRangeListRequest // RangeListExecute executes the request // @return IpamsvcListRangeResponse RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) + /* - RangeListNextAvailableIP Retrieve the next available IP address. + RangeListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest // RangeListNextAvailableIPExecute executes the request // @return IpamsvcNextAvailableIPResponse RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) + /* - RangeRead Retrieve the range. + RangeRead Retrieve the range. - Use this method to retrieve a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ RangeRead(ctx context.Context, id string) ApiRangeReadRequest // RangeReadExecute executes the request // @return IpamsvcReadRangeResponse RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) + /* - RangeUpdate Update the range. + RangeUpdate Update the range. - Use this method to update a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to update a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest @@ -212,14 +219,6 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -263,6 +262,7 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -401,6 +401,7 @@ func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNext newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -703,6 +704,7 @@ func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -835,6 +837,7 @@ func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvai newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -967,6 +970,7 @@ func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1057,14 +1061,6 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1108,5 +1104,6 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_server.go b/ipam/api_server.go index a9336ef..418fb99 100644 --- a/ipam/api_server.go +++ b/ipam/api_server.go @@ -22,72 +22,77 @@ import ( ) type ServerAPI interface { + /* - ServerCreate Create the DHCP configuration profile. + ServerCreate Create the DHCP configuration profile. - Use this method to create a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest // ServerCreateExecute executes the request // @return IpamsvcCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) + /* - ServerDelete Move the DHCP configuration profile to the recycle bin. + ServerDelete Move the DHCP configuration profile to the recycle bin. - Use this method to move a __Server__ object to the recycle bin. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a __Server__ object to the recycle bin. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) + /* - ServerList Retrieve DHCP configuration profiles. + ServerList Retrieve DHCP configuration profiles. - Use this method to retrieve __Server__ objects. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve __Server__ objects. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest // ServerListExecute executes the request // @return IpamsvcListServerResponse ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) + /* - ServerRead Retrieve the DHCP configuration profile. + ServerRead Retrieve the DHCP configuration profile. - Use this method to retrieve a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest // ServerReadExecute executes the request // @return IpamsvcReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) + /* - ServerUpdate Update the DHCP configuration profile. + ServerUpdate Update the DHCP configuration profile. - Use this method to update a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest @@ -182,14 +187,6 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -233,6 +230,7 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -535,6 +533,7 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -667,6 +666,7 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -757,14 +757,6 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -808,5 +800,6 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_subnet.go b/ipam/api_subnet.go index 42f1527..39ee9fc 100644 --- a/ipam/api_subnet.go +++ b/ipam/api_subnet.go @@ -22,117 +22,125 @@ import ( ) type SubnetAPI interface { + /* - SubnetCopy Copy the subnet. + SubnetCopy Copy the subnet. - Use this method to copy a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to copy a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest // SubnetCopyExecute executes the request // @return IpamsvcCopySubnetResponse SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) + /* - SubnetCreate Create the subnet. + SubnetCreate Create the subnet. - Use this method to create a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to create a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ SubnetCreate(ctx context.Context) ApiSubnetCreateRequest // SubnetCreateExecute executes the request // @return IpamsvcCreateSubnetResponse SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) + /* - SubnetCreateNextAvailableIP Allocate the next available IP address. + SubnetCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest // SubnetCreateNextAvailableIPExecute executes the request // @return IpamsvcCreateNextAvailableIPResponse SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) + /* - SubnetDelete Move the subnet to the recycle bin. + SubnetDelete Move the subnet to the recycle bin. - Use this method to move a __Subnet__ object to the recycle bin. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to move a __Subnet__ object to the recycle bin. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest // SubnetDeleteExecute executes the request SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) + /* - SubnetList Retrieve subnets. + SubnetList Retrieve subnets. - Use this method to retrieve __Subnet__ objects. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve __Subnet__ objects. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ SubnetList(ctx context.Context) ApiSubnetListRequest // SubnetListExecute executes the request // @return IpamsvcListSubnetResponse SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) + /* - SubnetListNextAvailableIP Retrieve the next available IP address. + SubnetListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest // SubnetListNextAvailableIPExecute executes the request // @return IpamsvcNextAvailableIPResponse SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) + /* - SubnetRead Retrieve the subnet. + SubnetRead Retrieve the subnet. - Use this method to retrieve a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest // SubnetReadExecute executes the request // @return IpamsvcReadSubnetResponse SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) + /* - SubnetUpdate Update the subnet. + SubnetUpdate Update the subnet. - Use this method to update a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to update a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest @@ -264,6 +272,7 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -350,14 +359,6 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -401,6 +402,7 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -539,6 +541,7 @@ func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateN newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -841,6 +844,7 @@ func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -973,6 +977,7 @@ func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1105,6 +1110,7 @@ func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -1195,14 +1201,6 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1246,5 +1244,6 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/.openapi-generator-ignore b/keys/.openapi-generator-ignore index 9d89018..7484ee5 100644 --- a/keys/.openapi-generator-ignore +++ b/keys/.openapi-generator-ignore @@ -21,6 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -*.go -*.md -!api*test.go diff --git a/keys/.openapi-generator/FILES b/keys/.openapi-generator/FILES index 8cf4475..619bfc0 100644 --- a/keys/.openapi-generator/FILES +++ b/keys/.openapi-generator/FILES @@ -40,5 +40,4 @@ model_keys_update_tsig_key_response.go model_protobuf_field_mask.go model_upload_content_type.go model_upload_request.go -test/api_upload_test.go utils.go diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index 1a8c350..d4e3ab8 100644 --- a/keys/api_generate_tsig.go +++ b/keys/api_generate_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,18 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type GenerateTsigAPI interface { + /* - GenerateTsigGenerateTSIG Generate TSIG key with a random secret. + GenerateTsigGenerateTSIG Generate TSIG key with a random secret. - Use this method to generate a TSIG key with a random secret using the specified algorithm. + Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest @@ -41,9 +41,9 @@ type GenerateTsigAPI interface { type GenerateTsigAPIService internal.Service type ApiGenerateTsigGenerateTSIGRequest struct { - ctx context.Context + ctx context.Context ApiService GenerateTsigAPI - algorithm *string + algorithm *string } // The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. @@ -61,24 +61,25 @@ GenerateTsigGenerateTSIG Generate TSIG key with a random secret. Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest { return ApiGenerateTsigGenerateTSIGRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysGenerateTSIGResponse +// +// @return KeysGenerateTSIGResponse func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTsigGenerateTSIGRequest) (*KeysGenerateTSIGResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysGenerateTSIGResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysGenerateTSIGResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "GenerateTsigAPIService.GenerateTsigGenerateTSIG") @@ -153,5 +154,6 @@ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTs newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_kerberos.go b/keys/api_kerberos.go index 42d68ac..30c9520 100644 --- a/keys/api_kerberos.go +++ b/keys/api_kerberos.go @@ -22,64 +22,69 @@ import ( ) type KerberosAPI interface { + /* - KerberosDelete Delete the Kerberos key. + KerberosDelete Delete the Kerberos key. - Use this method to delete a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to delete a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest // KerberosDeleteExecute executes the request KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) + /* - KerberosList Retrieve Kerberos keys. + KerberosList Retrieve Kerberos keys. - Use this method to retrieve __KerberosKey__ objects. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve __KerberosKey__ objects. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ KerberosList(ctx context.Context) ApiKerberosListRequest // KerberosListExecute executes the request // @return KeysListKerberosKeyResponse KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) + /* - KerberosRead Retrieve the Kerberos key. + KerberosRead Retrieve the Kerberos key. - Use this method to retrieve a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest // KerberosReadExecute executes the request // @return KeysReadKerberosKeyResponse KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) + /* - KerberosUpdate Update the Kerberos key. + KerberosUpdate Update the Kerberos key. - Use this method to update a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to update a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest // KerberosUpdateExecute executes the request // @return KeysUpdateKerberosKeyResponse KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) + /* KeysKerberosPost Method for KeysKerberosPost @@ -385,6 +390,7 @@ func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*Key newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -507,6 +513,7 @@ func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*Key newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -630,6 +637,7 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } @@ -746,5 +754,6 @@ func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostReques newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 875d85c..22d08bc 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -18,77 +18,81 @@ import ( "net/url" "strings" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type TsigAPI interface { + /* - TsigCreate Create the TSIG key. + TsigCreate Create the TSIG key. - Use this method to create a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to create a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ TsigCreate(ctx context.Context) ApiTsigCreateRequest // TsigCreateExecute executes the request // @return KeysCreateTSIGKeyResponse TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) + /* - TsigDelete Delete the TSIG key. + TsigDelete Delete the TSIG key. - Use this method to delete a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to delete a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest // TsigDeleteExecute executes the request TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) + /* - TsigList Retrieve TSIG keys. + TsigList Retrieve TSIG keys. - Use this method to retrieve __TSIGKey__ objects. -A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve __TSIGKey__ objects. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ TsigList(ctx context.Context) ApiTsigListRequest // TsigListExecute executes the request // @return KeysListTSIGKeyResponse TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) + /* - TsigRead Retrieve the TSIG key. + TsigRead Retrieve the TSIG key. - Use this method to retrieve a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ TsigRead(ctx context.Context, id string) ApiTsigReadRequest // TsigReadExecute executes the request // @return KeysReadTSIGKeyResponse TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) + /* - TsigUpdate Update the TSIG key. + TsigUpdate Update the TSIG key. - Use this method to update a __TSIGKey__ object. -A __TSIGKey__ object represents a TSIG key. + Use this method to update a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest @@ -101,9 +105,9 @@ A __TSIGKey__ object represents a TSIG key. type TsigAPIService internal.Service type ApiTsigCreateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - body *KeysTSIGKey + body *KeysTSIGKey } func (r ApiTsigCreateRequest) Body(body KeysTSIGKey) ApiTsigCreateRequest { @@ -121,24 +125,25 @@ TsigCreate Create the TSIG key. Use this method to create a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { return ApiTsigCreateRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysCreateTSIGKeyResponse +// +// @return KeysCreateTSIGKeyResponse func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysCreateTSIGKeyResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysCreateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigCreate") @@ -172,14 +177,6 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -223,13 +220,14 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiTsigDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string + id string } func (r ApiTsigDeleteRequest) Execute() (*http.Response, error) { @@ -242,24 +240,24 @@ TsigDelete Delete the TSIG key. Use this method to delete a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ func (a *TsigAPIService) TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest { return ApiTsigDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []internal.FormFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []internal.FormFile ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigDelete") @@ -331,49 +329,49 @@ func (a *TsigAPIService) TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Respon } type ApiTsigListRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - fields *string - filter *string - offset *int32 - limit *int32 - pageToken *string - orderBy *string - tfilter *string - torderBy *string + fields *string + filter *string + offset *int32 + limit *int32 + pageToken *string + orderBy *string + tfilter *string + torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigListRequest) Fields(fields string) ApiTsigListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiTsigListRequest) Filter(filter string) ApiTsigListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiTsigListRequest) Offset(offset int32) ApiTsigListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiTsigListRequest) Limit(limit int32) ApiTsigListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiTsigListRequest) PageToken(pageToken string) ApiTsigListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiTsigListRequest) OrderBy(orderBy string) ApiTsigListRequest { r.orderBy = &orderBy return r @@ -401,24 +399,25 @@ TsigList Retrieve TSIG keys. Use this method to retrieve __TSIGKey__ objects. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { return ApiTsigListRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return KeysListTSIGKeyResponse +// +// @return KeysListTSIGKeyResponse func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysListTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigList") @@ -514,17 +513,18 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiTsigReadRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - fields *string + id string + fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigReadRequest) Fields(fields string) ApiTsigReadRequest { r.fields = &fields return r @@ -540,26 +540,27 @@ TsigRead Retrieve the TSIG key. Use this method to retrieve a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadRequest { return ApiTsigReadRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return KeysReadTSIGKeyResponse +// +// @return KeysReadTSIGKeyResponse func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysReadTSIGKeyResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysReadTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigRead") @@ -635,14 +636,15 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } type ApiTsigUpdateRequest struct { - ctx context.Context + ctx context.Context ApiService TsigAPI - id string - body *KeysTSIGKey + id string + body *KeysTSIGKey } func (r ApiTsigUpdateRequest) Body(body KeysTSIGKey) ApiTsigUpdateRequest { @@ -660,26 +662,27 @@ TsigUpdate Update the TSIG key. Use this method to update a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest { return ApiTsigUpdateRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return KeysUpdateTSIGKeyResponse +// +// @return KeysUpdateTSIGKeyResponse func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateTSIGKeyResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *KeysUpdateTSIGKeyResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysUpdateTSIGKeyResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "TsigAPIService.TsigUpdate") @@ -714,14 +717,6 @@ func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -765,5 +760,6 @@ func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateT newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_upload.go b/keys/api_upload.go index 9b28757..3d68206 100644 --- a/keys/api_upload.go +++ b/keys/api_upload.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -17,18 +17,18 @@ import ( "net/http" "net/url" -"github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) - type UploadAPI interface { + /* - UploadUpload Upload content to the keys service. + UploadUpload Upload content to the keys service. - Use this method to upload specified content type to the keys service. + Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ UploadUpload(ctx context.Context) ApiUploadUploadRequest @@ -41,9 +41,9 @@ type UploadAPI interface { type UploadAPIService internal.Service type ApiUploadUploadRequest struct { - ctx context.Context + ctx context.Context ApiService UploadAPI - body *UploadRequest + body *UploadRequest } func (r ApiUploadUploadRequest) Body(body UploadRequest) ApiUploadUploadRequest { @@ -60,24 +60,25 @@ UploadUpload Upload content to the keys service. Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequest { return ApiUploadUploadRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return DdiuploadResponse +// +// @return DdiuploadResponse func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*DdiuploadResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []internal.FormFile - localVarReturnValue *DdiuploadResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *DdiuploadResponse ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "UploadAPIService.UploadUpload") @@ -111,14 +112,6 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.body.Tags == nil { - r.body.Tags = make(map[string]interface{}) - } - for k, v := range a.Client.Cfg.DefaultTags { - if _, ok := r.body.Tags[k]; !ok { - r.body.Tags[k] = v - } - } // body params localVarPostBody = r.body if r.ctx != nil { @@ -162,5 +155,6 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/client.go b/keys/client.go index 286dc91..b3649a4 100644 --- a/keys/client.go +++ b/keys/client.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package keys import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,20 +19,20 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DDI Keys API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services GenerateTsigAPI GenerateTsigAPI - KerberosAPI KerberosAPI - TsigAPI TsigAPI - UploadAPI UploadAPI + KerberosAPI KerberosAPI + TsigAPI TsigAPI + UploadAPI UploadAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.GenerateTsigAPI = (*GenerateTsigAPIService)(&c.Common) diff --git a/keys/model_ddiupload_response.go b/keys/model_ddiupload_response.go index e220432..a58ddfb 100644 --- a/keys/model_ddiupload_response.go +++ b/keys/model_ddiupload_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -106,7 +106,7 @@ func (o *DdiuploadResponse) SetWarning(v string) { } func (o DdiuploadResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -159,5 +159,3 @@ func (v *NullableDdiuploadResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_kerberos_key.go b/keys/model_kerberos_key.go index 4285f1e..ee036c9 100644 --- a/keys/model_kerberos_key.go +++ b/keys/model_kerberos_key.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -311,7 +311,7 @@ func (o *KerberosKey) SetVersion(v int64) { } func (o KerberosKey) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -382,5 +382,3 @@ func (v *NullableKerberosKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_kerberos_keys.go b/keys/model_kerberos_keys.go index 78817e6..1c06064 100644 --- a/keys/model_kerberos_keys.go +++ b/keys/model_kerberos_keys.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KerberosKeys) SetItems(v []KerberosKey) { } func (o KerberosKeys) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKerberosKeys) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_create_tsig_key_response.go b/keys/model_keys_create_tsig_key_response.go index bfe51e4..edd0da5 100644 --- a/keys/model_keys_create_tsig_key_response.go +++ b/keys/model_keys_create_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysCreateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysCreateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysCreateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_generate_tsig_response.go b/keys/model_keys_generate_tsig_response.go index 5a6ee49..85f10e4 100644 --- a/keys/model_keys_generate_tsig_response.go +++ b/keys/model_keys_generate_tsig_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysGenerateTSIGResponse) SetResult(v KeysGenerateTSIGResult) { } func (o KeysGenerateTSIGResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysGenerateTSIGResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_generate_tsig_result.go b/keys/model_keys_generate_tsig_result.go index 9b7dab8..4f6b49d 100644 --- a/keys/model_keys_generate_tsig_result.go +++ b/keys/model_keys_generate_tsig_result.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysGenerateTSIGResult) SetSecret(v string) { } func (o KeysGenerateTSIGResult) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableKeysGenerateTSIGResult) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_list_kerberos_key_response.go b/keys/model_keys_list_kerberos_key_response.go index 31006cc..5966a99 100644 --- a/keys/model_keys_list_kerberos_key_response.go +++ b/keys/model_keys_list_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListKerberosKeyResponse) SetResults(v []KerberosKey) { } func (o KeysListKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableKeysListKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_list_tsig_key_response.go b/keys/model_keys_list_tsig_key_response.go index 5d90120..2a6d699 100644 --- a/keys/model_keys_list_tsig_key_response.go +++ b/keys/model_keys_list_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *KeysListTSIGKeyResponse) SetResults(v []KeysTSIGKey) { } func (o KeysListTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableKeysListTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_read_kerberos_key_response.go b/keys/model_keys_read_kerberos_key_response.go index daeeb0c..dce9578 100644 --- a/keys/model_keys_read_kerberos_key_response.go +++ b/keys/model_keys_read_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysReadKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysReadKerberosKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_read_tsig_key_response.go b/keys/model_keys_read_tsig_key_response.go index 3eee404..fdc725c 100644 --- a/keys/model_keys_read_tsig_key_response.go +++ b/keys/model_keys_read_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysReadTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysReadTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysReadTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 02efb33..bb5cb3d 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -15,7 +15,6 @@ import ( "encoding/json" "fmt" "time" - ) // checks if the KeysTSIGKey type satisfies the MappedNullable interface at compile time @@ -41,7 +40,6 @@ type KeysTSIGKey struct { Tags map[string]interface{} `json:"tags,omitempty"` // Time when the object has been updated. Equals to _created_at_ if not updated after creation. UpdatedAt *time.Time `json:"updated_at,omitempty"` - res interface{} } type _KeysTSIGKey KeysTSIGKey diff --git a/keys/model_keys_update_kerberos_key_response.go b/keys/model_keys_update_kerberos_key_response.go index 189d271..9e83ae5 100644 --- a/keys/model_keys_update_kerberos_key_response.go +++ b/keys/model_keys_update_kerberos_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateKerberosKeyResponse) SetResult(v KerberosKey) { } func (o KeysUpdateKerberosKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysUpdateKerberosKeyResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_keys_update_tsig_key_response.go b/keys/model_keys_update_tsig_key_response.go index 2082989..dc1acd7 100644 --- a/keys/model_keys_update_tsig_key_response.go +++ b/keys/model_keys_update_tsig_key_response.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -72,7 +72,7 @@ func (o *KeysUpdateTSIGKeyResponse) SetResult(v KeysTSIGKey) { } func (o KeysUpdateTSIGKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -122,5 +122,3 @@ func (v *NullableKeysUpdateTSIGKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_protobuf_field_mask.go b/keys/model_protobuf_field_mask.go index 33973a0..c76ddb4 100644 --- a/keys/model_protobuf_field_mask.go +++ b/keys/model_protobuf_field_mask.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -73,7 +73,7 @@ func (o *ProtobufFieldMask) SetPaths(v []string) { } func (o ProtobufFieldMask) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() + toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } @@ -123,5 +123,3 @@ func (v *NullableProtobufFieldMask) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - diff --git a/keys/model_upload_content_type.go b/keys/model_upload_content_type.go index 4052062..dbdf50c 100644 --- a/keys/model_upload_content_type.go +++ b/keys/model_upload_content_type.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -21,7 +21,7 @@ type UploadContentType string // List of uploadContentType const ( UPLOADCONTENTTYPE_UNKNOWN UploadContentType = "UNKNOWN" - UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" + UPLOADCONTENTTYPE_KEYTAB UploadContentType = "KEYTAB" ) // All allowed values of UploadContentType enum @@ -108,4 +108,3 @@ func (v *NullableUploadContentType) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - diff --git a/keys/utils.go b/keys/utils.go index 51922c8..9d1e0fd 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ From 2fcdf427e2d7e1e5ed7688f5707ccf9610b1418e Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 29 Feb 2024 09:36:43 -0800 Subject: [PATCH 13/18] Ran 'go fmt ./...' for formatting check and investigated version 7.3.0 --- dns_config/api_acl.go | 56 +++++------ dns_config/api_auth_nsg.go | 56 +++++------ dns_config/api_auth_zone.go | 66 ++++++------- dns_config/api_cache_flush.go | 10 +- dns_config/api_delegation.go | 56 +++++------ dns_config/api_forward_nsg.go | 56 +++++------ dns_config/api_forward_zone.go | 66 ++++++------- dns_config/api_global.go | 44 ++++----- dns_config/api_host.go | 34 +++---- dns_config/api_server.go | 56 +++++------ dns_config/api_view.go | 68 ++++++------- dns_data/api_record.go | 68 ++++++------- infra_mgmt/api_hosts.go | 74 +++++++------- infra_mgmt/api_services.go | 56 +++++------ infra_provision/api_ui_join_token.go | 26 ++--- infra_provision/api_uicsr.go | 32 +++--- ipam/api_address.go | 56 +++++------ ipam/api_address_block.go | 140 +++++++++++++-------------- ipam/api_asm.go | 34 +++---- ipam/api_dhcp_host.go | 34 +++---- ipam/api_fixed_address.go | 56 +++++------ ipam/api_global.go | 44 ++++----- ipam/api_ha_group.go | 56 +++++------ ipam/api_hardware_filter.go | 56 +++++------ ipam/api_ip_space.go | 86 ++++++++-------- ipam/api_ipam_host.go | 56 +++++------ ipam/api_leases_command.go | 10 +- ipam/api_option_code.go | 56 +++++------ ipam/api_option_filter.go | 56 +++++------ ipam/api_option_group.go | 56 +++++------ ipam/api_option_space.go | 56 +++++------ ipam/api_range.go | 80 +++++++-------- ipam/api_server.go | 56 +++++------ ipam/api_subnet.go | 92 +++++++++--------- keys/api_kerberos.go | 46 ++++----- keys/api_tsig.go | 56 +++++------ 36 files changed, 1003 insertions(+), 1003 deletions(-) diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index a6ee629..9a00650 100644 --- a/dns_config/api_acl.go +++ b/dns_config/api_acl.go @@ -24,13 +24,13 @@ import ( type AclAPI interface { /* - AclCreate Create the ACL object. + AclCreate Create the ACL object. - Use this method to create an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to create an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ AclCreate(ctx context.Context) ApiAclCreateRequest @@ -39,14 +39,14 @@ type AclAPI interface { AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) /* - AclDelete Move the ACL object to Recyclebin. + AclDelete Move the ACL object to Recyclebin. - Use this method to move an ACL object to Recyclebin. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to move an ACL object to Recyclebin. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ AclDelete(ctx context.Context, id string) ApiAclDeleteRequest @@ -54,13 +54,13 @@ type AclAPI interface { AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) /* - AclList List ACL objects. + AclList List ACL objects. - Use this method to list ACL objects. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to list ACL objects. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ AclList(ctx context.Context) ApiAclListRequest @@ -69,14 +69,14 @@ type AclAPI interface { AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) /* - AclRead Read the ACL object. + AclRead Read the ACL object. - Use this method to read an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to read an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ AclRead(ctx context.Context, id string) ApiAclReadRequest @@ -85,14 +85,14 @@ type AclAPI interface { AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) /* - AclUpdate Update the ACL object. + AclUpdate Update the ACL object. - Use this method to update an ACL object. - ACL object (_dns/acl_) represents a named Access Control List. + Use this method to update an ACL object. + ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest diff --git a/dns_config/api_auth_nsg.go b/dns_config/api_auth_nsg.go index 87ac335..0c50e9c 100644 --- a/dns_config/api_auth_nsg.go +++ b/dns_config/api_auth_nsg.go @@ -24,13 +24,13 @@ import ( type AuthNsgAPI interface { /* - AuthNsgCreate Create the AuthNSG object. + AuthNsgCreate Create the AuthNSG object. - Use this method to create an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to create an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest @@ -39,14 +39,14 @@ type AuthNsgAPI interface { AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) /* - AuthNsgDelete Move the AuthNSG object to Recyclebin. + AuthNsgDelete Move the AuthNSG object to Recyclebin. - Use this method to move an AuthNSG object to Recyclebin. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to move an AuthNSG object to Recyclebin. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest @@ -54,13 +54,13 @@ type AuthNsgAPI interface { AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) /* - AuthNsgList List AuthNSG objects. + AuthNsgList List AuthNSG objects. - Use this method to list AuthNSG objects. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to list AuthNSG objects. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ AuthNsgList(ctx context.Context) ApiAuthNsgListRequest @@ -69,14 +69,14 @@ type AuthNsgAPI interface { AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) /* - AuthNsgRead Read the AuthNSG object. + AuthNsgRead Read the AuthNSG object. - Use this method to read an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to read an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest @@ -85,14 +85,14 @@ type AuthNsgAPI interface { AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) /* - AuthNsgUpdate Update the AuthNSG object. + AuthNsgUpdate Update the AuthNSG object. - Use this method to update an AuthNSG object. - The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. + Use this method to update an AuthNSG object. + The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest diff --git a/dns_config/api_auth_zone.go b/dns_config/api_auth_zone.go index 7399faf..d703dca 100644 --- a/dns_config/api_auth_zone.go +++ b/dns_config/api_auth_zone.go @@ -24,13 +24,13 @@ import ( type AuthZoneAPI interface { /* - AuthZoneCopy Copies the __AuthZone__ object. + AuthZoneCopy Copies the __AuthZone__ object. - Use this method to copy an __AuthZone__ object to a different __View__. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to copy an __AuthZone__ object to a different __View__. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest @@ -39,13 +39,13 @@ type AuthZoneAPI interface { AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) /* - AuthZoneCreate Create the AuthZone object. + AuthZoneCreate Create the AuthZone object. - Use this method to create an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to create an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest @@ -54,14 +54,14 @@ type AuthZoneAPI interface { AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) /* - AuthZoneDelete Moves the AuthZone object to Recyclebin. + AuthZoneDelete Moves the AuthZone object to Recyclebin. - Use this method to move an AuthZone object to Recyclebin. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to move an AuthZone object to Recyclebin. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest @@ -69,13 +69,13 @@ type AuthZoneAPI interface { AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) /* - AuthZoneList List AuthZone objects. + AuthZoneList List AuthZone objects. - Use this method to list AuthZone objects. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to list AuthZone objects. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ AuthZoneList(ctx context.Context) ApiAuthZoneListRequest @@ -84,14 +84,14 @@ type AuthZoneAPI interface { AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) /* - AuthZoneRead Read the AuthZone object. + AuthZoneRead Read the AuthZone object. - Use this method to read an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to read an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest @@ -100,14 +100,14 @@ type AuthZoneAPI interface { AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) /* - AuthZoneUpdate Update the AuthZone object. + AuthZoneUpdate Update the AuthZone object. - Use this method to update an AuthZone object. - This object (_dns/auth_zone_) represents an authoritative zone. + Use this method to update an AuthZone object. + This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest diff --git a/dns_config/api_cache_flush.go b/dns_config/api_cache_flush.go index 5d107ae..0f34c66 100644 --- a/dns_config/api_cache_flush.go +++ b/dns_config/api_cache_flush.go @@ -23,13 +23,13 @@ import ( type CacheFlushAPI interface { /* - CacheFlushCreate Create the Cache Flush object. + CacheFlushCreate Create the Cache Flush object. - Use this method to create a Cache Flush object. - The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. + Use this method to create a Cache Flush object. + The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest diff --git a/dns_config/api_delegation.go b/dns_config/api_delegation.go index 3599ee3..53a8ba9 100644 --- a/dns_config/api_delegation.go +++ b/dns_config/api_delegation.go @@ -24,13 +24,13 @@ import ( type DelegationAPI interface { /* - DelegationCreate Create the Delegation object. + DelegationCreate Create the Delegation object. - Use this method to create a Delegation object. - This object (_dns/delegation_) represents a zone delegation. + Use this method to create a Delegation object. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ DelegationCreate(ctx context.Context) ApiDelegationCreateRequest @@ -39,14 +39,14 @@ type DelegationAPI interface { DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) /* - DelegationDelete Moves the Delegation object to Recyclebin. + DelegationDelete Moves the Delegation object to Recyclebin. - Use this method to move a Delegation object to Recyclebin. - This object (_dns/delegation_) represents a zone delegation. + Use this method to move a Delegation object to Recyclebin. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest @@ -54,13 +54,13 @@ type DelegationAPI interface { DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) /* - DelegationList List Delegation objects. + DelegationList List Delegation objects. - Use this method to list Delegation objects. - This object (_dns/delegation_) represents a zone delegation. + Use this method to list Delegation objects. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ DelegationList(ctx context.Context) ApiDelegationListRequest @@ -69,14 +69,14 @@ type DelegationAPI interface { DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) /* - DelegationRead Read the Delegation object. + DelegationRead Read the Delegation object. - Use this method to read a Delegation object. - This object (_dns/delegation)_ represents a zone delegation. + Use this method to read a Delegation object. + This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest @@ -85,14 +85,14 @@ type DelegationAPI interface { DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) /* - DelegationUpdate Update the Delegation object. + DelegationUpdate Update the Delegation object. - Use this method to update a Delegation object. - This object (_dns/delegation_) represents a zone delegation. + Use this method to update a Delegation object. + This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest diff --git a/dns_config/api_forward_nsg.go b/dns_config/api_forward_nsg.go index b27a0ea..cfaa11f 100644 --- a/dns_config/api_forward_nsg.go +++ b/dns_config/api_forward_nsg.go @@ -24,13 +24,13 @@ import ( type ForwardNsgAPI interface { /* - ForwardNsgCreate Create the ForwardNSG object. + ForwardNsgCreate Create the ForwardNSG object. - Use this method to create a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to create a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest @@ -39,14 +39,14 @@ type ForwardNsgAPI interface { ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) /* - ForwardNsgDelete Move the ForwardNSG object to Recyclebin. + ForwardNsgDelete Move the ForwardNSG object to Recyclebin. - Use this method to move a ForwardNSG object to Recyclebin. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to move a ForwardNSG object to Recyclebin. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest @@ -54,13 +54,13 @@ type ForwardNsgAPI interface { ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) /* - ForwardNsgList List ForwardNSG objects. + ForwardNsgList List ForwardNSG objects. - Use this method to list ForwardNSG objects. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to list ForwardNSG objects. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest @@ -69,14 +69,14 @@ type ForwardNsgAPI interface { ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) /* - ForwardNsgRead Read the ForwardNSG object. + ForwardNsgRead Read the ForwardNSG object. - Use this method to read a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to read a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest @@ -85,14 +85,14 @@ type ForwardNsgAPI interface { ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) /* - ForwardNsgUpdate Update the ForwardNSG object. + ForwardNsgUpdate Update the ForwardNSG object. - Use this method to update a ForwardNSG object. - The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. + Use this method to update a ForwardNSG object. + The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest diff --git a/dns_config/api_forward_zone.go b/dns_config/api_forward_zone.go index 050208e..a01d9a8 100644 --- a/dns_config/api_forward_zone.go +++ b/dns_config/api_forward_zone.go @@ -24,13 +24,13 @@ import ( type ForwardZoneAPI interface { /* - ForwardZoneCopy Copies the __ForwardZone__ object. + ForwardZoneCopy Copies the __ForwardZone__ object. - Use this method to copy an __ForwardZone__ object to a different __View__. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to copy an __ForwardZone__ object to a different __View__. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest @@ -39,13 +39,13 @@ type ForwardZoneAPI interface { ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) /* - ForwardZoneCreate Create the ForwardZone object. + ForwardZoneCreate Create the ForwardZone object. - Use this method to create a ForwardZone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to create a ForwardZone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest @@ -54,14 +54,14 @@ type ForwardZoneAPI interface { ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) /* - ForwardZoneDelete Move the Forward Zone object to Recyclebin. + ForwardZoneDelete Move the Forward Zone object to Recyclebin. - Use this method to move a Forward Zone object to Recyclebin. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to move a Forward Zone object to Recyclebin. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest @@ -69,13 +69,13 @@ type ForwardZoneAPI interface { ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) /* - ForwardZoneList List Forward Zone objects. + ForwardZoneList List Forward Zone objects. - Use this method to list Forward Zone objects. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to list Forward Zone objects. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest @@ -84,14 +84,14 @@ type ForwardZoneAPI interface { ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) /* - ForwardZoneRead Read the Forward Zone object. + ForwardZoneRead Read the Forward Zone object. - Use this method to read a Forward Zone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to read a Forward Zone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest @@ -100,14 +100,14 @@ type ForwardZoneAPI interface { ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) /* - ForwardZoneUpdate Update the Forward Zone object. + ForwardZoneUpdate Update the Forward Zone object. - Use this method to update a Forward Zone object. - This object (_dns/forward_zone_) represents a forwarding zone. + Use this method to update a Forward Zone object. + This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest diff --git a/dns_config/api_global.go b/dns_config/api_global.go index 0c98b92..b3b9408 100644 --- a/dns_config/api_global.go +++ b/dns_config/api_global.go @@ -24,13 +24,13 @@ import ( type GlobalAPI interface { /* - GlobalRead Read the Global configuration object. + GlobalRead Read the Global configuration object. - Use this method to read the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest @@ -39,14 +39,14 @@ type GlobalAPI interface { GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) /* - GlobalRead2 Read the Global configuration object. + GlobalRead2 Read the Global configuration object. - Use this method to read the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to read the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request @@ -55,13 +55,13 @@ type GlobalAPI interface { GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) /* - GlobalUpdate Update the Global configuration object. + GlobalUpdate Update the Global configuration object. - Use this method to update the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest @@ -70,14 +70,14 @@ type GlobalAPI interface { GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) /* - GlobalUpdate2 Update the Global configuration object. + GlobalUpdate2 Update the Global configuration object. - Use this method to update the Global configuration object. - Service operates on Global singleton object that represents parent configuration settings for inheritance. + Use this method to update the Global configuration object. + Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request diff --git a/dns_config/api_host.go b/dns_config/api_host.go index 5a21638..f3b32e3 100644 --- a/dns_config/api_host.go +++ b/dns_config/api_host.go @@ -24,13 +24,13 @@ import ( type HostAPI interface { /* - HostList List DNS Host objects. + HostList List DNS Host objects. - Use this method to list DNS Host objects. - A DNS Host object associates DNS configuration with hosts. + Use this method to list DNS Host objects. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ HostList(ctx context.Context) ApiHostListRequest @@ -39,14 +39,14 @@ type HostAPI interface { HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) /* - HostRead Read the DNS Host object. + HostRead Read the DNS Host object. - Use this method to read a DNS Host object. - A DNS Host object associates DNS configuration with hosts. + Use this method to read a DNS Host object. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ HostRead(ctx context.Context, id string) ApiHostReadRequest @@ -55,14 +55,14 @@ type HostAPI interface { HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) /* - HostUpdate Update the DNS Host object. + HostUpdate Update the DNS Host object. - Use this method to update a DNS Host object. - A DNS Host object associates DNS configuration with hosts. + Use this method to update a DNS Host object. + A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest diff --git a/dns_config/api_server.go b/dns_config/api_server.go index e6474e3..f46fced 100644 --- a/dns_config/api_server.go +++ b/dns_config/api_server.go @@ -24,13 +24,13 @@ import ( type ServerAPI interface { /* - ServerCreate Create the Server object. + ServerCreate Create the Server object. - Use this method to create a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest @@ -39,14 +39,14 @@ type ServerAPI interface { ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) /* - ServerDelete Move the Server object to Recyclebin. + ServerDelete Move the Server object to Recyclebin. - Use this method to move a Server object to Recyclebin. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a Server object to Recyclebin. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest @@ -54,13 +54,13 @@ type ServerAPI interface { ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) /* - ServerList List Server objects. + ServerList List Server objects. - Use this method to list Server objects. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to list Server objects. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest @@ -69,14 +69,14 @@ type ServerAPI interface { ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) /* - ServerRead Read the Server object. + ServerRead Read the Server object. - Use this method to read a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to read a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest @@ -85,14 +85,14 @@ type ServerAPI interface { ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) /* - ServerUpdate Update the Server object. + ServerUpdate Update the Server object. - Use this method to update a Server object. - A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a Server object. + A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest diff --git a/dns_config/api_view.go b/dns_config/api_view.go index 7ae3fe4..86383bc 100644 --- a/dns_config/api_view.go +++ b/dns_config/api_view.go @@ -24,14 +24,14 @@ import ( type ViewAPI interface { /* - ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. + ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. - Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. - The __AuthZone__ object represents an authoritative zone. - The __ForwardZone__ object represents a forwarding zone. + Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one __View__ object to another __View__ object. + The __AuthZone__ object represents an authoritative zone. + The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest @@ -40,13 +40,13 @@ type ViewAPI interface { ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) /* - ViewCreate Create the View object. + ViewCreate Create the View object. - Use this method to create a View object. - Named collection of DNS View settings. + Use this method to create a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ ViewCreate(ctx context.Context) ApiViewCreateRequest @@ -55,14 +55,14 @@ type ViewAPI interface { ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) /* - ViewDelete Move the View object to Recyclebin. + ViewDelete Move the View object to Recyclebin. - Use this method to move a View object to Recyclebin. - Named collection of DNS View settings. + Use this method to move a View object to Recyclebin. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest @@ -70,13 +70,13 @@ type ViewAPI interface { ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) /* - ViewList List View objects. + ViewList List View objects. - Use this method to list View objects. - Named collection of DNS View settings. + Use this method to list View objects. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ ViewList(ctx context.Context) ApiViewListRequest @@ -85,14 +85,14 @@ type ViewAPI interface { ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) /* - ViewRead Read the View object. + ViewRead Read the View object. - Use this method to read a View object. - Named collection of DNS View settings. + Use this method to read a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ ViewRead(ctx context.Context, id string) ApiViewReadRequest @@ -101,14 +101,14 @@ type ViewAPI interface { ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) /* - ViewUpdate Update the View object. + ViewUpdate Update the View object. - Use this method to update a View object. - Named collection of DNS View settings. + Use this method to update a View object. + Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest diff --git a/dns_data/api_record.go b/dns_data/api_record.go index e6f6b3d..844179e 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -24,13 +24,13 @@ import ( type RecordAPI interface { /* - RecordCreate Create the DNS resource record. + RecordCreate Create the DNS resource record. - Use this method to create a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to create a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ RecordCreate(ctx context.Context) ApiRecordCreateRequest @@ -39,14 +39,14 @@ type RecordAPI interface { RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) /* - RecordDelete Move the DNS resource record to recycle bin. + RecordDelete Move the DNS resource record to recycle bin. - Use this method to move a DNS __Record__ object to the recycle bin. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to move a DNS __Record__ object to the recycle bin. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest @@ -54,13 +54,13 @@ type RecordAPI interface { RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) /* - RecordList Retrieve DNS resource records. + RecordList Retrieve DNS resource records. - Use this method to retrieve DNS __Record__ objects. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve DNS __Record__ objects. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ RecordList(ctx context.Context) ApiRecordListRequest @@ -69,14 +69,14 @@ type RecordAPI interface { RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) /* - RecordRead Retrieve the DNS resource record. + RecordRead Retrieve the DNS resource record. - Use this method to retrieve a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to retrieve a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ RecordRead(ctx context.Context, id string) ApiRecordReadRequest @@ -85,14 +85,14 @@ type RecordAPI interface { RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) /* - RecordSOASerialIncrement Increment serial number for the SOA record. + RecordSOASerialIncrement Increment serial number for the SOA record. - Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest @@ -101,14 +101,14 @@ type RecordAPI interface { RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) /* - RecordUpdate Update the DNS resource record. + RecordUpdate Update the DNS resource record. - Use this method to update a DNS __Record__ object. - A __Record__ object represents a DNS resource record in an authoritative zone. + Use this method to update a DNS __Record__ object. + A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest diff --git a/infra_mgmt/api_hosts.go b/infra_mgmt/api_hosts.go index 4c614f0..ceaddbf 100644 --- a/infra_mgmt/api_hosts.go +++ b/infra_mgmt/api_hosts.go @@ -24,14 +24,14 @@ import ( type HostsAPI interface { /* - HostsAssignTags Assign tags for list of hosts. + HostsAssignTags Assign tags for list of hosts. - Validation: - - "ids" is required. - - "tags" is required. + Validation: + - "ids" is required. + - "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest @@ -40,13 +40,13 @@ type HostsAPI interface { HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) /* - HostsCreate Create a Host resource. + HostsCreate Create a Host resource. - Validation: - - "display_name" is required and should be unique. + Validation: + - "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ HostsCreate(ctx context.Context) ApiHostsCreateRequest @@ -55,14 +55,14 @@ type HostsAPI interface { HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) /* - HostsDelete Delete a Host resource. + HostsDelete Delete a Host resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest @@ -97,14 +97,14 @@ type HostsAPI interface { HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) /* - HostsRead Get a Host resource. + HostsRead Get a Host resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ HostsRead(ctx context.Context, id string) ApiHostsReadRequest @@ -127,14 +127,14 @@ type HostsAPI interface { HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) /* - HostsUnassignTags Unassign tag for the list hosts. + HostsUnassignTags Unassign tag for the list hosts. - Validation: - - "ids" is required. - - "keys" is required. + Validation: + - "ids" is required. + - "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest @@ -143,16 +143,16 @@ type HostsAPI interface { HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) /* - HostsUpdate Update a Host resource. + HostsUpdate Update a Host resource. - Validation: - - "id" is required. - - "display_name" is required and should be unique. - - "pool_id" is required. + Validation: + - "id" is required. + - "display_name" is required and should be unique. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest diff --git a/infra_mgmt/api_services.go b/infra_mgmt/api_services.go index b76de6d..f7abd6c 100644 --- a/infra_mgmt/api_services.go +++ b/infra_mgmt/api_services.go @@ -38,15 +38,15 @@ type ServicesAPI interface { ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) /* - ServicesCreate Create a Service resource. + ServicesCreate Create a Service resource. - Validation: - - "name" is required and should be unique. - - "service_type" is required. - - "pool_id" is required. + Validation: + - "name" is required and should be unique. + - "service_type" is required. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ ServicesCreate(ctx context.Context) ApiServicesCreateRequest @@ -55,14 +55,14 @@ type ServicesAPI interface { ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) /* - ServicesDelete Delete a Service resource. + ServicesDelete Delete a Service resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest @@ -82,14 +82,14 @@ type ServicesAPI interface { ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) /* - ServicesRead Read a Service resource. + ServicesRead Read a Service resource. - Validation: - - "id" is required. + Validation: + - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ ServicesRead(ctx context.Context, id string) ApiServicesReadRequest @@ -98,17 +98,17 @@ type ServicesAPI interface { ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) /* - ServicesUpdate Update a Service resource. + ServicesUpdate Update a Service resource. - Validation: - - "id" is required. - - "name" is required and should be unique. - - "service_type" is required. - - "pool_id" is required. + Validation: + - "id" is required. + - "name" is required and should be unique. + - "service_type" is required. + - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest diff --git a/infra_provision/api_ui_join_token.go b/infra_provision/api_ui_join_token.go index 8a966e1..a84580c 100644 --- a/infra_provision/api_ui_join_token.go +++ b/infra_provision/api_ui_join_token.go @@ -24,14 +24,14 @@ import ( type UIJoinTokenAPI interface { /* - UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. + UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. - Validation: - - "name" is required and should be unique. - - "description" is optioanl. + Validation: + - "name" is required and should be unique. + - "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest @@ -90,15 +90,15 @@ type UIJoinTokenAPI interface { UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) /* - UIJoinTokenUpdate User can modify the tags or expiration time of a join token. + UIJoinTokenUpdate User can modify the tags or expiration time of a join token. - Validation: Following fields is needed. Provide what needs to be - - "expires_at" - - "tags" + Validation: Following fields is needed. Provide what needs to be + - "expires_at" + - "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest diff --git a/infra_provision/api_uicsr.go b/infra_provision/api_uicsr.go index 45b5cce..57718bc 100644 --- a/infra_provision/api_uicsr.go +++ b/infra_provision/api_uicsr.go @@ -62,16 +62,16 @@ type UICSRAPI interface { UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) /* - UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). - Validation: - - one of "cert_serial" or "ophid" should be provided - - "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). + Validation: + - one of "cert_serial" or "ophid" should be provided + - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest @@ -80,16 +80,16 @@ type UICSRAPI interface { UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) /* - UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. + UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. - The user can revoke the cert from the cloud (for example, if in case a host is compromised). - Validation: - - one of "cert_serial" or "ophid" should be provided - - "revoke_reason" is optional + The user can revoke the cert from the cloud (for example, if in case a host is compromised). + Validation: + - one of "cert_serial" or "ophid" should be provided + - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request diff --git a/ipam/api_address.go b/ipam/api_address.go index f6acc99..6dd7836 100644 --- a/ipam/api_address.go +++ b/ipam/api_address.go @@ -24,13 +24,13 @@ import ( type AddressAPI interface { /* - AddressCreate Create the IP address. + AddressCreate Create the IP address. - Use this method to create an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to create an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ AddressCreate(ctx context.Context) ApiAddressCreateRequest @@ -39,14 +39,14 @@ type AddressAPI interface { AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) /* - AddressDelete Move the IP address to the recycle bin. + AddressDelete Move the IP address to the recycle bin. - Use this method to move an __Address__ object to the recycle bin. - The __Address__ object represents any single IP address within a given IP space. + Use this method to move an __Address__ object to the recycle bin. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest @@ -54,13 +54,13 @@ type AddressAPI interface { AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) /* - AddressList Retrieve IP addresses. + AddressList Retrieve IP addresses. - Use this method to retrieve __Address__ objects. - The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve __Address__ objects. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ AddressList(ctx context.Context) ApiAddressListRequest @@ -69,14 +69,14 @@ type AddressAPI interface { AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) /* - AddressRead Retrieve the IP address. + AddressRead Retrieve the IP address. - Use this method to retrieve an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to retrieve an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ AddressRead(ctx context.Context, id string) ApiAddressReadRequest @@ -85,14 +85,14 @@ type AddressAPI interface { AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) /* - AddressUpdate Update the IP address. + AddressUpdate Update the IP address. - Use this method to update an __Address__ object. - The __Address__ object represents any single IP address within a given IP space. + Use this method to update an __Address__ object. + The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest diff --git a/ipam/api_address_block.go b/ipam/api_address_block.go index c2047b0..0e14686 100644 --- a/ipam/api_address_block.go +++ b/ipam/api_address_block.go @@ -24,14 +24,14 @@ import ( type AddressBlockAPI interface { /* - AddressBlockCopy Copy the address block. + AddressBlockCopy Copy the address block. - Use this method to copy an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to copy an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest @@ -40,13 +40,13 @@ type AddressBlockAPI interface { AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) /* - AddressBlockCreate Create the address block. + AddressBlockCreate Create the address block. - Use this method to create an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to create an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest @@ -55,14 +55,14 @@ type AddressBlockAPI interface { AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. + AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. - Use this method to create a Next Available __AddressBlock__ object. - The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to create a Next Available __AddressBlock__ object. + The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest @@ -71,14 +71,14 @@ type AddressBlockAPI interface { AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableIP Allocate the next available IP address. + AddressBlockCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest @@ -87,14 +87,14 @@ type AddressBlockAPI interface { AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. + AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. - Use this method to create a Next Available __Subnet__ object. - The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to create a Next Available __Subnet__ object. + The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest @@ -103,14 +103,14 @@ type AddressBlockAPI interface { AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) /* - AddressBlockDelete Move the address block to the recycle bin. + AddressBlockDelete Move the address block to the recycle bin. - Use this method to move an __AddressBlock__ object to the recycle bin. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to move an __AddressBlock__ object to the recycle bin. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest @@ -118,13 +118,13 @@ type AddressBlockAPI interface { AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) /* - AddressBlockList Retrieve the address blocks. + AddressBlockList Retrieve the address blocks. - Use this method to retrieve __AddressBlock__ objects. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve __AddressBlock__ objects. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ AddressBlockList(ctx context.Context) ApiAddressBlockListRequest @@ -133,14 +133,14 @@ type AddressBlockAPI interface { AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) /* - AddressBlockListNextAvailableAB List Next Available Address Block objects. + AddressBlockListNextAvailableAB List Next Available Address Block objects. - Use this method to list Next Available __AddressBlock__ objects. - The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. + Use this method to list Next Available __AddressBlock__ objects. + The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest @@ -149,14 +149,14 @@ type AddressBlockAPI interface { AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) /* - AddressBlockListNextAvailableIP Retrieve the next available IP address. + AddressBlockListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest @@ -165,14 +165,14 @@ type AddressBlockAPI interface { AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - AddressBlockListNextAvailableSubnet List Next Available Subnet objects. + AddressBlockListNextAvailableSubnet List Next Available Subnet objects. - Use this method to list Next Available __Subnet__ objects. - The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. + Use this method to list Next Available __Subnet__ objects. + The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest @@ -181,14 +181,14 @@ type AddressBlockAPI interface { AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) /* - AddressBlockRead Retrieve the address block. + AddressBlockRead Retrieve the address block. - Use this method to retrieve an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to retrieve an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest @@ -197,14 +197,14 @@ type AddressBlockAPI interface { AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) /* - AddressBlockUpdate Update the address block. + AddressBlockUpdate Update the address block. - Use this method to update an __AddressBlock__ object. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + Use this method to update an __AddressBlock__ object. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest diff --git a/ipam/api_asm.go b/ipam/api_asm.go index d33789e..c388854 100644 --- a/ipam/api_asm.go +++ b/ipam/api_asm.go @@ -24,14 +24,14 @@ import ( type AsmAPI interface { /* - AsmCreate Update subnet and ranges for Automated Scope Management. + AsmCreate Update subnet and ranges for Automated Scope Management. - Use this method to update the subnet and range for Automated Scope Management. - The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. - This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. + Use this method to update the subnet and range for Automated Scope Management. + The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. + This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ AsmCreate(ctx context.Context) ApiAsmCreateRequest @@ -40,13 +40,13 @@ type AsmAPI interface { AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) /* - AsmList Retrieve suggested updates for Automated Scope Management. + AsmList Retrieve suggested updates for Automated Scope Management. - Use this method to retrieve __ASM__ objects for Automated Scope Management. - The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve __ASM__ objects for Automated Scope Management. + The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ AsmList(ctx context.Context) ApiAsmListRequest @@ -55,14 +55,14 @@ type AsmAPI interface { AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) /* - AsmRead Retrieve the suggested update for Automated Scope Management. + AsmRead Retrieve the suggested update for Automated Scope Management. - Use this method to retrieve an __ASM__ object for Automated Scope Management. - The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. + Use this method to retrieve an __ASM__ object for Automated Scope Management. + The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ AsmRead(ctx context.Context, id string) ApiAsmReadRequest diff --git a/ipam/api_dhcp_host.go b/ipam/api_dhcp_host.go index 5a4a3c9..967a2e0 100644 --- a/ipam/api_dhcp_host.go +++ b/ipam/api_dhcp_host.go @@ -24,13 +24,13 @@ import ( type DhcpHostAPI interface { /* - DhcpHostList Retrieve DHCP hosts. + DhcpHostList Retrieve DHCP hosts. - Use this method to retrieve DHCP __Host__ objects. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve DHCP __Host__ objects. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ DhcpHostList(ctx context.Context) ApiDhcpHostListRequest @@ -54,14 +54,14 @@ type DhcpHostAPI interface { DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) /* - DhcpHostRead Retrieve the DHCP host. + DhcpHostRead Retrieve the DHCP host. - Use this method to retrieve a DHCP Host object. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to retrieve a DHCP Host object. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest @@ -70,14 +70,14 @@ type DhcpHostAPI interface { DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) /* - DhcpHostUpdate Update the DHCP hosts. + DhcpHostUpdate Update the DHCP hosts. - Use this method to update a DHCP __Host__ object. - A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. + Use this method to update a DHCP __Host__ object. + A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest diff --git a/ipam/api_fixed_address.go b/ipam/api_fixed_address.go index 748cad6..11bcd3e 100644 --- a/ipam/api_fixed_address.go +++ b/ipam/api_fixed_address.go @@ -24,13 +24,13 @@ import ( type FixedAddressAPI interface { /* - FixedAddressCreate Create the fixed address. + FixedAddressCreate Create the fixed address. - Use this method to create a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to create a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest @@ -39,14 +39,14 @@ type FixedAddressAPI interface { FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) /* - FixedAddressDelete Move the fixed address to the recycle bin. + FixedAddressDelete Move the fixed address to the recycle bin. - Use this method to move a __FixedAddress__ object to the recycle bin. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to move a __FixedAddress__ object to the recycle bin. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest @@ -54,13 +54,13 @@ type FixedAddressAPI interface { FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) /* - FixedAddressList Retrieve fixed addresses. + FixedAddressList Retrieve fixed addresses. - Use this method to retrieve __FixedAddress__ objects. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve __FixedAddress__ objects. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ FixedAddressList(ctx context.Context) ApiFixedAddressListRequest @@ -69,14 +69,14 @@ type FixedAddressAPI interface { FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) /* - FixedAddressRead Retrieve the fixed address. + FixedAddressRead Retrieve the fixed address. - Use this method to retrieve a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to retrieve a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest @@ -85,14 +85,14 @@ type FixedAddressAPI interface { FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) /* - FixedAddressUpdate Update the fixed address. + FixedAddressUpdate Update the fixed address. - Use this method to update a __FixedAddress__ object. - The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. + Use this method to update a __FixedAddress__ object. + The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest diff --git a/ipam/api_global.go b/ipam/api_global.go index 4bf33b3..41d3a22 100644 --- a/ipam/api_global.go +++ b/ipam/api_global.go @@ -24,13 +24,13 @@ import ( type GlobalAPI interface { /* - GlobalRead Retrieve the global configuration. + GlobalRead Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ GlobalRead(ctx context.Context) ApiGlobalReadRequest @@ -39,14 +39,14 @@ type GlobalAPI interface { GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) /* - GlobalRead2 Retrieve the global configuration. + GlobalRead2 Retrieve the global configuration. - Use this method to retrieve the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to retrieve the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request @@ -55,13 +55,13 @@ type GlobalAPI interface { GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) /* - GlobalUpdate Update the global configuration. + GlobalUpdate Update the global configuration. - Use this method to update the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest @@ -70,14 +70,14 @@ type GlobalAPI interface { GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) /* - GlobalUpdate2 Update the global configuration. + GlobalUpdate2 Update the global configuration. - Use this method to update the __Global__ configuration object. - The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. + Use this method to update the __Global__ configuration object. + The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request diff --git a/ipam/api_ha_group.go b/ipam/api_ha_group.go index 2601000..41187ac 100644 --- a/ipam/api_ha_group.go +++ b/ipam/api_ha_group.go @@ -24,13 +24,13 @@ import ( type HaGroupAPI interface { /* - HaGroupCreate Create the HA group. + HaGroupCreate Create the HA group. - Use this method to create an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to create an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest @@ -39,14 +39,14 @@ type HaGroupAPI interface { HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) /* - HaGroupDelete Delete the HA group. + HaGroupDelete Delete the HA group. - Use this method to delete an __HAGroup__ object. - The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to delete an __HAGroup__ object. + The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest @@ -54,13 +54,13 @@ type HaGroupAPI interface { HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) /* - HaGroupList Retrieve HA groups. + HaGroupList Retrieve HA groups. - Use this method to retrieve __HAGroup__ objects. - The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve __HAGroup__ objects. + The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ HaGroupList(ctx context.Context) ApiHaGroupListRequest @@ -69,14 +69,14 @@ type HaGroupAPI interface { HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) /* - HaGroupRead Retrieve the HA group. + HaGroupRead Retrieve the HA group. - Use this method to retrieve an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to retrieve an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest @@ -85,14 +85,14 @@ type HaGroupAPI interface { HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) /* - HaGroupUpdate Update the HA group. + HaGroupUpdate Update the HA group. - Use this method to update an __HAGroup__ object. - The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. + Use this method to update an __HAGroup__ object. + The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest diff --git a/ipam/api_hardware_filter.go b/ipam/api_hardware_filter.go index 77f0ac5..1e61dcb 100644 --- a/ipam/api_hardware_filter.go +++ b/ipam/api_hardware_filter.go @@ -24,13 +24,13 @@ import ( type HardwareFilterAPI interface { /* - HardwareFilterCreate Create the hardware filter. + HardwareFilterCreate Create the hardware filter. - Use this method to create a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest @@ -39,14 +39,14 @@ type HardwareFilterAPI interface { HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) /* - HardwareFilterDelete Move the hardware filter to the recycle bin. + HardwareFilterDelete Move the hardware filter to the recycle bin. - Use this method to move a __HardwareFilter__ object to the recycle bin. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move a __HardwareFilter__ object to the recycle bin. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest @@ -54,13 +54,13 @@ type HardwareFilterAPI interface { HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) /* - HardwareFilterList Retrieve hardware filters. + HardwareFilterList Retrieve hardware filters. - Use this method to retrieve __HardwareFilter__ objects. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __HardwareFilter__ objects. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest @@ -69,14 +69,14 @@ type HardwareFilterAPI interface { HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) /* - HardwareFilterRead Retrieve the hardware filter. + HardwareFilterRead Retrieve the hardware filter. - Use this method to retrieve a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest @@ -85,14 +85,14 @@ type HardwareFilterAPI interface { HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) /* - HardwareFilterUpdate Update the hardware filter. + HardwareFilterUpdate Update the hardware filter. - Use this method to update a __HardwareFilter__ object. - The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update a __HardwareFilter__ object. + The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest diff --git a/ipam/api_ip_space.go b/ipam/api_ip_space.go index 14a0cea..628b1f9 100644 --- a/ipam/api_ip_space.go +++ b/ipam/api_ip_space.go @@ -24,18 +24,18 @@ import ( type IpSpaceAPI interface { /* - IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. + IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. - Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. - The __IPSpace__ object represents an entire address space. - The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to bulk copy __AddressBlock__ and __Subnet__ objects from one __IPSpace__ object to another __IPSpace__ object. + The __IPSpace__ object represents an entire address space. + The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. - The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. + The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. + The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest @@ -44,14 +44,14 @@ type IpSpaceAPI interface { IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) /* - IpSpaceCopy Copy the IP space. + IpSpaceCopy Copy the IP space. - Use this method to copy an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to copy an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest @@ -60,13 +60,13 @@ type IpSpaceAPI interface { IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) /* - IpSpaceCreate Create the IP space. + IpSpaceCreate Create the IP space. - Use this method to create an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to create an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest @@ -75,14 +75,14 @@ type IpSpaceAPI interface { IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) /* - IpSpaceDelete Move the IP space to the recycle bin. + IpSpaceDelete Move the IP space to the recycle bin. - Use this method to move an __IPSpace__ object to the recycle bin. - The __IPSpace__ object represents an entire address space. + Use this method to move an __IPSpace__ object to the recycle bin. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest @@ -90,13 +90,13 @@ type IpSpaceAPI interface { IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) /* - IpSpaceList Retrieve IP spaces. + IpSpaceList Retrieve IP spaces. - Use this method to retrieve __IPSpace__ objects. - The __IPSpace__ object represents an entire address space. + Use this method to retrieve __IPSpace__ objects. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ IpSpaceList(ctx context.Context) ApiIpSpaceListRequest @@ -105,14 +105,14 @@ type IpSpaceAPI interface { IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) /* - IpSpaceRead Retrieve the IP space. + IpSpaceRead Retrieve the IP space. - Use this method to retrieve an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to retrieve an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest @@ -121,14 +121,14 @@ type IpSpaceAPI interface { IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) /* - IpSpaceUpdate Update the IP space. + IpSpaceUpdate Update the IP space. - Use this method to update an __IPSpace__ object. - The __IPSpace__ object represents an entire address space. + Use this method to update an __IPSpace__ object. + The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest diff --git a/ipam/api_ipam_host.go b/ipam/api_ipam_host.go index aec93a6..be8a550 100644 --- a/ipam/api_ipam_host.go +++ b/ipam/api_ipam_host.go @@ -24,13 +24,13 @@ import ( type IpamHostAPI interface { /* - IpamHostCreate Create the IPAM host. + IpamHostCreate Create the IPAM host. - Use this method to create an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to create an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest @@ -39,14 +39,14 @@ type IpamHostAPI interface { IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) /* - IpamHostDelete Move the IPAM host to the recycle bin. + IpamHostDelete Move the IPAM host to the recycle bin. - Use this method to move an __IpamHost__ object to the recycle bin. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to move an __IpamHost__ object to the recycle bin. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest @@ -54,13 +54,13 @@ type IpamHostAPI interface { IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) /* - IpamHostList Retrieve the IPAM hosts. + IpamHostList Retrieve the IPAM hosts. - Use this method to retrieve __IpamHost__ objects. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve __IpamHost__ objects. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ IpamHostList(ctx context.Context) ApiIpamHostListRequest @@ -69,14 +69,14 @@ type IpamHostAPI interface { IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) /* - IpamHostRead Retrieve the IPAM host. + IpamHostRead Retrieve the IPAM host. - Use this method to retrieve an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to retrieve an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest @@ -85,14 +85,14 @@ type IpamHostAPI interface { IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) /* - IpamHostUpdate Update the IPAM host. + IpamHostUpdate Update the IPAM host. - Use this method to update an __IpamHost__ object. - The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. + Use this method to update an __IpamHost__ object. + The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest diff --git a/ipam/api_leases_command.go b/ipam/api_leases_command.go index 429e629..fa16166 100644 --- a/ipam/api_leases_command.go +++ b/ipam/api_leases_command.go @@ -23,13 +23,13 @@ import ( type LeasesCommandAPI interface { /* - LeasesCommandCreate Perform actions like clearing DHCP lease(s). + LeasesCommandCreate Perform actions like clearing DHCP lease(s). - Use this method to create a __LeasesCommand__ object. - The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). + Use this method to create a __LeasesCommand__ object. + The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest diff --git a/ipam/api_option_code.go b/ipam/api_option_code.go index 3d99ae5..df9daf3 100644 --- a/ipam/api_option_code.go +++ b/ipam/api_option_code.go @@ -24,13 +24,13 @@ import ( type OptionCodeAPI interface { /* - OptionCodeCreate Create the DHCP option code. + OptionCodeCreate Create the DHCP option code. - Use this method to create an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to create an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest @@ -39,14 +39,14 @@ type OptionCodeAPI interface { OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) /* - OptionCodeDelete Delete the DHCP option code. + OptionCodeDelete Delete the DHCP option code. - Use this method to delete an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to delete an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest @@ -54,13 +54,13 @@ type OptionCodeAPI interface { OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) /* - OptionCodeList Retrieve DHCP option codes. + OptionCodeList Retrieve DHCP option codes. - Use this method to retrieve __OptionCode__ objects. - The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve __OptionCode__ objects. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ OptionCodeList(ctx context.Context) ApiOptionCodeListRequest @@ -69,14 +69,14 @@ type OptionCodeAPI interface { OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) /* - OptionCodeRead Retrieve the DHCP option code. + OptionCodeRead Retrieve the DHCP option code. - Use this method to retrieve an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to retrieve an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest @@ -85,14 +85,14 @@ type OptionCodeAPI interface { OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) /* - OptionCodeUpdate Update the DHCP option code. + OptionCodeUpdate Update the DHCP option code. - Use this method to update an __OptionCode__ object. - The __OptionCode__ object defines a DHCP option code. + Use this method to update an __OptionCode__ object. + The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest diff --git a/ipam/api_option_filter.go b/ipam/api_option_filter.go index bd0c0cc..fa0ba3e 100644 --- a/ipam/api_option_filter.go +++ b/ipam/api_option_filter.go @@ -24,13 +24,13 @@ import ( type OptionFilterAPI interface { /* - OptionFilterCreate Create the DHCP option filter. + OptionFilterCreate Create the DHCP option filter. - Use this method to create an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to create an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest @@ -39,14 +39,14 @@ type OptionFilterAPI interface { OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) /* - OptionFilterDelete Move the DHCP option filter to the recycle bin. + OptionFilterDelete Move the DHCP option filter to the recycle bin. - Use this method to move an __OptionFilter__ object to the recycle bin. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to move an __OptionFilter__ object to the recycle bin. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest @@ -54,13 +54,13 @@ type OptionFilterAPI interface { OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) /* - OptionFilterList Retrieve DHCP option filters. + OptionFilterList Retrieve DHCP option filters. - Use this method to retrieve __OptionFilter__ objects. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve __OptionFilter__ objects. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ OptionFilterList(ctx context.Context) ApiOptionFilterListRequest @@ -69,14 +69,14 @@ type OptionFilterAPI interface { OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) /* - OptionFilterRead Retrieve the DHCP option filter. + OptionFilterRead Retrieve the DHCP option filter. - Use this method to retrieve an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to retrieve an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest @@ -85,14 +85,14 @@ type OptionFilterAPI interface { OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) /* - OptionFilterUpdate Update the DHCP option filter. + OptionFilterUpdate Update the DHCP option filter. - Use this method to update an __OptionFilter__ object. - The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. + Use this method to update an __OptionFilter__ object. + The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest diff --git a/ipam/api_option_group.go b/ipam/api_option_group.go index e489e56..702d1b9 100644 --- a/ipam/api_option_group.go +++ b/ipam/api_option_group.go @@ -24,13 +24,13 @@ import ( type OptionGroupAPI interface { /* - OptionGroupCreate Create the DHCP option group. + OptionGroupCreate Create the DHCP option group. - Use this method to create an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to create an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest @@ -39,14 +39,14 @@ type OptionGroupAPI interface { OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) /* - OptionGroupDelete Move the DHCP option group to the recycle bin. + OptionGroupDelete Move the DHCP option group to the recycle bin. - Use this method to move an __OptionGroup__ object to the recycle bin. - The __OptionGroup__ object is a named collection of options. + Use this method to move an __OptionGroup__ object to the recycle bin. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest @@ -54,13 +54,13 @@ type OptionGroupAPI interface { OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) /* - OptionGroupList Retrieve DHCP option groups. + OptionGroupList Retrieve DHCP option groups. - Use this method to retrieve __OptionGroup__ objects. - The __OptionGroup__ object is a named collection of options. + Use this method to retrieve __OptionGroup__ objects. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ OptionGroupList(ctx context.Context) ApiOptionGroupListRequest @@ -69,14 +69,14 @@ type OptionGroupAPI interface { OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) /* - OptionGroupRead Retrieve the DHCP option group. + OptionGroupRead Retrieve the DHCP option group. - Use this method to retrieve an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to retrieve an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest @@ -85,14 +85,14 @@ type OptionGroupAPI interface { OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) /* - OptionGroupUpdate Update the DHCP option group. + OptionGroupUpdate Update the DHCP option group. - Use this method to update an __OptionGroup__ object. - The __OptionGroup__ object is a named collection of options. + Use this method to update an __OptionGroup__ object. + The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest diff --git a/ipam/api_option_space.go b/ipam/api_option_space.go index 26f654d..3f25d66 100644 --- a/ipam/api_option_space.go +++ b/ipam/api_option_space.go @@ -24,13 +24,13 @@ import ( type OptionSpaceAPI interface { /* - OptionSpaceCreate Create the DHCP option space. + OptionSpaceCreate Create the DHCP option space. - Use this method to create an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to create an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest @@ -39,14 +39,14 @@ type OptionSpaceAPI interface { OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) /* - OptionSpaceDelete Move the DHCP option space to the recycle bin. + OptionSpaceDelete Move the DHCP option space to the recycle bin. - Use this method to move an __OptionSpace__ object to the recycle bin. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to move an __OptionSpace__ object to the recycle bin. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest @@ -54,13 +54,13 @@ type OptionSpaceAPI interface { OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) /* - OptionSpaceList Retrieve DHCP option spaces. + OptionSpaceList Retrieve DHCP option spaces. - Use this method to retrieve __OptionSpace__ objects. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve __OptionSpace__ objects. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest @@ -69,14 +69,14 @@ type OptionSpaceAPI interface { OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) /* - OptionSpaceRead Retrieve the DHCP option space. + OptionSpaceRead Retrieve the DHCP option space. - Use this method to retrieve an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to retrieve an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest @@ -85,14 +85,14 @@ type OptionSpaceAPI interface { OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) /* - OptionSpaceUpdate Update the DHCP option space. + OptionSpaceUpdate Update the DHCP option space. - Use this method to update an __OptionSpace__ object. - The __OptionSpace__ object represents a set of DHCP option codes. + Use this method to update an __OptionSpace__ object. + The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest diff --git a/ipam/api_range.go b/ipam/api_range.go index d0a5a77..2c229f6 100644 --- a/ipam/api_range.go +++ b/ipam/api_range.go @@ -24,13 +24,13 @@ import ( type RangeAPI interface { /* - RangeCreate Create the range. + RangeCreate Create the range. - Use this method to create a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to create a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ RangeCreate(ctx context.Context) ApiRangeCreateRequest @@ -39,14 +39,14 @@ type RangeAPI interface { RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) /* - RangeCreateNextAvailableIP Allocate the next available IP address. + RangeCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest @@ -55,14 +55,14 @@ type RangeAPI interface { RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - RangeDelete Move the range to the recycle bin. + RangeDelete Move the range to the recycle bin. - Use this method to move a __Range__ object to the recycle bin. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to move a __Range__ object to the recycle bin. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest @@ -70,13 +70,13 @@ type RangeAPI interface { RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) /* - RangeList Retrieve ranges. + RangeList Retrieve ranges. - Use this method to retrieve __Range__ objects. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve __Range__ objects. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ RangeList(ctx context.Context) ApiRangeListRequest @@ -85,14 +85,14 @@ type RangeAPI interface { RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) /* - RangeListNextAvailableIP Retrieve the next available IP address. + RangeListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest @@ -101,14 +101,14 @@ type RangeAPI interface { RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - RangeRead Retrieve the range. + RangeRead Retrieve the range. - Use this method to retrieve a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to retrieve a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ RangeRead(ctx context.Context, id string) ApiRangeReadRequest @@ -117,14 +117,14 @@ type RangeAPI interface { RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) /* - RangeUpdate Update the range. + RangeUpdate Update the range. - Use this method to update a __Range__ object. - A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. + Use this method to update a __Range__ object. + A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest diff --git a/ipam/api_server.go b/ipam/api_server.go index 418fb99..71ac616 100644 --- a/ipam/api_server.go +++ b/ipam/api_server.go @@ -24,13 +24,13 @@ import ( type ServerAPI interface { /* - ServerCreate Create the DHCP configuration profile. + ServerCreate Create the DHCP configuration profile. - Use this method to create a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to create a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ ServerCreate(ctx context.Context) ApiServerCreateRequest @@ -39,14 +39,14 @@ type ServerAPI interface { ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) /* - ServerDelete Move the DHCP configuration profile to the recycle bin. + ServerDelete Move the DHCP configuration profile to the recycle bin. - Use this method to move a __Server__ object to the recycle bin. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to move a __Server__ object to the recycle bin. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest @@ -54,13 +54,13 @@ type ServerAPI interface { ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) /* - ServerList Retrieve DHCP configuration profiles. + ServerList Retrieve DHCP configuration profiles. - Use this method to retrieve __Server__ objects. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve __Server__ objects. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ ServerList(ctx context.Context) ApiServerListRequest @@ -69,14 +69,14 @@ type ServerAPI interface { ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) /* - ServerRead Retrieve the DHCP configuration profile. + ServerRead Retrieve the DHCP configuration profile. - Use this method to retrieve a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to retrieve a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ ServerRead(ctx context.Context, id string) ApiServerReadRequest @@ -85,14 +85,14 @@ type ServerAPI interface { ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) /* - ServerUpdate Update the DHCP configuration profile. + ServerUpdate Update the DHCP configuration profile. - Use this method to update a __Server__ object. - A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. + Use this method to update a __Server__ object. + A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest diff --git a/ipam/api_subnet.go b/ipam/api_subnet.go index 39ee9fc..8accb55 100644 --- a/ipam/api_subnet.go +++ b/ipam/api_subnet.go @@ -24,14 +24,14 @@ import ( type SubnetAPI interface { /* - SubnetCopy Copy the subnet. + SubnetCopy Copy the subnet. - Use this method to copy a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to copy a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest @@ -40,13 +40,13 @@ type SubnetAPI interface { SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) /* - SubnetCreate Create the subnet. + SubnetCreate Create the subnet. - Use this method to create a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to create a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ SubnetCreate(ctx context.Context) ApiSubnetCreateRequest @@ -55,14 +55,14 @@ type SubnetAPI interface { SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) /* - SubnetCreateNextAvailableIP Allocate the next available IP address. + SubnetCreateNextAvailableIP Allocate the next available IP address. - Use this method to allocate the next available IP address. - This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. + Use this method to allocate the next available IP address. + This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest @@ -71,14 +71,14 @@ type SubnetAPI interface { SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) /* - SubnetDelete Move the subnet to the recycle bin. + SubnetDelete Move the subnet to the recycle bin. - Use this method to move a __Subnet__ object to the recycle bin. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to move a __Subnet__ object to the recycle bin. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest @@ -86,13 +86,13 @@ type SubnetAPI interface { SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) /* - SubnetList Retrieve subnets. + SubnetList Retrieve subnets. - Use this method to retrieve __Subnet__ objects. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve __Subnet__ objects. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ SubnetList(ctx context.Context) ApiSubnetListRequest @@ -101,14 +101,14 @@ type SubnetAPI interface { SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) /* - SubnetListNextAvailableIP Retrieve the next available IP address. + SubnetListNextAvailableIP Retrieve the next available IP address. - Use this method to retrieve the next available IP address. - This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. + Use this method to retrieve the next available IP address. + This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest @@ -117,14 +117,14 @@ type SubnetAPI interface { SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) /* - SubnetRead Retrieve the subnet. + SubnetRead Retrieve the subnet. - Use this method to retrieve a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to retrieve a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest @@ -133,14 +133,14 @@ type SubnetAPI interface { SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) /* - SubnetUpdate Update the subnet. + SubnetUpdate Update the subnet. - Use this method to update a __Subnet__ object. - The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. + Use this method to update a __Subnet__ object. + The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest diff --git a/keys/api_kerberos.go b/keys/api_kerberos.go index 30c9520..7b26c4d 100644 --- a/keys/api_kerberos.go +++ b/keys/api_kerberos.go @@ -24,14 +24,14 @@ import ( type KerberosAPI interface { /* - KerberosDelete Delete the Kerberos key. + KerberosDelete Delete the Kerberos key. - Use this method to delete a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to delete a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest @@ -39,13 +39,13 @@ type KerberosAPI interface { KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) /* - KerberosList Retrieve Kerberos keys. + KerberosList Retrieve Kerberos keys. - Use this method to retrieve __KerberosKey__ objects. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve __KerberosKey__ objects. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ KerberosList(ctx context.Context) ApiKerberosListRequest @@ -54,14 +54,14 @@ type KerberosAPI interface { KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) /* - KerberosRead Retrieve the Kerberos key. + KerberosRead Retrieve the Kerberos key. - Use this method to retrieve a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to retrieve a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest @@ -70,14 +70,14 @@ type KerberosAPI interface { KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) /* - KerberosUpdate Update the Kerberos key. + KerberosUpdate Update the Kerberos key. - Use this method to update a __KerberosKey__ object. - A __KerberosKey__ object represents a Kerberos key. + Use this method to update a __KerberosKey__ object. + A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 22d08bc..4386f89 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -24,13 +24,13 @@ import ( type TsigAPI interface { /* - TsigCreate Create the TSIG key. + TsigCreate Create the TSIG key. - Use this method to create a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to create a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ TsigCreate(ctx context.Context) ApiTsigCreateRequest @@ -39,14 +39,14 @@ type TsigAPI interface { TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) /* - TsigDelete Delete the TSIG key. + TsigDelete Delete the TSIG key. - Use this method to delete a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to delete a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest @@ -54,13 +54,13 @@ type TsigAPI interface { TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) /* - TsigList Retrieve TSIG keys. + TsigList Retrieve TSIG keys. - Use this method to retrieve __TSIGKey__ objects. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve __TSIGKey__ objects. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ TsigList(ctx context.Context) ApiTsigListRequest @@ -69,14 +69,14 @@ type TsigAPI interface { TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) /* - TsigRead Retrieve the TSIG key. + TsigRead Retrieve the TSIG key. - Use this method to retrieve a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to retrieve a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ TsigRead(ctx context.Context, id string) ApiTsigReadRequest @@ -85,14 +85,14 @@ type TsigAPI interface { TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) /* - TsigUpdate Update the TSIG key. + TsigUpdate Update the TSIG key. - Use this method to update a __TSIGKey__ object. - A __TSIGKey__ object represents a TSIG key. + Use this method to update a __TSIGKey__ object. + A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest From c0c68a9b21d643866fef3bea9fac042accf58c37 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 29 Feb 2024 16:49:34 -0800 Subject: [PATCH 14/18] Complete unit tests for ipam, dhcp, dns_data, dns_config, and keys modules --- dns_config/api_acl.go | 25 +- dns_config/api_auth_nsg.go | 25 +- dns_config/api_auth_zone.go | 27 +- dns_config/api_cache_flush.go | 2 - dns_config/api_convert_domain_name.go | 2 - dns_config/api_convert_rname.go | 2 - dns_config/api_delegation.go | 25 +- dns_config/api_forward_nsg.go | 25 +- dns_config/api_forward_zone.go | 27 +- dns_config/api_global.go | 8 - dns_config/api_host.go | 14 +- dns_config/api_lbdn.go | 25 +- dns_config/api_server.go | 25 +- dns_config/api_view.go | 27 +- dns_config/docs/ConfigForwarder.md | 9 +- dns_config/model_config_forwarder.go | 35 ++- dns_data/api_record.go | 27 +- infra_mgmt/api_detail.go | 4 - infra_mgmt/api_hosts.go | 41 +-- infra_mgmt/api_services.go | 27 +- infra_provision/api_ui_join_token.go | 26 +- infra_provision/api_uicsr.go | 10 - ipam/api_address.go | 25 +- ipam/api_address_block.go | 39 ++- ipam/api_asm.go | 6 - ipam/api_dhcp_host.go | 16 +- ipam/api_dns_usage.go | 4 - ipam/api_filter.go | 2 - ipam/api_fixed_address.go | 25 +- ipam/api_global.go | 8 - ipam/api_ha_group.go | 17 +- ipam/api_hardware_filter.go | 25 +- ipam/api_ip_space.go | 29 +- ipam/api_ipam_host.go | 25 +- ipam/api_leases_command.go | 2 - ipam/api_option_code.go | 9 - ipam/api_option_filter.go | 25 +- ipam/api_option_group.go | 25 +- ipam/api_option_space.go | 25 +- ipam/api_range.go | 29 +- ipam/api_server.go | 25 +- ipam/api_subnet.go | 31 +- ipam/test/api_address_block_test.go | 397 +++++++++++++++++--------- ipam/test/api_address_test.go | 166 +++++++---- ipam/test/api_asm_test.go | 106 ++++--- ipam/test/api_dhcp_host_test.go | 136 ++++++--- ipam/test/api_dns_usage_test.go | 71 +++-- ipam/test/api_filter_test.go | 43 ++- ipam/test/api_fixed_address_test.go | 166 +++++++---- ipam/test/api_global_test.go | 142 ++++++--- ipam/test/api_ha_group_test.go | 166 +++++++---- ipam/test/api_hardware_filter_test.go | 166 +++++++---- ipam/test/api_ip_space_test.go | 236 ++++++++++----- ipam/test/api_ipam_host_test.go | 166 +++++++---- ipam/test/api_leases_command_test.go | 46 ++- ipam/test/api_option_code_test.go | 167 +++++++---- ipam/test/api_option_filter_test.go | 166 +++++++---- ipam/test/api_option_group_test.go | 166 +++++++---- ipam/test/api_option_space_test.go | 166 +++++++---- ipam/test/api_range_test.go | 227 ++++++++++----- ipam/test/api_server_test.go | 166 +++++++---- ipam/test/api_subnet_test.go | 263 +++++++++++------ keys/api_generate_tsig.go | 2 - keys/api_kerberos.go | 9 - keys/api_tsig.go | 25 +- keys/api_upload.go | 10 +- 66 files changed, 2784 insertions(+), 1420 deletions(-) diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index 9a00650..c06e786 100644 --- a/dns_config/api_acl.go +++ b/dns_config/api_acl.go @@ -22,7 +22,6 @@ import ( ) type AclAPI interface { - /* AclCreate Create the ACL object. @@ -37,7 +36,6 @@ type AclAPI interface { // AclCreateExecute executes the request // @return ConfigCreateACLResponse AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) - /* AclDelete Move the ACL object to Recyclebin. @@ -52,7 +50,6 @@ type AclAPI interface { // AclDeleteExecute executes the request AclDeleteExecute(r ApiAclDeleteRequest) (*http.Response, error) - /* AclList List ACL objects. @@ -67,7 +64,6 @@ type AclAPI interface { // AclListExecute executes the request // @return ConfigListACLResponse AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) - /* AclRead Read the ACL object. @@ -83,7 +79,6 @@ type AclAPI interface { // AclReadExecute executes the request // @return ConfigReadACLResponse AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) - /* AclUpdate Update the ACL object. @@ -177,6 +172,14 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLRespo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLRespo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateAC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateAC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_auth_nsg.go b/dns_config/api_auth_nsg.go index 0c50e9c..d2ed1ca 100644 --- a/dns_config/api_auth_nsg.go +++ b/dns_config/api_auth_nsg.go @@ -22,7 +22,6 @@ import ( ) type AuthNsgAPI interface { - /* AuthNsgCreate Create the AuthNSG object. @@ -37,7 +36,6 @@ type AuthNsgAPI interface { // AuthNsgCreateExecute executes the request // @return ConfigCreateAuthNSGResponse AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) - /* AuthNsgDelete Move the AuthNSG object to Recyclebin. @@ -52,7 +50,6 @@ type AuthNsgAPI interface { // AuthNsgDeleteExecute executes the request AuthNsgDeleteExecute(r ApiAuthNsgDeleteRequest) (*http.Response, error) - /* AuthNsgList List AuthNSG objects. @@ -67,7 +64,6 @@ type AuthNsgAPI interface { // AuthNsgListExecute executes the request // @return ConfigListAuthNSGResponse AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) - /* AuthNsgRead Read the AuthNSG object. @@ -83,7 +79,6 @@ type AuthNsgAPI interface { // AuthNsgReadExecute executes the request // @return ConfigReadAuthNSGResponse AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) - /* AuthNsgUpdate Update the AuthNSG object. @@ -177,6 +172,14 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*Config newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*Config newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*Co if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*Co newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_auth_zone.go b/dns_config/api_auth_zone.go index d703dca..c95502a 100644 --- a/dns_config/api_auth_zone.go +++ b/dns_config/api_auth_zone.go @@ -22,7 +22,6 @@ import ( ) type AuthZoneAPI interface { - /* AuthZoneCopy Copies the __AuthZone__ object. @@ -37,7 +36,6 @@ type AuthZoneAPI interface { // AuthZoneCopyExecute executes the request // @return ConfigCopyAuthZoneResponse AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) - /* AuthZoneCreate Create the AuthZone object. @@ -52,7 +50,6 @@ type AuthZoneAPI interface { // AuthZoneCreateExecute executes the request // @return ConfigCreateAuthZoneResponse AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) - /* AuthZoneDelete Moves the AuthZone object to Recyclebin. @@ -67,7 +64,6 @@ type AuthZoneAPI interface { // AuthZoneDeleteExecute executes the request AuthZoneDeleteExecute(r ApiAuthZoneDeleteRequest) (*http.Response, error) - /* AuthZoneList List AuthZone objects. @@ -82,7 +78,6 @@ type AuthZoneAPI interface { // AuthZoneListExecute executes the request // @return ConfigListAuthZoneResponse AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) - /* AuthZoneRead Read the AuthZone object. @@ -98,7 +93,6 @@ type AuthZoneAPI interface { // AuthZoneReadExecute executes the request // @return ConfigReadAuthZoneResponse AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) - /* AuthZoneUpdate Update the AuthZone object. @@ -235,7 +229,6 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -322,6 +315,14 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -365,7 +366,6 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -668,7 +668,6 @@ func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -801,7 +800,6 @@ func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -892,6 +890,14 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -935,6 +941,5 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_cache_flush.go b/dns_config/api_cache_flush.go index 0f34c66..f3ca335 100644 --- a/dns_config/api_cache_flush.go +++ b/dns_config/api_cache_flush.go @@ -21,7 +21,6 @@ import ( ) type CacheFlushAPI interface { - /* CacheFlushCreate Create the Cache Flush object. @@ -157,6 +156,5 @@ func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_convert_domain_name.go b/dns_config/api_convert_domain_name.go index 3c9e5b0..cc1d7af 100644 --- a/dns_config/api_convert_domain_name.go +++ b/dns_config/api_convert_domain_name.go @@ -22,7 +22,6 @@ import ( ) type ConvertDomainNameAPI interface { - /* ConvertDomainNameConvert Convert the object. @@ -150,6 +149,5 @@ func (a *ConvertDomainNameAPIService) ConvertDomainNameConvertExecute(r ApiConve newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_convert_rname.go b/dns_config/api_convert_rname.go index 317d931..e15f007 100644 --- a/dns_config/api_convert_rname.go +++ b/dns_config/api_convert_rname.go @@ -22,7 +22,6 @@ import ( ) type ConvertRnameAPI interface { - /* ConvertRnameConvertRName Convert the object. @@ -150,6 +149,5 @@ func (a *ConvertRnameAPIService) ConvertRnameConvertRNameExecute(r ApiConvertRna newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_delegation.go b/dns_config/api_delegation.go index 53a8ba9..1aae7b6 100644 --- a/dns_config/api_delegation.go +++ b/dns_config/api_delegation.go @@ -22,7 +22,6 @@ import ( ) type DelegationAPI interface { - /* DelegationCreate Create the Delegation object. @@ -37,7 +36,6 @@ type DelegationAPI interface { // DelegationCreateExecute executes the request // @return ConfigCreateDelegationResponse DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) - /* DelegationDelete Moves the Delegation object to Recyclebin. @@ -52,7 +50,6 @@ type DelegationAPI interface { // DelegationDeleteExecute executes the request DelegationDeleteExecute(r ApiDelegationDeleteRequest) (*http.Response, error) - /* DelegationList List Delegation objects. @@ -67,7 +64,6 @@ type DelegationAPI interface { // DelegationListExecute executes the request // @return ConfigListDelegationResponse DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) - /* DelegationRead Read the Delegation object. @@ -83,7 +79,6 @@ type DelegationAPI interface { // DelegationReadExecute executes the request // @return ConfigReadDelegationResponse DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) - /* DelegationUpdate Update the Delegation object. @@ -177,6 +172,14 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_forward_nsg.go b/dns_config/api_forward_nsg.go index cfaa11f..8d33d4b 100644 --- a/dns_config/api_forward_nsg.go +++ b/dns_config/api_forward_nsg.go @@ -22,7 +22,6 @@ import ( ) type ForwardNsgAPI interface { - /* ForwardNsgCreate Create the ForwardNSG object. @@ -37,7 +36,6 @@ type ForwardNsgAPI interface { // ForwardNsgCreateExecute executes the request // @return ConfigCreateForwardNSGResponse ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) - /* ForwardNsgDelete Move the ForwardNSG object to Recyclebin. @@ -52,7 +50,6 @@ type ForwardNsgAPI interface { // ForwardNsgDeleteExecute executes the request ForwardNsgDeleteExecute(r ApiForwardNsgDeleteRequest) (*http.Response, error) - /* ForwardNsgList List ForwardNSG objects. @@ -67,7 +64,6 @@ type ForwardNsgAPI interface { // ForwardNsgListExecute executes the request // @return ConfigListForwardNSGResponse ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) - /* ForwardNsgRead Read the ForwardNSG object. @@ -83,7 +79,6 @@ type ForwardNsgAPI interface { // ForwardNsgReadExecute executes the request // @return ConfigReadForwardNSGResponse ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) - /* ForwardNsgUpdate Update the ForwardNSG object. @@ -177,6 +172,14 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequ if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_forward_zone.go b/dns_config/api_forward_zone.go index a01d9a8..762417b 100644 --- a/dns_config/api_forward_zone.go +++ b/dns_config/api_forward_zone.go @@ -22,7 +22,6 @@ import ( ) type ForwardZoneAPI interface { - /* ForwardZoneCopy Copies the __ForwardZone__ object. @@ -37,7 +36,6 @@ type ForwardZoneAPI interface { // ForwardZoneCopyExecute executes the request // @return ConfigCopyForwardZoneResponse ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) - /* ForwardZoneCreate Create the ForwardZone object. @@ -52,7 +50,6 @@ type ForwardZoneAPI interface { // ForwardZoneCreateExecute executes the request // @return ConfigCreateForwardZoneResponse ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) - /* ForwardZoneDelete Move the Forward Zone object to Recyclebin. @@ -67,7 +64,6 @@ type ForwardZoneAPI interface { // ForwardZoneDeleteExecute executes the request ForwardZoneDeleteExecute(r ApiForwardZoneDeleteRequest) (*http.Response, error) - /* ForwardZoneList List Forward Zone objects. @@ -82,7 +78,6 @@ type ForwardZoneAPI interface { // ForwardZoneListExecute executes the request // @return ConfigListForwardZoneResponse ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) - /* ForwardZoneRead Read the Forward Zone object. @@ -98,7 +93,6 @@ type ForwardZoneAPI interface { // ForwardZoneReadExecute executes the request // @return ConfigReadForwardZoneResponse ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) - /* ForwardZoneUpdate Update the Forward Zone object. @@ -235,7 +229,6 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -312,6 +305,14 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -355,7 +356,6 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -648,7 +648,6 @@ func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -771,7 +770,6 @@ func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -852,6 +850,14 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -895,6 +901,5 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_global.go b/dns_config/api_global.go index b3b9408..736b322 100644 --- a/dns_config/api_global.go +++ b/dns_config/api_global.go @@ -22,7 +22,6 @@ import ( ) type GlobalAPI interface { - /* GlobalRead Read the Global configuration object. @@ -37,7 +36,6 @@ type GlobalAPI interface { // GlobalReadExecute executes the request // @return ConfigReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) - /* GlobalRead2 Read the Global configuration object. @@ -53,7 +51,6 @@ type GlobalAPI interface { // GlobalRead2Execute executes the request // @return ConfigReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) - /* GlobalUpdate Update the Global configuration object. @@ -68,7 +65,6 @@ type GlobalAPI interface { // GlobalUpdateExecute executes the request // @return ConfigUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) - /* GlobalUpdate2 Update the Global configuration object. @@ -204,7 +200,6 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigRea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -327,7 +322,6 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -447,7 +441,6 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -571,6 +564,5 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_host.go b/dns_config/api_host.go index f3b32e3..fbef892 100644 --- a/dns_config/api_host.go +++ b/dns_config/api_host.go @@ -22,7 +22,6 @@ import ( ) type HostAPI interface { - /* HostList List DNS Host objects. @@ -37,7 +36,6 @@ type HostAPI interface { // HostListExecute executes the request // @return ConfigListHostResponse HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) - /* HostRead Read the DNS Host object. @@ -53,7 +51,6 @@ type HostAPI interface { // HostReadExecute executes the request // @return ConfigReadHostResponse HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) - /* HostUpdate Update the DNS Host object. @@ -269,7 +266,6 @@ func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -402,7 +398,6 @@ func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -493,6 +488,14 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -536,6 +539,5 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_lbdn.go b/dns_config/api_lbdn.go index 964f9a3..33c2318 100644 --- a/dns_config/api_lbdn.go +++ b/dns_config/api_lbdn.go @@ -22,7 +22,6 @@ import ( ) type LbdnAPI interface { - /* LbdnCreate Create the __LBDN__ object. @@ -36,7 +35,6 @@ type LbdnAPI interface { // LbdnCreateExecute executes the request // @return ConfigCreateLBDNResponse LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) - /* LbdnDelete Delete the __LBDN__ object. @@ -50,7 +48,6 @@ type LbdnAPI interface { // LbdnDeleteExecute executes the request LbdnDeleteExecute(r ApiLbdnDeleteRequest) (*http.Response, error) - /* LbdnList List __LBDN__ objects. @@ -64,7 +61,6 @@ type LbdnAPI interface { // LbdnListExecute executes the request // @return ConfigListLBDNResponse LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) - /* LbdnRead Read the __LBDN__ object. @@ -79,7 +75,6 @@ type LbdnAPI interface { // LbdnReadExecute executes the request // @return ConfigReadLBDNResponse LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) - /* LbdnUpdate Update the __LBDN__ object. @@ -171,6 +166,14 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -214,7 +217,6 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -505,7 +507,6 @@ func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -627,7 +628,6 @@ func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -707,6 +707,14 @@ func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -750,6 +758,5 @@ func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_server.go b/dns_config/api_server.go index f46fced..f759fa5 100644 --- a/dns_config/api_server.go +++ b/dns_config/api_server.go @@ -22,7 +22,6 @@ import ( ) type ServerAPI interface { - /* ServerCreate Create the Server object. @@ -37,7 +36,6 @@ type ServerAPI interface { // ServerCreateExecute executes the request // @return ConfigCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) - /* ServerDelete Move the Server object to Recyclebin. @@ -52,7 +50,6 @@ type ServerAPI interface { // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) - /* ServerList List Server objects. @@ -67,7 +64,6 @@ type ServerAPI interface { // ServerListExecute executes the request // @return ConfigListServerResponse ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) - /* ServerRead Read the Server object. @@ -83,7 +79,6 @@ type ServerAPI interface { // ServerReadExecute executes the request // @return ConfigReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) - /* ServerUpdate Update the Server object. @@ -187,6 +182,14 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -230,7 +233,6 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -533,7 +535,6 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigLis newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -666,7 +667,6 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigRea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -757,6 +757,14 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -800,6 +808,5 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/api_view.go b/dns_config/api_view.go index 86383bc..5bd8d32 100644 --- a/dns_config/api_view.go +++ b/dns_config/api_view.go @@ -22,7 +22,6 @@ import ( ) type ViewAPI interface { - /* ViewBulkCopy Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. @@ -38,7 +37,6 @@ type ViewAPI interface { // ViewBulkCopyExecute executes the request // @return ConfigBulkCopyResponse ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) - /* ViewCreate Create the View object. @@ -53,7 +51,6 @@ type ViewAPI interface { // ViewCreateExecute executes the request // @return ConfigCreateViewResponse ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) - /* ViewDelete Move the View object to Recyclebin. @@ -68,7 +65,6 @@ type ViewAPI interface { // ViewDeleteExecute executes the request ViewDeleteExecute(r ApiViewDeleteRequest) (*http.Response, error) - /* ViewList List View objects. @@ -83,7 +79,6 @@ type ViewAPI interface { // ViewListExecute executes the request // @return ConfigListViewResponse ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) - /* ViewRead Read the View object. @@ -99,7 +94,6 @@ type ViewAPI interface { // ViewReadExecute executes the request // @return ConfigReadViewResponse ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) - /* ViewUpdate Update the View object. @@ -237,7 +231,6 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -324,6 +317,14 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -367,7 +368,6 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -670,7 +670,6 @@ func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -803,7 +802,6 @@ func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -894,6 +892,14 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -937,6 +943,5 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/docs/ConfigForwarder.md b/dns_config/docs/ConfigForwarder.md index 6394250..2304007 100644 --- a/dns_config/docs/ConfigForwarder.md +++ b/dns_config/docs/ConfigForwarder.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Address** | **string** | Server IP address. | -**Fqdn** | **string** | Server FQDN. | +**Fqdn** | Pointer to **string** | Server FQDN. | [optional] **ProtocolFqdn** | Pointer to **string** | Server FQDN in punycode. | [optional] [readonly] ## Methods ### NewConfigForwarder -`func NewConfigForwarder(address string, fqdn string, ) *ConfigForwarder` +`func NewConfigForwarder(address string, ) *ConfigForwarder` NewConfigForwarder instantiates a new ConfigForwarder object This constructor will assign default values to properties that have it defined, @@ -66,6 +66,11 @@ and a boolean to check if the value has been set. SetFqdn sets Fqdn field to given value. +### HasFqdn + +`func (o *ConfigForwarder) HasFqdn() bool` + +HasFqdn returns a boolean if a field has been set. ### GetProtocolFqdn diff --git a/dns_config/model_config_forwarder.go b/dns_config/model_config_forwarder.go index 19a2fc0..2a455ee 100644 --- a/dns_config/model_config_forwarder.go +++ b/dns_config/model_config_forwarder.go @@ -24,7 +24,7 @@ type ConfigForwarder struct { // Server IP address. Address string `json:"address"` // Server FQDN. - Fqdn string `json:"fqdn"` + Fqdn *string `json:"fqdn,omitempty"` // Server FQDN in punycode. ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } @@ -35,10 +35,9 @@ type _ConfigForwarder ConfigForwarder // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewConfigForwarder(address string, fqdn string) *ConfigForwarder { +func NewConfigForwarder(address string) *ConfigForwarder { this := ConfigForwarder{} this.Address = address - this.Fqdn = fqdn return &this } @@ -74,28 +73,36 @@ func (o *ConfigForwarder) SetAddress(v string) { o.Address = v } -// GetFqdn returns the Fqdn field value +// GetFqdn returns the Fqdn field value if set, zero value otherwise. func (o *ConfigForwarder) GetFqdn() string { - if o == nil { + if o == nil || IsNil(o.Fqdn) { var ret string return ret } - - return o.Fqdn + return *o.Fqdn } -// GetFqdnOk returns a tuple with the Fqdn field value +// GetFqdnOk returns a tuple with the Fqdn field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConfigForwarder) GetFqdnOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.Fqdn) { return nil, false } - return &o.Fqdn, true + return o.Fqdn, true +} + +// HasFqdn returns a boolean if a field has been set. +func (o *ConfigForwarder) HasFqdn() bool { + if o != nil && !IsNil(o.Fqdn) { + return true + } + + return false } -// SetFqdn sets field value +// SetFqdn gets a reference to the given string and assigns it to the Fqdn field. func (o *ConfigForwarder) SetFqdn(v string) { - o.Fqdn = v + o.Fqdn = &v } // GetProtocolFqdn returns the ProtocolFqdn field value if set, zero value otherwise. @@ -141,7 +148,9 @@ func (o ConfigForwarder) MarshalJSON() ([]byte, error) { func (o ConfigForwarder) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["address"] = o.Address - toSerialize["fqdn"] = o.Fqdn + if !IsNil(o.Fqdn) { + toSerialize["fqdn"] = o.Fqdn + } if !IsNil(o.ProtocolFqdn) { toSerialize["protocol_fqdn"] = o.ProtocolFqdn } diff --git a/dns_data/api_record.go b/dns_data/api_record.go index 844179e..3400bef 100644 --- a/dns_data/api_record.go +++ b/dns_data/api_record.go @@ -22,7 +22,6 @@ import ( ) type RecordAPI interface { - /* RecordCreate Create the DNS resource record. @@ -37,7 +36,6 @@ type RecordAPI interface { // RecordCreateExecute executes the request // @return DataCreateRecordResponse RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) - /* RecordDelete Move the DNS resource record to recycle bin. @@ -52,7 +50,6 @@ type RecordAPI interface { // RecordDeleteExecute executes the request RecordDeleteExecute(r ApiRecordDeleteRequest) (*http.Response, error) - /* RecordList Retrieve DNS resource records. @@ -67,7 +64,6 @@ type RecordAPI interface { // RecordListExecute executes the request // @return DataListRecordResponse RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) - /* RecordRead Retrieve the DNS resource record. @@ -83,7 +79,6 @@ type RecordAPI interface { // RecordReadExecute executes the request // @return DataReadRecordResponse RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) - /* RecordSOASerialIncrement Increment serial number for the SOA record. @@ -99,7 +94,6 @@ type RecordAPI interface { // RecordSOASerialIncrementExecute executes the request // @return DataSOASerialIncrementResponse RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) - /* RecordUpdate Update the DNS resource record. @@ -203,6 +197,14 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -246,7 +248,6 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -549,7 +550,6 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -682,7 +682,6 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -806,7 +805,6 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -897,6 +895,14 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -940,6 +946,5 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_mgmt/api_detail.go b/infra_mgmt/api_detail.go index cb3d549..5f04bf8 100644 --- a/infra_mgmt/api_detail.go +++ b/infra_mgmt/api_detail.go @@ -21,7 +21,6 @@ import ( ) type DetailAPI interface { - /* DetailHostsList List all the Hosts along with its associated Services (applications). @@ -33,7 +32,6 @@ type DetailAPI interface { // DetailHostsListExecute executes the request // @return InfraListDetailHostsResponse DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) - /* DetailServicesList List all the Services (applications) along with its associated Hosts. @@ -232,7 +230,6 @@ func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -418,6 +415,5 @@ func (a *DetailAPIService) DetailServicesListExecute(r ApiDetailServicesListRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_mgmt/api_hosts.go b/infra_mgmt/api_hosts.go index ceaddbf..159f42a 100644 --- a/infra_mgmt/api_hosts.go +++ b/infra_mgmt/api_hosts.go @@ -22,7 +22,6 @@ import ( ) type HostsAPI interface { - /* HostsAssignTags Assign tags for list of hosts. @@ -38,7 +37,6 @@ type HostsAPI interface { // HostsAssignTagsExecute executes the request // @return map[string]interface{} HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) - /* HostsCreate Create a Host resource. @@ -53,7 +51,6 @@ type HostsAPI interface { // HostsCreateExecute executes the request // @return InfraCreateHostResponse HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) - /* HostsDelete Delete a Host resource. @@ -68,7 +65,6 @@ type HostsAPI interface { // HostsDeleteExecute executes the request HostsDeleteExecute(r ApiHostsDeleteRequest) (*http.Response, error) - /* HostsDisconnect Disconnect a Host by resource ID. @@ -83,7 +79,6 @@ type HostsAPI interface { // HostsDisconnectExecute executes the request // @return map[string]interface{} HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) - /* HostsList List all the Host resources for an account. @@ -95,7 +90,6 @@ type HostsAPI interface { // HostsListExecute executes the request // @return InfraListHostResponse HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) - /* HostsRead Get a Host resource. @@ -111,7 +105,6 @@ type HostsAPI interface { // HostsReadExecute executes the request // @return InfraGetHostResponse HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) - /* HostsReplace Migrate a Host's configuration from one to another. @@ -125,7 +118,6 @@ type HostsAPI interface { // HostsReplaceExecute executes the request // @return map[string]interface{} HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) - /* HostsUnassignTags Unassign tag for the list hosts. @@ -141,7 +133,6 @@ type HostsAPI interface { // HostsUnassignTagsExecute executes the request // @return map[string]interface{} HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) - /* HostsUpdate Update a Host resource. @@ -238,6 +229,14 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -281,7 +280,6 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -358,6 +356,14 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -401,7 +407,6 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -628,7 +633,6 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -814,7 +818,6 @@ func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHos newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -927,7 +930,6 @@ func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHost newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1052,7 +1054,6 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1173,7 +1174,6 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1256,6 +1256,14 @@ func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpd if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1299,6 +1307,5 @@ func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_mgmt/api_services.go b/infra_mgmt/api_services.go index f7abd6c..0de1c2d 100644 --- a/infra_mgmt/api_services.go +++ b/infra_mgmt/api_services.go @@ -22,7 +22,6 @@ import ( ) type ServicesAPI interface { - /* ServicesApplications List applications (Service types) for a particular account. @@ -36,7 +35,6 @@ type ServicesAPI interface { // ServicesApplicationsExecute executes the request // @return InfraApplicationsResponse ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) - /* ServicesCreate Create a Service resource. @@ -53,7 +51,6 @@ type ServicesAPI interface { // ServicesCreateExecute executes the request // @return InfraCreateServiceResponse ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) - /* ServicesDelete Delete a Service resource. @@ -68,7 +65,6 @@ type ServicesAPI interface { // ServicesDeleteExecute executes the request ServicesDeleteExecute(r ApiServicesDeleteRequest) (*http.Response, error) - /* ServicesList List all the Service resources for an account. @@ -80,7 +76,6 @@ type ServicesAPI interface { // ServicesListExecute executes the request // @return InfraListServiceResponse ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) - /* ServicesRead Read a Service resource. @@ -96,7 +91,6 @@ type ServicesAPI interface { // ServicesReadExecute executes the request // @return InfraGetServiceResponse ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) - /* ServicesUpdate Update a Service resource. @@ -234,7 +228,6 @@ func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicatio newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -313,6 +306,14 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -356,7 +357,6 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -646,7 +646,6 @@ func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*Inf newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -759,7 +758,6 @@ func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*Inf newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -843,6 +841,14 @@ func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -886,6 +892,5 @@ func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_provision/api_ui_join_token.go b/infra_provision/api_ui_join_token.go index a84580c..7b25b49 100644 --- a/infra_provision/api_ui_join_token.go +++ b/infra_provision/api_ui_join_token.go @@ -22,7 +22,6 @@ import ( ) type UIJoinTokenAPI interface { - /* UIJoinTokenCreate User can create a join token. Join token is random character string which is used for instant validation of new hosts. @@ -38,7 +37,6 @@ type UIJoinTokenAPI interface { // UIJoinTokenCreateExecute executes the request // @return HostactivationCreateJoinTokenResponse UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) - /* UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. @@ -50,7 +48,6 @@ type UIJoinTokenAPI interface { // UIJoinTokenDeleteExecute executes the request UIJoinTokenDeleteExecute(r ApiUIJoinTokenDeleteRequest) (*http.Response, error) - /* UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. @@ -61,7 +58,6 @@ type UIJoinTokenAPI interface { // UIJoinTokenDeleteSetExecute executes the request UIJoinTokenDeleteSetExecute(r ApiUIJoinTokenDeleteSetRequest) (*http.Response, error) - /* UIJoinTokenList User can list the join tokens for an account. @@ -75,7 +71,6 @@ type UIJoinTokenAPI interface { // UIJoinTokenListExecute executes the request // @return HostactivationListJoinTokenResponse UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) - /* UIJoinTokenRead User can get the join token providing its resource id in the parameter. @@ -88,7 +83,6 @@ type UIJoinTokenAPI interface { // UIJoinTokenReadExecute executes the request // @return HostactivationReadJoinTokenResponse UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) - /* UIJoinTokenUpdate User can modify the tags or expiration time of a join token. @@ -184,6 +178,14 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -227,7 +229,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -614,7 +615,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -734,7 +734,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -816,6 +815,14 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -859,6 +866,5 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/infra_provision/api_uicsr.go b/infra_provision/api_uicsr.go index 57718bc..70c6546 100644 --- a/infra_provision/api_uicsr.go +++ b/infra_provision/api_uicsr.go @@ -22,7 +22,6 @@ import ( ) type UICSRAPI interface { - /* UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. @@ -35,7 +34,6 @@ type UICSRAPI interface { // UICSRApproveExecute executes the request // @return map[string]interface{} UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) - /* UICSRDeny Marks the certificate signing request as denied. @@ -48,7 +46,6 @@ type UICSRAPI interface { // UICSRDenyExecute executes the request // @return map[string]interface{} UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) - /* UICSRList User can list the certificate signing requests for an account. @@ -60,7 +57,6 @@ type UICSRAPI interface { // UICSRListExecute executes the request // @return HostactivationListCSRsResponse UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) - /* UICSRRevoke Invalidates a certificate by adding it to a certificate revocation list. @@ -78,7 +74,6 @@ type UICSRAPI interface { // UICSRRevokeExecute executes the request // @return map[string]interface{} UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) - /* UICSRRevoke2 Invalidates a certificate by adding it to a certificate revocation list. @@ -218,7 +213,6 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -339,7 +333,6 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -515,7 +508,6 @@ func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*Hostactivati newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -641,7 +633,6 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -767,6 +758,5 @@ func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_address.go b/ipam/api_address.go index 6dd7836..c8e8fc7 100644 --- a/ipam/api_address.go +++ b/ipam/api_address.go @@ -22,7 +22,6 @@ import ( ) type AddressAPI interface { - /* AddressCreate Create the IP address. @@ -37,7 +36,6 @@ type AddressAPI interface { // AddressCreateExecute executes the request // @return IpamsvcCreateAddressResponse AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) - /* AddressDelete Move the IP address to the recycle bin. @@ -52,7 +50,6 @@ type AddressAPI interface { // AddressDeleteExecute executes the request AddressDeleteExecute(r ApiAddressDeleteRequest) (*http.Response, error) - /* AddressList Retrieve IP addresses. @@ -67,7 +64,6 @@ type AddressAPI interface { // AddressListExecute executes the request // @return IpamsvcListAddressResponse AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) - /* AddressRead Retrieve the IP address. @@ -83,7 +79,6 @@ type AddressAPI interface { // AddressReadExecute executes the request // @return IpamsvcReadAddressResponse AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) - /* AddressUpdate Update the IP address. @@ -177,6 +172,14 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -531,7 +533,6 @@ func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -654,7 +655,6 @@ func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -735,6 +735,14 @@ func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -778,6 +786,5 @@ func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_address_block.go b/ipam/api_address_block.go index 0e14686..481539c 100644 --- a/ipam/api_address_block.go +++ b/ipam/api_address_block.go @@ -22,7 +22,6 @@ import ( ) type AddressBlockAPI interface { - /* AddressBlockCopy Copy the address block. @@ -38,7 +37,6 @@ type AddressBlockAPI interface { // AddressBlockCopyExecute executes the request // @return IpamsvcCopyAddressBlockResponse AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) - /* AddressBlockCreate Create the address block. @@ -53,7 +51,6 @@ type AddressBlockAPI interface { // AddressBlockCreateExecute executes the request // @return IpamsvcCreateAddressBlockResponse AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) - /* AddressBlockCreateNextAvailableAB Create the Next Available Address Block object. @@ -69,7 +66,6 @@ type AddressBlockAPI interface { // AddressBlockCreateNextAvailableABExecute executes the request // @return IpamsvcCreateNextAvailableABResponse AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) - /* AddressBlockCreateNextAvailableIP Allocate the next available IP address. @@ -85,7 +81,6 @@ type AddressBlockAPI interface { // AddressBlockCreateNextAvailableIPExecute executes the request // @return IpamsvcCreateNextAvailableIPResponse AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) - /* AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. @@ -101,7 +96,6 @@ type AddressBlockAPI interface { // AddressBlockCreateNextAvailableSubnetExecute executes the request // @return IpamsvcCreateNextAvailableSubnetResponse AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) - /* AddressBlockDelete Move the address block to the recycle bin. @@ -116,7 +110,6 @@ type AddressBlockAPI interface { // AddressBlockDeleteExecute executes the request AddressBlockDeleteExecute(r ApiAddressBlockDeleteRequest) (*http.Response, error) - /* AddressBlockList Retrieve the address blocks. @@ -131,7 +124,6 @@ type AddressBlockAPI interface { // AddressBlockListExecute executes the request // @return IpamsvcListAddressBlockResponse AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) - /* AddressBlockListNextAvailableAB List Next Available Address Block objects. @@ -147,7 +139,6 @@ type AddressBlockAPI interface { // AddressBlockListNextAvailableABExecute executes the request // @return IpamsvcNextAvailableABResponse AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) - /* AddressBlockListNextAvailableIP Retrieve the next available IP address. @@ -163,7 +154,6 @@ type AddressBlockAPI interface { // AddressBlockListNextAvailableIPExecute executes the request // @return IpamsvcNextAvailableIPResponse AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) - /* AddressBlockListNextAvailableSubnet List Next Available Subnet objects. @@ -179,7 +169,6 @@ type AddressBlockAPI interface { // AddressBlockListNextAvailableSubnetExecute executes the request // @return IpamsvcNextAvailableSubnetResponse AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) - /* AddressBlockRead Retrieve the address block. @@ -195,7 +184,6 @@ type AddressBlockAPI interface { // AddressBlockReadExecute executes the request // @return IpamsvcReadAddressBlockResponse AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) - /* AddressBlockUpdate Update the address block. @@ -336,7 +324,6 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -423,6 +410,14 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -466,7 +461,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -623,7 +617,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -762,7 +755,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -929,7 +921,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1232,7 +1223,6 @@ func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1385,7 +1375,6 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAdd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1518,7 +1507,6 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAdd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1681,7 +1669,6 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r Ap newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1814,7 +1801,6 @@ func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1905,6 +1891,14 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1948,6 +1942,5 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_asm.go b/ipam/api_asm.go index c388854..b2fe742 100644 --- a/ipam/api_asm.go +++ b/ipam/api_asm.go @@ -22,7 +22,6 @@ import ( ) type AsmAPI interface { - /* AsmCreate Update subnet and ranges for Automated Scope Management. @@ -38,7 +37,6 @@ type AsmAPI interface { // AsmCreateExecute executes the request // @return IpamsvcCreateASMResponse AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) - /* AsmList Retrieve suggested updates for Automated Scope Management. @@ -53,7 +51,6 @@ type AsmAPI interface { // AsmListExecute executes the request // @return IpamsvcListASMResponse AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) - /* AsmRead Retrieve the suggested update for Automated Scope Management. @@ -191,7 +188,6 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -319,7 +315,6 @@ func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResp newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -442,6 +437,5 @@ func (a *AsmAPIService) AsmReadExecute(r ApiAsmReadRequest) (*IpamsvcReadASMResp newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_dhcp_host.go b/ipam/api_dhcp_host.go index 967a2e0..a3d955b 100644 --- a/ipam/api_dhcp_host.go +++ b/ipam/api_dhcp_host.go @@ -22,7 +22,6 @@ import ( ) type DhcpHostAPI interface { - /* DhcpHostList Retrieve DHCP hosts. @@ -37,7 +36,6 @@ type DhcpHostAPI interface { // DhcpHostListExecute executes the request // @return IpamsvcListHostResponse DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) - /* DhcpHostListAssociations Retrieve DHCP host associations. @@ -52,7 +50,6 @@ type DhcpHostAPI interface { // DhcpHostListAssociationsExecute executes the request // @return IpamsvcHostAssociationsResponse DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) - /* DhcpHostRead Retrieve the DHCP host. @@ -68,7 +65,6 @@ type DhcpHostAPI interface { // DhcpHostReadExecute executes the request // @return IpamsvcReadHostResponse DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) - /* DhcpHostUpdate Update the DHCP hosts. @@ -274,7 +270,6 @@ func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -386,7 +381,6 @@ func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAs newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -509,7 +503,6 @@ func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -590,6 +583,14 @@ func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -633,6 +634,5 @@ func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_dns_usage.go b/ipam/api_dns_usage.go index 009657f..ce964cf 100644 --- a/ipam/api_dns_usage.go +++ b/ipam/api_dns_usage.go @@ -22,7 +22,6 @@ import ( ) type DnsUsageAPI interface { - /* DnsUsageList Retrieve DNS usage for multiple objects. @@ -36,7 +35,6 @@ type DnsUsageAPI interface { // DnsUsageListExecute executes the request // @return IpamsvcListDNSUsageResponse DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) - /* DnsUsageRead Retrieve the DNS usage. @@ -220,7 +218,6 @@ func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -342,6 +339,5 @@ func (a *DnsUsageAPIService) DnsUsageReadExecute(r ApiDnsUsageReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_filter.go b/ipam/api_filter.go index 173d0a9..572f312 100644 --- a/ipam/api_filter.go +++ b/ipam/api_filter.go @@ -21,7 +21,6 @@ import ( ) type FilterAPI interface { - /* FilterList Retrieve DHCP filters. @@ -224,6 +223,5 @@ func (a *FilterAPIService) FilterListExecute(r ApiFilterListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_fixed_address.go b/ipam/api_fixed_address.go index 11bcd3e..15ede2e 100644 --- a/ipam/api_fixed_address.go +++ b/ipam/api_fixed_address.go @@ -22,7 +22,6 @@ import ( ) type FixedAddressAPI interface { - /* FixedAddressCreate Create the fixed address. @@ -37,7 +36,6 @@ type FixedAddressAPI interface { // FixedAddressCreateExecute executes the request // @return IpamsvcCreateFixedAddressResponse FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) - /* FixedAddressDelete Move the fixed address to the recycle bin. @@ -52,7 +50,6 @@ type FixedAddressAPI interface { // FixedAddressDeleteExecute executes the request FixedAddressDeleteExecute(r ApiFixedAddressDeleteRequest) (*http.Response, error) - /* FixedAddressList Retrieve fixed addresses. @@ -67,7 +64,6 @@ type FixedAddressAPI interface { // FixedAddressListExecute executes the request // @return IpamsvcListFixedAddressResponse FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) - /* FixedAddressRead Retrieve the fixed address. @@ -83,7 +79,6 @@ type FixedAddressAPI interface { // FixedAddressReadExecute executes the request // @return IpamsvcReadFixedAddressResponse FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) - /* FixedAddressUpdate Update the fixed address. @@ -187,6 +182,14 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -230,7 +233,6 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -533,7 +535,6 @@ func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -666,7 +667,6 @@ func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -757,6 +757,14 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -800,6 +808,5 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_global.go b/ipam/api_global.go index 41d3a22..d1f14ea 100644 --- a/ipam/api_global.go +++ b/ipam/api_global.go @@ -22,7 +22,6 @@ import ( ) type GlobalAPI interface { - /* GlobalRead Retrieve the global configuration. @@ -37,7 +36,6 @@ type GlobalAPI interface { // GlobalReadExecute executes the request // @return IpamsvcReadGlobalResponse GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) - /* GlobalRead2 Retrieve the global configuration. @@ -53,7 +51,6 @@ type GlobalAPI interface { // GlobalRead2Execute executes the request // @return IpamsvcReadGlobalResponse GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) - /* GlobalUpdate Update the global configuration. @@ -68,7 +65,6 @@ type GlobalAPI interface { // GlobalUpdateExecute executes the request // @return IpamsvcUpdateGlobalResponse GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) - /* GlobalUpdate2 Update the global configuration. @@ -204,7 +200,6 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -327,7 +322,6 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*Ipamsvc newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -447,7 +441,6 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -571,6 +564,5 @@ func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_ha_group.go b/ipam/api_ha_group.go index 41187ac..06a4fc8 100644 --- a/ipam/api_ha_group.go +++ b/ipam/api_ha_group.go @@ -22,7 +22,6 @@ import ( ) type HaGroupAPI interface { - /* HaGroupCreate Create the HA group. @@ -37,7 +36,6 @@ type HaGroupAPI interface { // HaGroupCreateExecute executes the request // @return IpamsvcCreateHAGroupResponse HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) - /* HaGroupDelete Delete the HA group. @@ -52,7 +50,6 @@ type HaGroupAPI interface { // HaGroupDeleteExecute executes the request HaGroupDeleteExecute(r ApiHaGroupDeleteRequest) (*http.Response, error) - /* HaGroupList Retrieve HA groups. @@ -67,7 +64,6 @@ type HaGroupAPI interface { // HaGroupListExecute executes the request // @return IpamsvcListHAGroupResponse HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) - /* HaGroupRead Retrieve the HA group. @@ -83,7 +79,6 @@ type HaGroupAPI interface { // HaGroupReadExecute executes the request // @return IpamsvcReadHAGroupResponse HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) - /* HaGroupUpdate Update the HA group. @@ -177,6 +172,14 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -523,7 +525,6 @@ func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -656,7 +657,6 @@ func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -780,6 +780,5 @@ func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_hardware_filter.go b/ipam/api_hardware_filter.go index 1e61dcb..18649ed 100644 --- a/ipam/api_hardware_filter.go +++ b/ipam/api_hardware_filter.go @@ -22,7 +22,6 @@ import ( ) type HardwareFilterAPI interface { - /* HardwareFilterCreate Create the hardware filter. @@ -37,7 +36,6 @@ type HardwareFilterAPI interface { // HardwareFilterCreateExecute executes the request // @return IpamsvcCreateHardwareFilterResponse HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) - /* HardwareFilterDelete Move the hardware filter to the recycle bin. @@ -52,7 +50,6 @@ type HardwareFilterAPI interface { // HardwareFilterDeleteExecute executes the request HardwareFilterDeleteExecute(r ApiHardwareFilterDeleteRequest) (*http.Response, error) - /* HardwareFilterList Retrieve hardware filters. @@ -67,7 +64,6 @@ type HardwareFilterAPI interface { // HardwareFilterListExecute executes the request // @return IpamsvcListHardwareFilterResponse HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) - /* HardwareFilterRead Retrieve the hardware filter. @@ -83,7 +79,6 @@ type HardwareFilterAPI interface { // HardwareFilterReadExecute executes the request // @return IpamsvcReadHardwareFilterResponse HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) - /* HardwareFilterUpdate Update the hardware filter. @@ -177,6 +172,14 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilter newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilter newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilt newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_ip_space.go b/ipam/api_ip_space.go index 628b1f9..ac81c8b 100644 --- a/ipam/api_ip_space.go +++ b/ipam/api_ip_space.go @@ -22,7 +22,6 @@ import ( ) type IpSpaceAPI interface { - /* IpSpaceBulkCopy Copy the specified address block and subnets in the IP space. @@ -42,7 +41,6 @@ type IpSpaceAPI interface { // IpSpaceBulkCopyExecute executes the request // @return IpamsvcBulkCopyIPSpaceResponse IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) - /* IpSpaceCopy Copy the IP space. @@ -58,7 +56,6 @@ type IpSpaceAPI interface { // IpSpaceCopyExecute executes the request // @return IpamsvcCopyIPSpaceResponse IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) - /* IpSpaceCreate Create the IP space. @@ -73,7 +70,6 @@ type IpSpaceAPI interface { // IpSpaceCreateExecute executes the request // @return IpamsvcCreateIPSpaceResponse IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) - /* IpSpaceDelete Move the IP space to the recycle bin. @@ -88,7 +84,6 @@ type IpSpaceAPI interface { // IpSpaceDeleteExecute executes the request IpSpaceDeleteExecute(r ApiIpSpaceDeleteRequest) (*http.Response, error) - /* IpSpaceList Retrieve IP spaces. @@ -103,7 +98,6 @@ type IpSpaceAPI interface { // IpSpaceListExecute executes the request // @return IpamsvcListIPSpaceResponse IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) - /* IpSpaceRead Retrieve the IP space. @@ -119,7 +113,6 @@ type IpSpaceAPI interface { // IpSpaceReadExecute executes the request // @return IpamsvcReadIPSpaceResponse IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) - /* IpSpaceUpdate Update the IP space. @@ -261,7 +254,6 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -385,7 +377,6 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -472,6 +463,14 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -515,7 +514,6 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -818,7 +816,6 @@ func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -951,7 +948,6 @@ func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1042,6 +1038,14 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1085,6 +1089,5 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_ipam_host.go b/ipam/api_ipam_host.go index be8a550..7e562ec 100644 --- a/ipam/api_ipam_host.go +++ b/ipam/api_ipam_host.go @@ -22,7 +22,6 @@ import ( ) type IpamHostAPI interface { - /* IpamHostCreate Create the IPAM host. @@ -37,7 +36,6 @@ type IpamHostAPI interface { // IpamHostCreateExecute executes the request // @return IpamsvcCreateIpamHostResponse IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) - /* IpamHostDelete Move the IPAM host to the recycle bin. @@ -52,7 +50,6 @@ type IpamHostAPI interface { // IpamHostDeleteExecute executes the request IpamHostDeleteExecute(r ApiIpamHostDeleteRequest) (*http.Response, error) - /* IpamHostList Retrieve the IPAM hosts. @@ -67,7 +64,6 @@ type IpamHostAPI interface { // IpamHostListExecute executes the request // @return IpamsvcListIpamHostResponse IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) - /* IpamHostRead Retrieve the IPAM host. @@ -83,7 +79,6 @@ type IpamHostAPI interface { // IpamHostReadExecute executes the request // @return IpamsvcReadIpamHostResponse IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) - /* IpamHostUpdate Update the IPAM host. @@ -177,6 +172,14 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -646,7 +647,6 @@ func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -727,6 +727,14 @@ func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) ( if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -770,6 +778,5 @@ func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_leases_command.go b/ipam/api_leases_command.go index fa16166..02fb0c3 100644 --- a/ipam/api_leases_command.go +++ b/ipam/api_leases_command.go @@ -21,7 +21,6 @@ import ( ) type LeasesCommandAPI interface { - /* LeasesCommandCreate Perform actions like clearing DHCP lease(s). @@ -157,6 +156,5 @@ func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_code.go b/ipam/api_option_code.go index df9daf3..17006da 100644 --- a/ipam/api_option_code.go +++ b/ipam/api_option_code.go @@ -22,7 +22,6 @@ import ( ) type OptionCodeAPI interface { - /* OptionCodeCreate Create the DHCP option code. @@ -37,7 +36,6 @@ type OptionCodeAPI interface { // OptionCodeCreateExecute executes the request // @return IpamsvcCreateOptionCodeResponse OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) - /* OptionCodeDelete Delete the DHCP option code. @@ -52,7 +50,6 @@ type OptionCodeAPI interface { // OptionCodeDeleteExecute executes the request OptionCodeDeleteExecute(r ApiOptionCodeDeleteRequest) (*http.Response, error) - /* OptionCodeList Retrieve DHCP option codes. @@ -67,7 +64,6 @@ type OptionCodeAPI interface { // OptionCodeListExecute executes the request // @return IpamsvcListOptionCodeResponse OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) - /* OptionCodeRead Retrieve the DHCP option code. @@ -83,7 +79,6 @@ type OptionCodeAPI interface { // OptionCodeReadExecute executes the request // @return IpamsvcReadOptionCodeResponse OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) - /* OptionCodeUpdate Update the DHCP option code. @@ -220,7 +215,6 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -493,7 +487,6 @@ func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -616,7 +609,6 @@ func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -740,6 +732,5 @@ func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_filter.go b/ipam/api_option_filter.go index fa0ba3e..f49e936 100644 --- a/ipam/api_option_filter.go +++ b/ipam/api_option_filter.go @@ -22,7 +22,6 @@ import ( ) type OptionFilterAPI interface { - /* OptionFilterCreate Create the DHCP option filter. @@ -37,7 +36,6 @@ type OptionFilterAPI interface { // OptionFilterCreateExecute executes the request // @return IpamsvcCreateOptionFilterResponse OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) - /* OptionFilterDelete Move the DHCP option filter to the recycle bin. @@ -52,7 +50,6 @@ type OptionFilterAPI interface { // OptionFilterDeleteExecute executes the request OptionFilterDeleteExecute(r ApiOptionFilterDeleteRequest) (*http.Response, error) - /* OptionFilterList Retrieve DHCP option filters. @@ -67,7 +64,6 @@ type OptionFilterAPI interface { // OptionFilterListExecute executes the request // @return IpamsvcListOptionFilterResponse OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) - /* OptionFilterRead Retrieve the DHCP option filter. @@ -83,7 +79,6 @@ type OptionFilterAPI interface { // OptionFilterReadExecute executes the request // @return IpamsvcReadOptionFilterResponse OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) - /* OptionFilterUpdate Update the DHCP option filter. @@ -177,6 +172,14 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpda if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpda newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_group.go b/ipam/api_option_group.go index 702d1b9..b91cbbd 100644 --- a/ipam/api_option_group.go +++ b/ipam/api_option_group.go @@ -22,7 +22,6 @@ import ( ) type OptionGroupAPI interface { - /* OptionGroupCreate Create the DHCP option group. @@ -37,7 +36,6 @@ type OptionGroupAPI interface { // OptionGroupCreateExecute executes the request // @return IpamsvcCreateOptionGroupResponse OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) - /* OptionGroupDelete Move the DHCP option group to the recycle bin. @@ -52,7 +50,6 @@ type OptionGroupAPI interface { // OptionGroupDeleteExecute executes the request OptionGroupDeleteExecute(r ApiOptionGroupDeleteRequest) (*http.Response, error) - /* OptionGroupList Retrieve DHCP option groups. @@ -67,7 +64,6 @@ type OptionGroupAPI interface { // OptionGroupListExecute executes the request // @return IpamsvcListOptionGroupResponse OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) - /* OptionGroupRead Retrieve the DHCP option group. @@ -83,7 +79,6 @@ type OptionGroupAPI interface { // OptionGroupReadExecute executes the request // @return IpamsvcReadOptionGroupResponse OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) - /* OptionGroupUpdate Update the DHCP option group. @@ -177,6 +172,14 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_option_space.go b/ipam/api_option_space.go index 3f25d66..babcf62 100644 --- a/ipam/api_option_space.go +++ b/ipam/api_option_space.go @@ -22,7 +22,6 @@ import ( ) type OptionSpaceAPI interface { - /* OptionSpaceCreate Create the DHCP option space. @@ -37,7 +36,6 @@ type OptionSpaceAPI interface { // OptionSpaceCreateExecute executes the request // @return IpamsvcCreateOptionSpaceResponse OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) - /* OptionSpaceDelete Move the DHCP option space to the recycle bin. @@ -52,7 +50,6 @@ type OptionSpaceAPI interface { // OptionSpaceDeleteExecute executes the request OptionSpaceDeleteExecute(r ApiOptionSpaceDeleteRequest) (*http.Response, error) - /* OptionSpaceList Retrieve DHCP option spaces. @@ -67,7 +64,6 @@ type OptionSpaceAPI interface { // OptionSpaceListExecute executes the request // @return IpamsvcListOptionSpaceResponse OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) - /* OptionSpaceRead Retrieve the DHCP option space. @@ -83,7 +79,6 @@ type OptionSpaceAPI interface { // OptionSpaceReadExecute executes the request // @return IpamsvcReadOptionSpaceResponse OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) - /* OptionSpaceUpdate Update the DHCP option space. @@ -177,6 +172,14 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_range.go b/ipam/api_range.go index 2c229f6..e0f0bd6 100644 --- a/ipam/api_range.go +++ b/ipam/api_range.go @@ -22,7 +22,6 @@ import ( ) type RangeAPI interface { - /* RangeCreate Create the range. @@ -37,7 +36,6 @@ type RangeAPI interface { // RangeCreateExecute executes the request // @return IpamsvcCreateRangeResponse RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) - /* RangeCreateNextAvailableIP Allocate the next available IP address. @@ -53,7 +51,6 @@ type RangeAPI interface { // RangeCreateNextAvailableIPExecute executes the request // @return IpamsvcCreateNextAvailableIPResponse RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) - /* RangeDelete Move the range to the recycle bin. @@ -68,7 +65,6 @@ type RangeAPI interface { // RangeDeleteExecute executes the request RangeDeleteExecute(r ApiRangeDeleteRequest) (*http.Response, error) - /* RangeList Retrieve ranges. @@ -83,7 +79,6 @@ type RangeAPI interface { // RangeListExecute executes the request // @return IpamsvcListRangeResponse RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) - /* RangeListNextAvailableIP Retrieve the next available IP address. @@ -99,7 +94,6 @@ type RangeAPI interface { // RangeListNextAvailableIPExecute executes the request // @return IpamsvcNextAvailableIPResponse RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) - /* RangeRead Retrieve the range. @@ -115,7 +109,6 @@ type RangeAPI interface { // RangeReadExecute executes the request // @return IpamsvcReadRangeResponse RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) - /* RangeUpdate Update the range. @@ -219,6 +212,14 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -262,7 +263,6 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -401,7 +401,6 @@ func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNext newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -704,7 +703,6 @@ func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -837,7 +835,6 @@ func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvai newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -970,7 +967,6 @@ func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1061,6 +1057,14 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1104,6 +1108,5 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_server.go b/ipam/api_server.go index 71ac616..a9336ef 100644 --- a/ipam/api_server.go +++ b/ipam/api_server.go @@ -22,7 +22,6 @@ import ( ) type ServerAPI interface { - /* ServerCreate Create the DHCP configuration profile. @@ -37,7 +36,6 @@ type ServerAPI interface { // ServerCreateExecute executes the request // @return IpamsvcCreateServerResponse ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) - /* ServerDelete Move the DHCP configuration profile to the recycle bin. @@ -52,7 +50,6 @@ type ServerAPI interface { // ServerDeleteExecute executes the request ServerDeleteExecute(r ApiServerDeleteRequest) (*http.Response, error) - /* ServerList Retrieve DHCP configuration profiles. @@ -67,7 +64,6 @@ type ServerAPI interface { // ServerListExecute executes the request // @return IpamsvcListServerResponse ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) - /* ServerRead Retrieve the DHCP configuration profile. @@ -83,7 +79,6 @@ type ServerAPI interface { // ServerReadExecute executes the request // @return IpamsvcReadServerResponse ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) - /* ServerUpdate Update the DHCP configuration profile. @@ -187,6 +182,14 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -230,7 +233,6 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -533,7 +535,6 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -666,7 +667,6 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -757,6 +757,14 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -800,6 +808,5 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/api_subnet.go b/ipam/api_subnet.go index 8accb55..42f1527 100644 --- a/ipam/api_subnet.go +++ b/ipam/api_subnet.go @@ -22,7 +22,6 @@ import ( ) type SubnetAPI interface { - /* SubnetCopy Copy the subnet. @@ -38,7 +37,6 @@ type SubnetAPI interface { // SubnetCopyExecute executes the request // @return IpamsvcCopySubnetResponse SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) - /* SubnetCreate Create the subnet. @@ -53,7 +51,6 @@ type SubnetAPI interface { // SubnetCreateExecute executes the request // @return IpamsvcCreateSubnetResponse SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) - /* SubnetCreateNextAvailableIP Allocate the next available IP address. @@ -69,7 +66,6 @@ type SubnetAPI interface { // SubnetCreateNextAvailableIPExecute executes the request // @return IpamsvcCreateNextAvailableIPResponse SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) - /* SubnetDelete Move the subnet to the recycle bin. @@ -84,7 +80,6 @@ type SubnetAPI interface { // SubnetDeleteExecute executes the request SubnetDeleteExecute(r ApiSubnetDeleteRequest) (*http.Response, error) - /* SubnetList Retrieve subnets. @@ -99,7 +94,6 @@ type SubnetAPI interface { // SubnetListExecute executes the request // @return IpamsvcListSubnetResponse SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) - /* SubnetListNextAvailableIP Retrieve the next available IP address. @@ -115,7 +109,6 @@ type SubnetAPI interface { // SubnetListNextAvailableIPExecute executes the request // @return IpamsvcNextAvailableIPResponse SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) - /* SubnetRead Retrieve the subnet. @@ -131,7 +124,6 @@ type SubnetAPI interface { // SubnetReadExecute executes the request // @return IpamsvcReadSubnetResponse SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) - /* SubnetUpdate Update the subnet. @@ -272,7 +264,6 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -359,6 +350,14 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -402,7 +401,6 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -541,7 +539,6 @@ func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateN newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -844,7 +841,6 @@ func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -977,7 +973,6 @@ func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1110,7 +1105,6 @@ func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1201,6 +1195,14 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -1244,6 +1246,5 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/test/api_address_block_test.go b/ipam/test/api_address_block_test.go index 0894044..7f15f1b 100644 --- a/ipam/test/api_address_block_test.go +++ b/ipam/test/api_address_block_test.go @@ -7,185 +7,320 @@ Testing AddressBlockAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_AddressBlockAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test AddressBlockAPIService AddressBlockCopy", func(t *testing.T) { - - t.Skip("skip test") // remove to run test +var cidrValue int64 = 34 - var id string +var IpamsvcCopyAddressBlock_Post = openapiclient.IpamsvcCopyAddressBlock{ + Id: openapiclient.PtrString("Test Copy"), +} +var IpamsvcAddressBlock_Post = openapiclient.IpamsvcAddressBlock{ + Id: openapiclient.PtrString("Test Create"), + Cidr: &cidrValue, +} +var IpamsvcAddressBlock_Patch = openapiclient.IpamsvcAddressBlock{ + Id: openapiclient.PtrString("Test Update"), + Cidr: &cidrValue, +} - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), id).Execute() +func Test_ipam_AddressBlockAPIService(t *testing.T) { - require.Nil(t, err) + t.Run("Test AddressBlockAPIService AddressBlockCopy", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcCopyAddressBlock_Post.Id+"/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcCopyAddressBlock + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcCopyAddressBlock_Post, reqBody) + + response := openapiclient.IpamsvcCopyAddressBlockResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), *IpamsvcCopyAddressBlock_Post.Id).Body(IpamsvcCopyAddressBlock_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcAddressBlock + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcAddressBlock_Post, reqBody) + + response := openapiclient.IpamsvcCreateAddressBlockResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(IpamsvcAddressBlock_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockCreateNextAvailableAB", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableaddressblock", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcCreateNextAvailableABResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), *IpamsvcAddressBlock_Post.Id).Cidr(34).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockCreateNextAvailableIP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcCreateNextAvailableIPResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockCreateNextAvailableSubnet", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailablesubnet", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcCreateNextAvailableSubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), *IpamsvcAddressBlock_Post.Id).Cidr(34).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListAddressBlockResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockListNextAvailableAB", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableaddressblock", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcNextAvailableABResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AddressBlockAPIService AddressBlockListNextAvailableIP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcNextAvailableIPResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockListNextAvailableSubnet", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailablesubnet", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcNextAvailableSubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadAddressBlockResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AddressBlockAPIService AddressBlockUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcAddressBlock + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcAddressBlock_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateAddressBlockResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), *IpamsvcAddressBlock_Patch.Id).Body(IpamsvcAddressBlock_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_address_test.go b/ipam/test/api_address_test.go index c1209ae..89be49f 100644 --- a/ipam/test/api_address_test.go +++ b/ipam/test/api_address_test.go @@ -7,87 +7,151 @@ Testing AddressAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_AddressAPIService(t *testing.T) { +var IpamsvcAddress_Post = openapiclient.IpamsvcAddress{ + Id: openapiclient.PtrString("Test Create"), +} +var IpamsvcAddress_Patch = openapiclient.IpamsvcAddress{ + Id: openapiclient.PtrString("Test Update"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_AddressAPIService(t *testing.T) { t.Run("Test AddressAPIService AddressCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AddressAPI.AddressCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcAddress + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcAddress_Post, reqBody) + + response := openapiclient.IpamsvcCreateAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(IpamsvcAddress_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AddressAPIService AddressDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.AddressAPI.AddressDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddress_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.AddressAPI.AddressDelete(context.Background(), *IpamsvcAddress_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AddressAPIService AddressList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.AddressAPI.AddressList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AddressAPIService AddressRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressAPI.AddressRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddress_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressAPI.AddressRead(context.Background(), *IpamsvcAddress_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test AddressAPIService AddressUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AddressAPI.AddressUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddress_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcAddress + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcAddress_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AddressAPI.AddressUpdate(context.Background(), *IpamsvcAddress_Patch.Id).Body(IpamsvcAddress_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_asm_test.go b/ipam/test/api_asm_test.go index d69768e..7406546 100644 --- a/ipam/test/api_asm_test.go +++ b/ipam/test/api_asm_test.go @@ -7,60 +7,100 @@ Testing AsmAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_AsmAPIService(t *testing.T) { +var IpamsvcASM_Post = openapiclient.IpamsvcASM{ + Id: openapiclient.PtrString("Test Create"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_AsmAPIService(t *testing.T) { t.Run("Test AsmAPIService AsmCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AsmAPI.AsmCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/asm", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcASM + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcASM_Post, reqBody) + + response := openapiclient.IpamsvcCreateASMResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(IpamsvcASM_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AsmAPIService AsmList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/asm", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListASMResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.AsmAPI.AsmList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test AsmAPIService AsmRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.AsmAPI.AsmRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/asm/"+*IpamsvcASM_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadASMResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.AsmAPI.AsmRead(context.Background(), *IpamsvcASM_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_dhcp_host_test.go b/ipam/test/api_dhcp_host_test.go index 254c69c..bb556e5 100644 --- a/ipam/test/api_dhcp_host_test.go +++ b/ipam/test/api_dhcp_host_test.go @@ -7,76 +7,126 @@ Testing DhcpHostAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_DhcpHostAPIService(t *testing.T) { +var IpamsvcHost_Patch = openapiclient.IpamsvcHost{ + Id: openapiclient.PtrString("Test"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_DhcpHostAPIService(t *testing.T) { t.Run("Test DhcpHostAPIService DhcpHostList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/host", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DhcpHostAPIService DhcpHostListAssociations", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHost_Patch.Id+"/associations", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcHostAssociationsResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), *IpamsvcHost_Patch.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DhcpHostAPIService DhcpHostRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHost_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), *IpamsvcHost_Patch.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DhcpHostAPIService DhcpHostUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHost_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcHost + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcHost_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), *IpamsvcHost_Patch.Id).Body(IpamsvcHost_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_dns_usage_test.go b/ipam/test/api_dns_usage_test.go index f26257e..8af395c 100644 --- a/ipam/test/api_dns_usage_test.go +++ b/ipam/test/api_dns_usage_test.go @@ -7,48 +7,75 @@ Testing DnsUsageAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_DnsUsageAPIService(t *testing.T) { +var IpamsvcDNSUsage = openapiclient.IpamsvcDNSUsage{ + Id: openapiclient.PtrString("Test"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_DnsUsageAPIService(t *testing.T) { t.Run("Test DnsUsageAPIService DnsUsageList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/dns_usage", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListDNSUsageResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.DnsUsageAPI.DnsUsageList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test DnsUsageAPIService DnsUsageRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.DnsUsageAPI.DnsUsageRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/dns_usage/"+*IpamsvcDNSUsage.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadDNSUsageResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.DnsUsageAPI.DnsUsageRead(context.Background(), *IpamsvcDNSUsage.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) } diff --git a/ipam/test/api_filter_test.go b/ipam/test/api_filter_test.go index 911c411..5d74dd4 100644 --- a/ipam/test/api_filter_test.go +++ b/ipam/test/api_filter_test.go @@ -7,34 +7,51 @@ Testing FilterAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_FilterAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +var IpamsvcFilter_Post = openapiclient.IpamsvcFilter{ - t.Run("Test FilterAPIService FilterList", func(t *testing.T) { + Id: openapiclient.PtrString("Test"), +} - t.Skip("skip test") // remove to run test +func Test_ipam_FilterAPIService(t *testing.T) { + t.Run("Test FilterAPIService FilterList", func(t *testing.T) { + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/filter", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.FilterAPI.FilterList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_fixed_address_test.go b/ipam/test/api_fixed_address_test.go index 07629f5..ae5b9a7 100644 --- a/ipam/test/api_fixed_address_test.go +++ b/ipam/test/api_fixed_address_test.go @@ -7,87 +7,151 @@ Testing FixedAddressAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_FixedAddressAPIService(t *testing.T) { +var IpamsvcFixedAddress_Post = openapiclient.IpamsvcFixedAddress{ + Id: openapiclient.PtrString("Test Create"), +} +var IpamsvcFixedAddress_Patch = openapiclient.IpamsvcFixedAddress{ + Id: openapiclient.PtrString("Test Update"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_FixedAddressAPIService(t *testing.T) { t.Run("Test FixedAddressAPIService FixedAddressCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcFixedAddress + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcFixedAddress_Post, reqBody) + + response := openapiclient.IpamsvcCreateFixedAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(IpamsvcFixedAddress_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test FixedAddressAPIService FixedAddressDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddress_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), *IpamsvcFixedAddress_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test FixedAddressAPIService FixedAddressList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListFixedAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test FixedAddressAPIService FixedAddressRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddress_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadFixedAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), *IpamsvcFixedAddress_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test FixedAddressAPIService FixedAddressUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddress_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcFixedAddress + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcFixedAddress_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateFixedAddressResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), *IpamsvcAddress_Patch.Id).Body(IpamsvcFixedAddress_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_global_test.go b/ipam/test/api_global_test.go index 481fde3..2e041fe 100644 --- a/ipam/test/api_global_test.go +++ b/ipam/test/api_global_test.go @@ -7,74 +7,132 @@ Testing GlobalAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_GlobalAPIService(t *testing.T) { +var IpamsvcGlobal_Patch1 = openapiclient.IpamsvcGlobal{ + Id: openapiclient.PtrString("Test 1"), +} +var IpamsvcGlobal_Patch2 = openapiclient.IpamsvcGlobal{ + Id: openapiclient.PtrString("Test 2"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_GlobalAPIService(t *testing.T) { t.Run("Test GlobalAPIService GlobalRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/global", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadGlobalResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalRead2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/global/"+*IpamsvcGlobal_Patch2.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadGlobalResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), *IpamsvcGlobal_Patch2.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - t.Run("Test GlobalAPIService GlobalUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/global", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcGlobal + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcGlobal_Patch1, reqBody) + + response := openapiclient.IpamsvcUpdateGlobalResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(IpamsvcGlobal_Patch1).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test GlobalAPIService GlobalUpdate2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/global/"+*IpamsvcGlobal_Patch2.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcGlobal + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcGlobal_Patch2, reqBody) + + response := openapiclient.IpamsvcUpdateGlobalResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), *IpamsvcGlobal_Patch2.Id).Body(IpamsvcGlobal_Patch2).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_ha_group_test.go b/ipam/test/api_ha_group_test.go index ecbd318..268e3bf 100644 --- a/ipam/test/api_ha_group_test.go +++ b/ipam/test/api_ha_group_test.go @@ -7,87 +7,151 @@ Testing HaGroupAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_HaGroupAPIService(t *testing.T) { +var IpamsvcHAGroup_Post = openapiclient.IpamsvcHAGroup{ + Id: openapiclient.PtrString("Test Create"), +} +var IpamsvcHAGroup_Patch = openapiclient.IpamsvcHAGroup{ + Id: openapiclient.PtrString("Test Update"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_HaGroupAPIService(t *testing.T) { t.Run("Test HaGroupAPIService HaGroupCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcHAGroup + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcHAGroup_Post, reqBody) + + response := openapiclient.IpamsvcCreateHAGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(IpamsvcHAGroup_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HaGroupAPIService HaGroupDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroup_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), *IpamsvcHAGroup_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HaGroupAPIService HaGroupList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListHAGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.HaGroupAPI.HaGroupList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HaGroupAPIService HaGroupRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroup_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadHAGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), *IpamsvcHAGroup_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HaGroupAPIService HaGroupUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroup_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcHAGroup + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcHAGroup_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateHAGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), *IpamsvcHAGroup_Patch.Id).Body(IpamsvcHAGroup_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_hardware_filter_test.go b/ipam/test/api_hardware_filter_test.go index 63cac0d..8deedf4 100644 --- a/ipam/test/api_hardware_filter_test.go +++ b/ipam/test/api_hardware_filter_test.go @@ -7,87 +7,151 @@ Testing HardwareFilterAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_HardwareFilterAPIService(t *testing.T) { +var IpamsvcHardwareFilter_Post = openapiclient.IpamsvcHardwareFilter{ + Id: openapiclient.PtrString("Test Create"), +} +var IpamsvcHardwareFilter_Patch = openapiclient.IpamsvcHardwareFilter{ + Id: openapiclient.PtrString("Test Update"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_HardwareFilterAPIService(t *testing.T) { t.Run("Test HardwareFilterAPIService HardwareFilterCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcHardwareFilter + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcHardwareFilter_Post, reqBody) + + response := openapiclient.IpamsvcCreateHardwareFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(IpamsvcHardwareFilter_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HardwareFilterAPIService HardwareFilterDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilter_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), *IpamsvcHardwareFilter_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HardwareFilterAPIService HardwareFilterList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListHardwareFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HardwareFilterAPIService HardwareFilterRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilter_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadHardwareFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), *IpamsvcHardwareFilter_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test HardwareFilterAPIService HardwareFilterUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilter_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcHardwareFilter + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcHardwareFilter_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateHardwareFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), *IpamsvcHardwareFilter_Post.Id).Body(IpamsvcHardwareFilter_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_ip_space_test.go b/ipam/test/api_ip_space_test.go index 51626e0..fb1dc99 100644 --- a/ipam/test/api_ip_space_test.go +++ b/ipam/test/api_ip_space_test.go @@ -7,113 +7,211 @@ Testing IpSpaceAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_IpSpaceAPIService(t *testing.T) { +var IpamsvcBulkCopyIPSpace_Post = openapiclient.IpamsvcBulkCopyIPSpace{} +var IpamsvcCopyIPSpace_Post = openapiclient.IpamsvcCopyIPSpace{ + Id: openapiclient.PtrString("Test Copy Post"), +} +var IpamsvcIPSpace_Post = openapiclient.IpamsvcIPSpace{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcIPSpace_Patch = openapiclient.IpamsvcIPSpace{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_IpSpaceAPIService(t *testing.T) { t.Run("Test IpSpaceAPIService IpSpaceBulkCopy", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/bulk_copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcBulkCopyIPSpace + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcBulkCopyIPSpace_Post, reqBody) + + response := openapiclient.IpamsvcBulkCopyIPSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(IpamsvcBulkCopyIPSpace_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpSpaceAPIService IpSpaceCopy", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcCopyIPSpace_Post.Id+"/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcCopyIPSpace + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcCopyIPSpace_Post, reqBody) + + response := openapiclient.IpamsvcCopyIPSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), *IpamsvcCopyIPSpace_Post.Id).Body(IpamsvcCopyIPSpace_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpSpaceAPIService IpSpaceCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcIPSpace + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcIPSpace_Post, reqBody) + + response := openapiclient.IpamsvcCreateIPSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(IpamsvcIPSpace_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpSpaceAPIService IpSpaceDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpace_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), *IpamsvcIPSpace_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpSpaceAPIService IpSpaceList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListIPSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpSpaceAPIService IpSpaceRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpace_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadIPSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), *IpamsvcIPSpace_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpSpaceAPIService IpSpaceUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpace_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcIPSpace + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcIPSpace_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateIPSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), *IpamsvcIPSpace_Patch.Id).Body(IpamsvcIPSpace_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_ipam_host_test.go b/ipam/test/api_ipam_host_test.go index 0775527..0e29af8 100644 --- a/ipam/test/api_ipam_host_test.go +++ b/ipam/test/api_ipam_host_test.go @@ -7,87 +7,151 @@ Testing IpamHostAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_IpamHostAPIService(t *testing.T) { +var IpamsvcIpamHost_Post = openapiclient.IpamsvcIpamHost{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcIpamHost_Patch = openapiclient.IpamsvcIpamHost{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_IpamHostAPIService(t *testing.T) { t.Run("Test IpamHostAPIService IpamHostCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/host", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcIpamHost + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcIpamHost_Post, reqBody) + + response := openapiclient.IpamsvcCreateIpamHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(IpamsvcIpamHost_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpamHostAPIService IpamHostDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHost_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), *IpamsvcIpamHost_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpamHostAPIService IpamHostList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/host", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListIpamHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.IpamHostAPI.IpamHostList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpamHostAPIService IpamHostRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHost_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadIpamHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), *IpamsvcIpamHost_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test IpamHostAPIService IpamHostUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHost_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcIpamHost + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcIpamHost_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateIpamHostResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), *IpamsvcIpamHost_Patch.Id).Body(IpamsvcIpamHost_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_leases_command_test.go b/ipam/test/api_leases_command_test.go index b2775a0..408864c 100644 --- a/ipam/test/api_leases_command_test.go +++ b/ipam/test/api_leases_command_test.go @@ -7,34 +7,52 @@ Testing LeasesCommandAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_LeasesCommandAPIService(t *testing.T) { +var IpamsvcLeasesCommand_Post = openapiclient.IpamsvcLeasesCommand{} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_LeasesCommandAPIService(t *testing.T) { t.Run("Test LeasesCommandAPIService LeasesCommandCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/leases_command", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcLeasesCommand + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcLeasesCommand_Post, reqBody) + + response := openapiclient.IpamsvcCreateLeasesCommandResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(IpamsvcLeasesCommand_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_option_code_test.go b/ipam/test/api_option_code_test.go index 1dad01a..4b57f12 100644 --- a/ipam/test/api_option_code_test.go +++ b/ipam/test/api_option_code_test.go @@ -7,87 +7,152 @@ Testing OptionCodeAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_OptionCodeAPIService(t *testing.T) { +var IpamsvcOptionCode_Post = openapiclient.IpamsvcOptionCode{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcOptionCode_Patch = openapiclient.IpamsvcOptionCode{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_OptionCodeAPIService(t *testing.T) { t.Run("Test OptionCodeAPIService OptionCodeCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_code", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionCode + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionCode_Post, reqBody) + + response := openapiclient.IpamsvcCreateOptionCodeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(IpamsvcOptionCode_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionCodeAPIService OptionCodeDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCode_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), *IpamsvcOptionCode_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionCodeAPIService OptionCodeList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_code", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListOptionCodeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionCodeAPIService OptionCodeRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCode_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadOptionCodeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), *IpamsvcOptionCode_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionCodeAPIService OptionCodeUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCode_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionCode + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionCode_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateOptionCodeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), *IpamsvcOptionCode_Patch.Id).Body(IpamsvcOptionCode_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_option_filter_test.go b/ipam/test/api_option_filter_test.go index 9865419..f276813 100644 --- a/ipam/test/api_option_filter_test.go +++ b/ipam/test/api_option_filter_test.go @@ -7,87 +7,151 @@ Testing OptionFilterAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_OptionFilterAPIService(t *testing.T) { +var IpamsvcOptionFilter_Post = openapiclient.IpamsvcOptionFilter{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcOptionFilter_Patch = openapiclient.IpamsvcOptionFilter{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_OptionFilterAPIService(t *testing.T) { t.Run("Test OptionFilterAPIService OptionFilterCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionFilter + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionFilter_Post, reqBody) + + response := openapiclient.IpamsvcCreateOptionFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(IpamsvcOptionFilter_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionFilterAPIService OptionFilterDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilter_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), *IpamsvcOptionFilter_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionFilterAPIService OptionFilterList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListOptionFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionFilterAPIService OptionFilterRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilter_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadOptionFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), *IpamsvcOptionFilter_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionFilterAPIService OptionFilterUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilter_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionFilter + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionFilter_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateOptionFilterResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), *IpamsvcOptionFilter_Post.Id).Body(IpamsvcOptionFilter_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_option_group_test.go b/ipam/test/api_option_group_test.go index 9e448b2..3870875 100644 --- a/ipam/test/api_option_group_test.go +++ b/ipam/test/api_option_group_test.go @@ -7,87 +7,151 @@ Testing OptionGroupAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_OptionGroupAPIService(t *testing.T) { +var IpamsvcOptionGroup_Post = openapiclient.IpamsvcOptionGroup{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcOptionGroup_Patch = openapiclient.IpamsvcOptionGroup{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_OptionGroupAPIService(t *testing.T) { t.Run("Test OptionGroupAPIService OptionGroupCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_group", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionGroup + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionGroup_Post, reqBody) + + response := openapiclient.IpamsvcCreateOptionGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(IpamsvcOptionGroup_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionGroupAPIService OptionGroupDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroup_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), *IpamsvcOptionGroup_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionGroupAPIService OptionGroupList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_group", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListOptionGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionGroupAPIService OptionGroupRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroup_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadOptionGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), *IpamsvcOptionGroup_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionGroupAPIService OptionGroupUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroup_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionGroup + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionGroup_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateOptionGroupResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), *IpamsvcOptionGroup_Patch.Id).Body(IpamsvcOptionGroup_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_option_space_test.go b/ipam/test/api_option_space_test.go index 0fc8b74..20fdad4 100644 --- a/ipam/test/api_option_space_test.go +++ b/ipam/test/api_option_space_test.go @@ -7,87 +7,151 @@ Testing OptionSpaceAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_OptionSpaceAPIService(t *testing.T) { +var IpamsvcOptionSpace_Post = openapiclient.IpamsvcOptionSpace{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcOptionSpace_Patch = openapiclient.IpamsvcOptionSpace{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_OptionSpaceAPIService(t *testing.T) { t.Run("Test OptionSpaceAPIService OptionSpaceCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_space", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionSpace + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionSpace_Post, reqBody) + + response := openapiclient.IpamsvcCreateOptionSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(IpamsvcOptionSpace_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionSpaceAPIService OptionSpaceDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpace_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), *IpamsvcOptionSpace_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionSpaceAPIService OptionSpaceList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_space", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListOptionSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionSpaceAPIService OptionSpaceRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpace_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadOptionSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), *IpamsvcOptionSpace_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test OptionSpaceAPIService OptionSpaceUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpace_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcOptionSpace + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcOptionSpace_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateOptionSpaceResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), *IpamsvcOptionSpace_Patch.Id).Body(IpamsvcOptionSpace_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_range_test.go b/ipam/test/api_range_test.go index 9d95b53..d308785 100644 --- a/ipam/test/api_range_test.go +++ b/ipam/test/api_range_test.go @@ -7,115 +7,200 @@ Testing RangeAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_RangeAPIService(t *testing.T) { +var IpamsvcRange_Post = openapiclient.IpamsvcRange{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcRange_Patch = openapiclient.IpamsvcRange{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_RangeAPIService(t *testing.T) { t.Run("Test RangeAPIService RangeCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.RangeAPI.RangeCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcRange + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcRange_Post, reqBody) + + response := openapiclient.IpamsvcCreateRangeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(IpamsvcRange_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RangeAPIService RangeCreateNextAvailableIP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcCreateNextAvailableIPResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), *IpamsvcRange_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RangeAPIService RangeDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.RangeAPI.RangeDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.RangeAPI.RangeDelete(context.Background(), *IpamsvcRange_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RangeAPIService RangeList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListRangeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.RangeAPI.RangeList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RangeAPIService RangeListNextAvailableIP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcNextAvailableIPResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), *IpamsvcRange_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RangeAPIService RangeRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadRangeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RangeAPI.RangeRead(context.Background(), *IpamsvcRange_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test RangeAPIService RangeUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcRange + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcRange_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateRangeResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.RangeAPI.RangeUpdate(context.Background(), *IpamsvcRange_Patch.Id).Body(IpamsvcRange_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_server_test.go b/ipam/test/api_server_test.go index bfbde6d..7cc260d 100644 --- a/ipam/test/api_server_test.go +++ b/ipam/test/api_server_test.go @@ -7,87 +7,151 @@ Testing ServerAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_ServerAPIService(t *testing.T) { +var IpamsvcServer_Post = openapiclient.IpamsvcServer{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcServer_Patch = openapiclient.IpamsvcServer{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_ServerAPIService(t *testing.T) { t.Run("Test ServerAPIService ServerCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/server", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcServer + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcServer_Post, reqBody) + + response := openapiclient.IpamsvcCreateServerResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(IpamsvcServer_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServer_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *IpamsvcServer_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/server", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListServerResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.ServerAPI.ServerList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServer_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadServerResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *IpamsvcServer_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test ServerAPIService ServerUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServer_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcServer + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcServer_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateServerResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *IpamsvcServer_Patch.Id).Body(IpamsvcServer_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/ipam/test/api_subnet_test.go b/ipam/test/api_subnet_test.go index 3960d6e..3271775 100644 --- a/ipam/test/api_subnet_test.go +++ b/ipam/test/api_subnet_test.go @@ -7,129 +7,230 @@ Testing SubnetAPIService // Code generated by OpenAPI Generator (https://openapi-generator.tech); -package ipam +package ipam_test import ( + "bytes" "context" + "encoding/json" + "github.com/stretchr/testify/assert" + "io" + "net/http" "testing" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/infobloxopen/bloxone-go-client/internal" openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -func Test_ipam_SubnetAPIService(t *testing.T) { +var IpamsvcCopySubnet_Post = openapiclient.IpamsvcCopySubnet{ + Id: openapiclient.PtrString("Test Copy"), +} +var IpamsvcSubnet_Post = openapiclient.IpamsvcSubnet{ + Id: openapiclient.PtrString("Test Post"), +} +var IpamsvcSubnet_Patch = openapiclient.IpamsvcSubnet{ + Id: openapiclient.PtrString("Test Patch"), +} - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) +func Test_ipam_SubnetAPIService(t *testing.T) { t.Run("Test SubnetAPIService SubnetCopy", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcCopySubnet_Post.Id+"/copy", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcCopySubnet + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcCopySubnet_Post, reqBody) + + response := openapiclient.IpamsvcCopySubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), *IpamsvcCopySubnet_Post.Id).Body(IpamsvcCopySubnet_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcSubnet + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcSubnet_Post, reqBody) + + response := openapiclient.IpamsvcCreateSubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(IpamsvcSubnet_Post).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetCreateNextAvailableIP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPost, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcCreateNextAvailableIPResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodDelete, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id, req.URL.Path) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader([]byte{})), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + httpRes, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + require.NoError(t, err) + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcListSubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) resp, httpRes, err := apiClient.SubnetAPI.SubnetList(context.Background()).Execute() - - require.Nil(t, err) + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetListNextAvailableIP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcNextAvailableIPResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodGet, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Accept")) + + response := openapiclient.IpamsvcReadSubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.SubnetAPI.SubnetRead(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) t.Run("Test SubnetAPIService SubnetUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Execute() - - require.Nil(t, err) + configuration := internal.NewConfiguration() + configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { + require.Equal(t, http.MethodPatch, req.Method) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Patch.Id, req.URL.Path) + require.Equal(t, "application/json", req.Header.Get("Content-Type")) + + var reqBody openapiclient.IpamsvcSubnet + assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + assert.Equal(t, IpamsvcSubnet_Patch, reqBody) + + response := openapiclient.IpamsvcUpdateSubnetResponse{} + body, err := json.Marshal(response) + assert.NoError(t, err) + + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewReader(body)), + Header: map[string][]string{"Content-Type": {"application/json"}}, + } + }) + apiClient := openapiclient.NewAPIClient(configuration) + resp, httpRes, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), *IpamsvcSubnet_Patch.Id).Body(IpamsvcSubnet_Patch).Execute() + require.NoError(t, err) require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - + require.Equal(t, http.StatusOK, httpRes.StatusCode) }) - } diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index d4e3ab8..68f2022 100644 --- a/keys/api_generate_tsig.go +++ b/keys/api_generate_tsig.go @@ -21,7 +21,6 @@ import ( ) type GenerateTsigAPI interface { - /* GenerateTsigGenerateTSIG Generate TSIG key with a random secret. @@ -154,6 +153,5 @@ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTs newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_kerberos.go b/keys/api_kerberos.go index 7b26c4d..42d68ac 100644 --- a/keys/api_kerberos.go +++ b/keys/api_kerberos.go @@ -22,7 +22,6 @@ import ( ) type KerberosAPI interface { - /* KerberosDelete Delete the Kerberos key. @@ -37,7 +36,6 @@ type KerberosAPI interface { // KerberosDeleteExecute executes the request KerberosDeleteExecute(r ApiKerberosDeleteRequest) (*http.Response, error) - /* KerberosList Retrieve Kerberos keys. @@ -52,7 +50,6 @@ type KerberosAPI interface { // KerberosListExecute executes the request // @return KeysListKerberosKeyResponse KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) - /* KerberosRead Retrieve the Kerberos key. @@ -68,7 +65,6 @@ type KerberosAPI interface { // KerberosReadExecute executes the request // @return KeysReadKerberosKeyResponse KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) - /* KerberosUpdate Update the Kerberos key. @@ -84,7 +80,6 @@ type KerberosAPI interface { // KerberosUpdateExecute executes the request // @return KeysUpdateKerberosKeyResponse KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) - /* KeysKerberosPost Method for KeysKerberosPost @@ -390,7 +385,6 @@ func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*Key newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +507,6 @@ func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*Key newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -637,7 +630,6 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -754,6 +746,5 @@ func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostReques newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 4386f89..7aa8083 100644 --- a/keys/api_tsig.go +++ b/keys/api_tsig.go @@ -22,7 +22,6 @@ import ( ) type TsigAPI interface { - /* TsigCreate Create the TSIG key. @@ -37,7 +36,6 @@ type TsigAPI interface { // TsigCreateExecute executes the request // @return KeysCreateTSIGKeyResponse TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) - /* TsigDelete Delete the TSIG key. @@ -52,7 +50,6 @@ type TsigAPI interface { // TsigDeleteExecute executes the request TsigDeleteExecute(r ApiTsigDeleteRequest) (*http.Response, error) - /* TsigList Retrieve TSIG keys. @@ -67,7 +64,6 @@ type TsigAPI interface { // TsigListExecute executes the request // @return KeysListTSIGKeyResponse TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) - /* TsigRead Retrieve the TSIG key. @@ -83,7 +79,6 @@ type TsigAPI interface { // TsigReadExecute executes the request // @return KeysReadTSIGKeyResponse TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) - /* TsigUpdate Update the TSIG key. @@ -177,6 +172,14 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -220,7 +223,6 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -513,7 +515,6 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -636,7 +637,6 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -717,6 +717,14 @@ func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateT if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -760,6 +768,5 @@ func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateT newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_upload.go b/keys/api_upload.go index 3d68206..d91ba24 100644 --- a/keys/api_upload.go +++ b/keys/api_upload.go @@ -21,7 +21,6 @@ import ( ) type UploadAPI interface { - /* UploadUpload Upload content to the keys service. @@ -112,6 +111,14 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.body.Tags == nil { + r.body.Tags = make(map[string]interface{}) + } + for k, v := range a.Client.Cfg.DefaultTags { + if _, ok := r.body.Tags[k]; !ok { + r.body.Tags[k] = v + } + } // body params localVarPostBody = r.body if r.ctx != nil { @@ -155,6 +162,5 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } From 16e3bf92aa05714387e13787bf0fa32db107b99b Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Thu, 29 Feb 2024 17:28:04 -0800 Subject: [PATCH 15/18] Complete unit tests for ipam, dhcp, dns_data, dns_config, and keys modules --- dns_config/test/api_acl_test.go | 2 ++ dns_config/test/api_auth_nsg_test.go | 2 ++ dns_config/test/api_auth_zone_test.go | 2 ++ dns_config/test/api_delegation_test.go | 4 ++-- dns_config/test/api_forward_nsg_test.go | 4 ++-- dns_config/test/api_forward_zone_test.go | 4 ++-- dns_config/test/api_host_test.go | 3 ++- dns_config/test/api_lbdn_test.go | 6 ++++-- dns_config/test/api_server_test.go | 6 ++++-- dns_config/test/api_view_test.go | 6 ++++-- dns_data/test/api_record_test.go | 13 ++++++++----- ipam/test/api_address_block_test.go | 2 ++ ipam/test/api_address_test.go | 6 ++++-- ipam/test/api_dhcp_host_test.go | 3 ++- ipam/test/api_fixed_address_test.go | 6 ++++-- ipam/test/api_ha_group_test.go | 6 ++++-- ipam/test/api_hardware_filter_test.go | 6 ++++-- ipam/test/api_ip_space_test.go | 6 ++++-- ipam/test/api_ipam_host_test.go | 6 ++++-- ipam/test/api_option_filter_test.go | 6 ++++-- ipam/test/api_option_group_test.go | 6 ++++-- ipam/test/api_option_space_test.go | 6 ++++-- ipam/test/api_range_test.go | 6 ++++-- ipam/test/api_server_test.go | 6 ++++-- ipam/test/api_subnet_test.go | 6 ++++-- keys/test/api_tsig_test.go | 6 ++++-- keys/test/api_upload_test.go | 1 + 27 files changed, 91 insertions(+), 45 deletions(-) diff --git a/dns_config/test/api_acl_test.go b/dns_config/test/api_acl_test.go index 1ff4711..912059e 100644 --- a/dns_config/test/api_acl_test.go +++ b/dns_config/test/api_acl_test.go @@ -27,12 +27,14 @@ var dns_config_Post = openapiclient.ConfigACL{ Comment: openapiclient.PtrString("This is a dummy ACL for testing."), Id: openapiclient.PtrString("dummyAclId"), Name: "dummyAclName", + Tags: make(map[string]interface{}), } var dns_config_Patch = openapiclient.ConfigACL{ Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), Id: dns_config_Post.Id, Name: "updatedDummyAclName", + Tags: make(map[string]interface{}), } func Test_dns_config_AclAPIService(t *testing.T) { diff --git a/dns_config/test/api_auth_nsg_test.go b/dns_config/test/api_auth_nsg_test.go index 621306d..e155a8a 100644 --- a/dns_config/test/api_auth_nsg_test.go +++ b/dns_config/test/api_auth_nsg_test.go @@ -27,11 +27,13 @@ var ConfigAuthNSG_Post = openapiclient.ConfigAuthNSG{ Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), Id: openapiclient.PtrString("dummyAuthNesId"), Name: "dummyAuthNesName", + Tags: make(map[string]interface{}), } var ConfigAuthNSG_Patch = openapiclient.ConfigAuthNSG{ Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), Id: ConfigAuthNSG_Post.Id, Name: "updatedDummyAuthNsgName", + Tags: make(map[string]interface{}), } func Test_dns_config_AuthNsgAPIService(t *testing.T) { diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index 5c83e21..087d702 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -30,10 +30,12 @@ var ConfigCopyAuthZone_Post = openapiclient.ConfigCopyAuthZone{ var ConfigAuthZone_Post = openapiclient.ConfigAuthZone{ Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), Id: openapiclient.PtrString("dummyAuthZoneId"), + Tags: make(map[string]interface{}), } var ConfigAuthZone_Patch = openapiclient.ConfigAuthZone{ Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), Id: ConfigAuthZone_Post.Id, + Tags: make(map[string]interface{}), } func Test_dns_config_AuthZoneAPIService(t *testing.T) { diff --git a/dns_config/test/api_delegation_test.go b/dns_config/test/api_delegation_test.go index 13d19bd..f5e9152 100644 --- a/dns_config/test/api_delegation_test.go +++ b/dns_config/test/api_delegation_test.go @@ -31,7 +31,7 @@ var ConfigDelegation_Post = openapiclient.ConfigDelegation{ Fqdn: nil, Parent: nil, ProtocolFqdn: nil, - Tags: nil, + Tags: make(map[string]interface{}), View: nil, } var ConfigDelegation_Patch = openapiclient.ConfigDelegation{ @@ -42,7 +42,7 @@ var ConfigDelegation_Patch = openapiclient.ConfigDelegation{ Fqdn: nil, Parent: nil, ProtocolFqdn: nil, - Tags: nil, + Tags: make(map[string]interface{}), View: nil, } diff --git a/dns_config/test/api_forward_nsg_test.go b/dns_config/test/api_forward_nsg_test.go index 26929e6..562a560 100644 --- a/dns_config/test/api_forward_nsg_test.go +++ b/dns_config/test/api_forward_nsg_test.go @@ -32,7 +32,7 @@ var ConfigForwardNSG_Post = openapiclient.ConfigForwardNSG{ InternalForwarders: nil, Name: "", Nsgs: nil, - Tags: nil, + Tags: make(map[string]interface{}), } var ConfigForwardNSG_Patch = openapiclient.ConfigForwardNSG{ Id: openapiclient.PtrString("ConfigForwardNSGPatch"), @@ -43,7 +43,7 @@ var ConfigForwardNSG_Patch = openapiclient.ConfigForwardNSG{ InternalForwarders: nil, Name: "", Nsgs: nil, - Tags: nil, + Tags: make(map[string]interface{}), } func Test_dns_config_ForwardNsgAPIService(t *testing.T) { diff --git a/dns_config/test/api_forward_zone_test.go b/dns_config/test/api_forward_zone_test.go index 43ad78d..49e6d73 100644 --- a/dns_config/test/api_forward_zone_test.go +++ b/dns_config/test/api_forward_zone_test.go @@ -49,7 +49,7 @@ var ConfigForwardZone_Post = openapiclient.ConfigForwardZone{ Nsgs: nil, Parent: nil, ProtocolFqdn: nil, - Tags: nil, + Tags: make(map[string]interface{}), UpdatedAt: nil, View: nil, Warnings: nil, @@ -70,7 +70,7 @@ var ConfigForwardZone_Patch = openapiclient.ConfigForwardZone{ Nsgs: nil, Parent: nil, ProtocolFqdn: nil, - Tags: nil, + Tags: make(map[string]interface{}), UpdatedAt: nil, View: nil, Warnings: nil, diff --git a/dns_config/test/api_host_test.go b/dns_config/test/api_host_test.go index cd3e2c9..584f57f 100644 --- a/dns_config/test/api_host_test.go +++ b/dns_config/test/api_host_test.go @@ -24,7 +24,8 @@ import ( ) var ConfigHost_Patch = openapiclient.ConfigHost{ - Id: openapiclient.PtrString("ConfigHostPatch"), + Id: openapiclient.PtrString("ConfigHostPatch"), + Tags: make(map[string]interface{}), } func Test_dns_config_HostAPIService(t *testing.T) { diff --git a/dns_config/test/api_lbdn_test.go b/dns_config/test/api_lbdn_test.go index 382ddb7..7b6f81c 100644 --- a/dns_config/test/api_lbdn_test.go +++ b/dns_config/test/api_lbdn_test.go @@ -24,10 +24,12 @@ import ( ) var ConfigLBDN_Post = openapiclient.ConfigLBDN{ - Id: openapiclient.PtrString("ConfigLBDNPost"), + Id: openapiclient.PtrString("ConfigLBDNPost"), + Tags: make(map[string]interface{}), } var ConfigLBDN_Patch = openapiclient.ConfigLBDN{ - Id: openapiclient.PtrString("ConfigLBDNPatch"), + Id: openapiclient.PtrString("ConfigLBDNPatch"), + Tags: make(map[string]interface{}), } func Test_dns_config_LbdnAPIService(t *testing.T) { diff --git a/dns_config/test/api_server_test.go b/dns_config/test/api_server_test.go index a2fb260..99ebd57 100644 --- a/dns_config/test/api_server_test.go +++ b/dns_config/test/api_server_test.go @@ -24,10 +24,12 @@ import ( ) var ConfigServer_Post = openapiclient.ConfigServer{ - Id: openapiclient.PtrString("ConfigServerPost"), + Id: openapiclient.PtrString("ConfigServerPost"), + Tags: make(map[string]interface{}), } var ConfigServer_Patch = openapiclient.ConfigServer{ - Id: openapiclient.PtrString("ConfigServerPatch"), + Id: openapiclient.PtrString("ConfigServerPatch"), + Tags: make(map[string]interface{}), } func Test_dns_config_ServerAPIService(t *testing.T) { diff --git a/dns_config/test/api_view_test.go b/dns_config/test/api_view_test.go index 29e73bb..564d658 100644 --- a/dns_config/test/api_view_test.go +++ b/dns_config/test/api_view_test.go @@ -33,10 +33,12 @@ var ConfigBulkCopyView_Post = openapiclient.ConfigBulkCopyView{ Target: "TargetPost", } var ConfigView_Post = openapiclient.ConfigView{ - Id: openapiclient.PtrString("ConfigViewPost"), + Id: openapiclient.PtrString("ConfigViewPost"), + Tags: make(map[string]interface{}), } var ConfigView_Patch = openapiclient.ConfigView{ - Id: openapiclient.PtrString("ConfigViewPatch"), + Id: openapiclient.PtrString("ConfigViewPatch"), + Tags: make(map[string]interface{}), } func Test_dns_config_ViewAPIService(t *testing.T) { diff --git a/dns_data/test/api_record_test.go b/dns_data/test/api_record_test.go index bc33028..95e25d0 100644 --- a/dns_data/test/api_record_test.go +++ b/dns_data/test/api_record_test.go @@ -24,13 +24,15 @@ import ( ) var DataRecord_Post = openapiclient.DataRecord{ - Id: openapiclient.PtrString("DataRecordPost"), + Id: openapiclient.PtrString("DataRecordPost"), + Tags: make(map[string]interface{}), } var DataSOASerialIncrementRequest_Post = openapiclient.DataSOASerialIncrementRequest{ Id: openapiclient.PtrString("IncrementRequest"), } var DataRecord_Patch = openapiclient.DataRecord{ - Id: openapiclient.PtrString("DataRecordPatch"), + Id: openapiclient.PtrString("DataRecordPatch"), + Tags: make(map[string]interface{}), } func Test_dns_data_RecordAPIService(t *testing.T) { @@ -44,7 +46,8 @@ func Test_dns_data_RecordAPIService(t *testing.T) { var reqBody openapiclient.DataRecord require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, DataRecord_Post, reqBody) + require.Equal(t, DataRecord_Post.Id, reqBody.Id) + require.Equal(t, DataRecord_Post.Tags, reqBody.Tags) response := openapiclient.DataCreateRecordResponse{} body, err := json.Marshal(response) @@ -161,7 +164,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.DataRecord @@ -179,7 +182,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), *DataRecord_Patch.Id).Body(DataRecord_Patch).Execute() + resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), *DataRecord_Post.Id).Body(DataRecord_Patch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_address_block_test.go b/ipam/test/api_address_block_test.go index 7f15f1b..f05e418 100644 --- a/ipam/test/api_address_block_test.go +++ b/ipam/test/api_address_block_test.go @@ -32,10 +32,12 @@ var IpamsvcCopyAddressBlock_Post = openapiclient.IpamsvcCopyAddressBlock{ var IpamsvcAddressBlock_Post = openapiclient.IpamsvcAddressBlock{ Id: openapiclient.PtrString("Test Create"), Cidr: &cidrValue, + Tags: make(map[string]interface{}), } var IpamsvcAddressBlock_Patch = openapiclient.IpamsvcAddressBlock{ Id: openapiclient.PtrString("Test Update"), Cidr: &cidrValue, + Tags: make(map[string]interface{}), } func Test_ipam_AddressBlockAPIService(t *testing.T) { diff --git a/ipam/test/api_address_test.go b/ipam/test/api_address_test.go index 89be49f..3f1dd0c 100644 --- a/ipam/test/api_address_test.go +++ b/ipam/test/api_address_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcAddress_Post = openapiclient.IpamsvcAddress{ - Id: openapiclient.PtrString("Test Create"), + Id: openapiclient.PtrString("Test Create"), + Tags: make(map[string]interface{}), } var IpamsvcAddress_Patch = openapiclient.IpamsvcAddress{ - Id: openapiclient.PtrString("Test Update"), + Id: openapiclient.PtrString("Test Update"), + Tags: make(map[string]interface{}), } func Test_ipam_AddressAPIService(t *testing.T) { diff --git a/ipam/test/api_dhcp_host_test.go b/ipam/test/api_dhcp_host_test.go index bb556e5..7cc3aba 100644 --- a/ipam/test/api_dhcp_host_test.go +++ b/ipam/test/api_dhcp_host_test.go @@ -25,7 +25,8 @@ import ( ) var IpamsvcHost_Patch = openapiclient.IpamsvcHost{ - Id: openapiclient.PtrString("Test"), + Id: openapiclient.PtrString("Test"), + Tags: make(map[string]interface{}), } func Test_ipam_DhcpHostAPIService(t *testing.T) { diff --git a/ipam/test/api_fixed_address_test.go b/ipam/test/api_fixed_address_test.go index ae5b9a7..b6a8502 100644 --- a/ipam/test/api_fixed_address_test.go +++ b/ipam/test/api_fixed_address_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcFixedAddress_Post = openapiclient.IpamsvcFixedAddress{ - Id: openapiclient.PtrString("Test Create"), + Id: openapiclient.PtrString("Test Create"), + Tags: make(map[string]interface{}), } var IpamsvcFixedAddress_Patch = openapiclient.IpamsvcFixedAddress{ - Id: openapiclient.PtrString("Test Update"), + Id: openapiclient.PtrString("Test Update"), + Tags: make(map[string]interface{}), } func Test_ipam_FixedAddressAPIService(t *testing.T) { diff --git a/ipam/test/api_ha_group_test.go b/ipam/test/api_ha_group_test.go index 268e3bf..ebdbf11 100644 --- a/ipam/test/api_ha_group_test.go +++ b/ipam/test/api_ha_group_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcHAGroup_Post = openapiclient.IpamsvcHAGroup{ - Id: openapiclient.PtrString("Test Create"), + Id: openapiclient.PtrString("Test Create"), + Tags: make(map[string]interface{}), } var IpamsvcHAGroup_Patch = openapiclient.IpamsvcHAGroup{ - Id: openapiclient.PtrString("Test Update"), + Id: openapiclient.PtrString("Test Update"), + Tags: make(map[string]interface{}), } func Test_ipam_HaGroupAPIService(t *testing.T) { diff --git a/ipam/test/api_hardware_filter_test.go b/ipam/test/api_hardware_filter_test.go index 8deedf4..d5bbfca 100644 --- a/ipam/test/api_hardware_filter_test.go +++ b/ipam/test/api_hardware_filter_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcHardwareFilter_Post = openapiclient.IpamsvcHardwareFilter{ - Id: openapiclient.PtrString("Test Create"), + Id: openapiclient.PtrString("Test Create"), + Tags: make(map[string]interface{}), } var IpamsvcHardwareFilter_Patch = openapiclient.IpamsvcHardwareFilter{ - Id: openapiclient.PtrString("Test Update"), + Id: openapiclient.PtrString("Test Update"), + Tags: make(map[string]interface{}), } func Test_ipam_HardwareFilterAPIService(t *testing.T) { diff --git a/ipam/test/api_ip_space_test.go b/ipam/test/api_ip_space_test.go index fb1dc99..5707986 100644 --- a/ipam/test/api_ip_space_test.go +++ b/ipam/test/api_ip_space_test.go @@ -29,10 +29,12 @@ var IpamsvcCopyIPSpace_Post = openapiclient.IpamsvcCopyIPSpace{ Id: openapiclient.PtrString("Test Copy Post"), } var IpamsvcIPSpace_Post = openapiclient.IpamsvcIPSpace{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcIPSpace_Patch = openapiclient.IpamsvcIPSpace{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_IpSpaceAPIService(t *testing.T) { diff --git a/ipam/test/api_ipam_host_test.go b/ipam/test/api_ipam_host_test.go index 0e29af8..5e1244a 100644 --- a/ipam/test/api_ipam_host_test.go +++ b/ipam/test/api_ipam_host_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcIpamHost_Post = openapiclient.IpamsvcIpamHost{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcIpamHost_Patch = openapiclient.IpamsvcIpamHost{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_IpamHostAPIService(t *testing.T) { diff --git a/ipam/test/api_option_filter_test.go b/ipam/test/api_option_filter_test.go index f276813..092c6e6 100644 --- a/ipam/test/api_option_filter_test.go +++ b/ipam/test/api_option_filter_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcOptionFilter_Post = openapiclient.IpamsvcOptionFilter{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcOptionFilter_Patch = openapiclient.IpamsvcOptionFilter{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_OptionFilterAPIService(t *testing.T) { diff --git a/ipam/test/api_option_group_test.go b/ipam/test/api_option_group_test.go index 3870875..be177b3 100644 --- a/ipam/test/api_option_group_test.go +++ b/ipam/test/api_option_group_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcOptionGroup_Post = openapiclient.IpamsvcOptionGroup{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcOptionGroup_Patch = openapiclient.IpamsvcOptionGroup{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_OptionGroupAPIService(t *testing.T) { diff --git a/ipam/test/api_option_space_test.go b/ipam/test/api_option_space_test.go index 20fdad4..577bdd7 100644 --- a/ipam/test/api_option_space_test.go +++ b/ipam/test/api_option_space_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcOptionSpace_Post = openapiclient.IpamsvcOptionSpace{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcOptionSpace_Patch = openapiclient.IpamsvcOptionSpace{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_OptionSpaceAPIService(t *testing.T) { diff --git a/ipam/test/api_range_test.go b/ipam/test/api_range_test.go index d308785..317170f 100644 --- a/ipam/test/api_range_test.go +++ b/ipam/test/api_range_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcRange_Post = openapiclient.IpamsvcRange{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcRange_Patch = openapiclient.IpamsvcRange{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_RangeAPIService(t *testing.T) { diff --git a/ipam/test/api_server_test.go b/ipam/test/api_server_test.go index 7cc260d..e876ac9 100644 --- a/ipam/test/api_server_test.go +++ b/ipam/test/api_server_test.go @@ -25,10 +25,12 @@ import ( ) var IpamsvcServer_Post = openapiclient.IpamsvcServer{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcServer_Patch = openapiclient.IpamsvcServer{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_ServerAPIService(t *testing.T) { diff --git a/ipam/test/api_subnet_test.go b/ipam/test/api_subnet_test.go index 3271775..e4edd19 100644 --- a/ipam/test/api_subnet_test.go +++ b/ipam/test/api_subnet_test.go @@ -28,10 +28,12 @@ var IpamsvcCopySubnet_Post = openapiclient.IpamsvcCopySubnet{ Id: openapiclient.PtrString("Test Copy"), } var IpamsvcSubnet_Post = openapiclient.IpamsvcSubnet{ - Id: openapiclient.PtrString("Test Post"), + Id: openapiclient.PtrString("Test Post"), + Tags: make(map[string]interface{}), } var IpamsvcSubnet_Patch = openapiclient.IpamsvcSubnet{ - Id: openapiclient.PtrString("Test Patch"), + Id: openapiclient.PtrString("Test Patch"), + Tags: make(map[string]interface{}), } func Test_ipam_SubnetAPIService(t *testing.T) { diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index 061e845..6c1c62e 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -24,10 +24,12 @@ import ( ) var KeysTSIGKey_Post = openapiclient.KeysTSIGKey{ - Id: openapiclient.PtrString("KeysTsigPost"), + Id: openapiclient.PtrString("KeysTsigPost"), + Tags: make(map[string]interface{}), } var KeysTSIGKey_Patch = openapiclient.KeysTSIGKey{ - Id: openapiclient.PtrString("KeysTsigPatch"), + Id: openapiclient.PtrString("KeysTsigPatch"), + Tags: make(map[string]interface{}), } func Test_keys_TsigAPIService(t *testing.T) { diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index a42a744..1542999 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -27,6 +27,7 @@ var UploadRequest_Post = openapiclient.UploadRequest{ Comment: openapiclient.PtrString("Upload Request"), Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type + Tags: make(map[string]interface{}), } func Test_keys_UploadAPIService(t *testing.T) { From e6e308511ae31bf0889271b46c3838068ea28a20 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Mon, 4 Mar 2024 12:45:33 -0800 Subject: [PATCH 16/18] Complete unit tests for dns_data, dns_config, and keys modules: 1. Removed the first line in test 2. Updated test object name to camel case --- dns_config/test/api_acl_test.go | 28 +++++----- dns_config/test/api_auth_nsg_test.go | 28 +++++----- dns_config/test/api_auth_zone_test.go | 34 ++++++----- dns_config/test/api_cache_flush_test.go | 10 ++-- .../test/api_convert_domain_name_test.go | 4 +- dns_config/test/api_convert_rname_test.go | 4 +- dns_config/test/api_delegation_test.go | 26 ++++----- dns_config/test/api_forward_nsg_test.go | 26 ++++----- dns_config/test/api_forward_zone_test.go | 32 +++++------ dns_config/test/api_global_test.go | 22 ++++---- dns_config/test/api_host_test.go | 16 +++--- dns_config/test/api_lbdn_test.go | 26 ++++----- dns_config/test/api_server_test.go | 26 ++++----- dns_config/test/api_view_test.go | 32 +++++------ dns_data/test/api_record_test.go | 34 +++++------ ipam/test/api_address_block_test.go | 56 +++++++++---------- ipam/test/api_address_test.go | 24 ++++---- ipam/test/api_asm_test.go | 12 ++-- ipam/test/api_dhcp_host_test.go | 18 +++--- ipam/test/api_dns_usage_test.go | 2 +- ipam/test/api_filter_test.go | 7 +-- ipam/test/api_fixed_address_test.go | 24 ++++---- ipam/test/api_global_test.go | 20 +++---- ipam/test/api_ha_group_test.go | 24 ++++---- ipam/test/api_hardware_filter_test.go | 24 ++++---- ipam/test/api_ip_space_test.go | 38 ++++++------- ipam/test/api_ipam_host_test.go | 24 ++++---- ipam/test/api_leases_command_test.go | 8 +-- ipam/test/api_option_code_test.go | 24 ++++---- ipam/test/api_option_filter_test.go | 24 ++++---- ipam/test/api_option_group_test.go | 22 ++++---- ipam/test/api_option_space_test.go | 24 ++++---- ipam/test/api_range_test.go | 32 +++++------ ipam/test/api_server_test.go | 24 ++++---- ipam/test/api_subnet_test.go | 40 ++++++------- keys/test/api_generate_tsig_test.go | 4 +- keys/test/api_kerberos_test.go | 26 ++++----- keys/test/api_tsig_test.go | 26 ++++----- keys/test/api_upload_test.go | 10 ++-- 39 files changed, 422 insertions(+), 463 deletions(-) diff --git a/dns_config/test/api_acl_test.go b/dns_config/test/api_acl_test.go index 912059e..62a8ef8 100644 --- a/dns_config/test/api_acl_test.go +++ b/dns_config/test/api_acl_test.go @@ -5,8 +5,6 @@ Testing AclAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,21 +21,21 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var dns_config_Post = openapiclient.ConfigACL{ +var ConfigACLPost = openapiclient.ConfigACL{ Comment: openapiclient.PtrString("This is a dummy ACL for testing."), Id: openapiclient.PtrString("dummyAclId"), Name: "dummyAclName", Tags: make(map[string]interface{}), } -var dns_config_Patch = openapiclient.ConfigACL{ +var ConfigACLPatch = openapiclient.ConfigACL{ Comment: openapiclient.PtrString("This is an updated dummy ACL for testing."), - Id: dns_config_Post.Id, + Id: ConfigACLPost.Id, Name: "updatedDummyAclName", Tags: make(map[string]interface{}), } -func Test_dns_config_AclAPIService(t *testing.T) { +func TestAclAPIService(t *testing.T) { t.Run("Test AclAPIService AclCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -48,7 +46,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { var reqBody openapiclient.ConfigACL require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dns_config_Post, reqBody) + require.Equal(t, ConfigACLPost, reqBody) response := openapiclient.ConfigCreateACLResponse{} body, err := json.Marshal(response) @@ -61,7 +59,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AclAPI.AclCreate(context.Background()).Body(dns_config_Post).Execute() + resp, httpRes, err := apiClient.AclAPI.AclCreate(context.Background()).Body(ConfigACLPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -95,7 +93,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*ConfigACLPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadACLResponse{} @@ -109,7 +107,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AclAPI.AclRead(context.Background(), *dns_config_Post.Id).Execute() + resp, httpRes, err := apiClient.AclAPI.AclRead(context.Background(), *ConfigACLPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -119,12 +117,12 @@ func Test_dns_config_AclAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*ConfigACLPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigACL require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, dns_config_Patch, reqBody) + require.Equal(t, ConfigACLPatch, reqBody) response := openapiclient.ConfigUpdateACLResponse{} body, err := json.Marshal(response) @@ -137,7 +135,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AclAPI.AclUpdate(context.Background(), *dns_config_Patch.Id).Body(dns_config_Patch).Execute() + resp, httpRes, err := apiClient.AclAPI.AclUpdate(context.Background(), *ConfigACLPatch.Id).Body(ConfigACLPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -147,7 +145,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/acl/"+*dns_config_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/acl/"+*ConfigACLPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -156,7 +154,7 @@ func Test_dns_config_AclAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.AclAPI.AclDelete(context.Background(), *dns_config_Post.Id).Execute() + httpRes, err := apiClient.AclAPI.AclDelete(context.Background(), *ConfigACLPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) diff --git a/dns_config/test/api_auth_nsg_test.go b/dns_config/test/api_auth_nsg_test.go index e155a8a..4122458 100644 --- a/dns_config/test/api_auth_nsg_test.go +++ b/dns_config/test/api_auth_nsg_test.go @@ -5,8 +5,6 @@ Testing AuthNsgAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,20 +21,20 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigAuthNSG_Post = openapiclient.ConfigAuthNSG{ +var ConfigAuthNSGPost = openapiclient.ConfigAuthNSG{ Comment: openapiclient.PtrString("This is a dummy AuthNes for testing."), Id: openapiclient.PtrString("dummyAuthNesId"), Name: "dummyAuthNesName", Tags: make(map[string]interface{}), } -var ConfigAuthNSG_Patch = openapiclient.ConfigAuthNSG{ +var ConfigAuthNSGPatch = openapiclient.ConfigAuthNSG{ Comment: openapiclient.PtrString("This is an updated dummy AuthNsg for testing."), - Id: ConfigAuthNSG_Post.Id, + Id: ConfigAuthNSGPost.Id, Name: "updatedDummyAuthNsgName", Tags: make(map[string]interface{}), } -func Test_dns_config_AuthNsgAPIService(t *testing.T) { +func TestAuthNsgAPIService(t *testing.T) { t.Run("Test AuthNsgAPIService AuthNsgCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -47,7 +45,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { var reqBody openapiclient.ConfigAuthNSG require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigAuthNSG_Post, reqBody) + require.Equal(t, ConfigAuthNSGPost, reqBody) response := openapiclient.ConfigCreateAuthNSGResponse{} body, err := json.Marshal(response) @@ -60,7 +58,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(ConfigAuthNSG_Post).Execute() + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(ConfigAuthNSGPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -94,7 +92,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSGPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadAuthNSGResponse{} @@ -108,7 +106,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), *ConfigAuthNSG_Post.Id).Execute() + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), *ConfigAuthNSGPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -118,12 +116,12 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSGPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigAuthNSG require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigAuthNSG_Patch, reqBody) + require.Equal(t, ConfigAuthNSGPatch, reqBody) response := openapiclient.ConfigUpdateAuthNSGResponse{} body, err := json.Marshal(response) @@ -136,7 +134,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), *ConfigAuthNSG_Patch.Id).Body(ConfigAuthNSG_Patch).Execute() + resp, httpRes, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), *ConfigAuthNSGPatch.Id).Body(ConfigAuthNSGPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -146,7 +144,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSG_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/auth_nsg/"+*ConfigAuthNSGPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -155,7 +153,7 @@ func Test_dns_config_AuthNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), *ConfigAuthNSG_Post.Id).Execute() + httpRes, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), *ConfigAuthNSGPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index 087d702..22ec8a1 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -5,8 +5,6 @@ Testing AuthZoneAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,22 +21,22 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigCopyAuthZone_Post = openapiclient.ConfigCopyAuthZone{ +var ConfigCopyAuthZonePost = openapiclient.ConfigCopyAuthZone{ Comment: openapiclient.PtrString("This is a copyping AuthZone for testing."), Id: openapiclient.PtrString("dummyAuthZoneId"), } -var ConfigAuthZone_Post = openapiclient.ConfigAuthZone{ +var ConfigAuthZonePost = openapiclient.ConfigAuthZone{ Comment: openapiclient.PtrString("This is a dummy AuthZone for testing."), Id: openapiclient.PtrString("dummyAuthZoneId"), Tags: make(map[string]interface{}), } -var ConfigAuthZone_Patch = openapiclient.ConfigAuthZone{ +var ConfigAuthZonePatch = openapiclient.ConfigAuthZone{ Comment: openapiclient.PtrString("This is an updated dummy AuthZone for testing."), - Id: ConfigAuthZone_Post.Id, + Id: ConfigAuthZonePost.Id, Tags: make(map[string]interface{}), } -func Test_dns_config_AuthZoneAPIService(t *testing.T) { +func TestAuthZoneAPIService(t *testing.T) { t.Run("Test AuthZoneAPIService AuthZoneCopy", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -49,7 +47,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { var reqBody openapiclient.ConfigCopyAuthZone require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigCopyAuthZone_Post, reqBody) + require.Equal(t, ConfigCopyAuthZonePost, reqBody) response := openapiclient.ConfigCopyAuthZoneResponse{} body, err := json.Marshal(response) @@ -62,7 +60,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(ConfigCopyAuthZone_Post).Execute() + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(ConfigCopyAuthZonePost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -77,7 +75,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { var reqBody openapiclient.ConfigAuthZone require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigAuthZone_Post, reqBody) + require.Equal(t, ConfigAuthZonePost, reqBody) response := openapiclient.ConfigCreateAuthZoneResponse{} body, err := json.Marshal(response) @@ -90,7 +88,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(ConfigAuthZone_Post).Execute() + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(ConfigAuthZonePost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -100,7 +98,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZonePost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -109,7 +107,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), *ConfigAuthZone_Post.Id).Execute() + httpRes, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), *ConfigAuthZonePost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -142,7 +140,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZonePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadAuthZoneResponse{} @@ -156,7 +154,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), *ConfigAuthZone_Post.Id).Execute() + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), *ConfigAuthZonePost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -166,12 +164,12 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZone_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/auth_zone/"+*ConfigAuthZonePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigAuthZone require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigAuthZone_Patch, reqBody) + require.Equal(t, ConfigAuthZonePatch, reqBody) response := openapiclient.ConfigUpdateAuthZoneResponse{} body, err := json.Marshal(response) @@ -184,7 +182,7 @@ func Test_dns_config_AuthZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), *ConfigAuthZone_Patch.Id).Body(ConfigAuthZone_Patch).Execute() + resp, httpRes, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), *ConfigAuthZonePatch.Id).Body(ConfigAuthZonePatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_config/test/api_cache_flush_test.go b/dns_config/test/api_cache_flush_test.go index 58a35a0..a72586a 100644 --- a/dns_config/test/api_cache_flush_test.go +++ b/dns_config/test/api_cache_flush_test.go @@ -5,8 +5,6 @@ Testing CacheFlushAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,7 +21,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigCacheFlush_Post = openapiclient.ConfigCacheFlush{ +var ConfigCacheFlushPost = openapiclient.ConfigCacheFlush{ FlushSubdomains: openapiclient.PtrBool(true), Fqdn: openapiclient.PtrString("dummyFqdn"), Ophid: openapiclient.PtrString("dummyOphid"), @@ -32,7 +30,7 @@ var ConfigCacheFlush_Post = openapiclient.ConfigCacheFlush{ ViewName: openapiclient.PtrString("dummyViewName"), } -func Test_dns_config_CacheFlushAPIService(t *testing.T) { +func TestCacheFlushAPIService(t *testing.T) { t.Run("Test CacheFlushAPIService CacheFlushCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -43,7 +41,7 @@ func Test_dns_config_CacheFlushAPIService(t *testing.T) { var reqBody openapiclient.ConfigCacheFlush require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigCacheFlush_Post, reqBody) + require.Equal(t, ConfigCacheFlushPost, reqBody) return &http.Response{ StatusCode: http.StatusOK, @@ -52,7 +50,7 @@ func Test_dns_config_CacheFlushAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - _, httpRes, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(ConfigCacheFlush_Post).Execute() + _, httpRes, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(ConfigCacheFlushPost).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) diff --git a/dns_config/test/api_convert_domain_name_test.go b/dns_config/test/api_convert_domain_name_test.go index 5df948e..b3b726d 100644 --- a/dns_config/test/api_convert_domain_name_test.go +++ b/dns_config/test/api_convert_domain_name_test.go @@ -5,8 +5,6 @@ Testing ConvertDomainNameAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -25,7 +23,7 @@ import ( var domainName = "example.com" -func Test_dns_config_ConvertDomainNameAPIService(t *testing.T) { +func TestConvertDomainNameAPIService(t *testing.T) { t.Run("Test ConvertDomainNameAPIService ConvertDomainNameConvert", func(t *testing.T) { configuration := internal.NewConfiguration() diff --git a/dns_config/test/api_convert_rname_test.go b/dns_config/test/api_convert_rname_test.go index 630f4a2..f5ed9fc 100644 --- a/dns_config/test/api_convert_rname_test.go +++ b/dns_config/test/api_convert_rname_test.go @@ -5,8 +5,6 @@ Testing ConvertRnameAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -25,7 +23,7 @@ import ( var emailAddress = "test@example.com" -func Test_dns_config_ConvertRnameAPIService(t *testing.T) { +func TestConvertRnameAPIService(t *testing.T) { t.Run("Test ConvertRnameAPIService ConvertRnameConvertRName", func(t *testing.T) { configuration := internal.NewConfiguration() diff --git a/dns_config/test/api_delegation_test.go b/dns_config/test/api_delegation_test.go index f5e9152..91e4cb1 100644 --- a/dns_config/test/api_delegation_test.go +++ b/dns_config/test/api_delegation_test.go @@ -5,8 +5,6 @@ Testing DelegationAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,7 +21,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigDelegation_Post = openapiclient.ConfigDelegation{ +var ConfigDelegationPost = openapiclient.ConfigDelegation{ Id: openapiclient.PtrString("ConfigDelegationPost"), Comment: nil, DelegationServers: nil, @@ -34,7 +32,7 @@ var ConfigDelegation_Post = openapiclient.ConfigDelegation{ Tags: make(map[string]interface{}), View: nil, } -var ConfigDelegation_Patch = openapiclient.ConfigDelegation{ +var ConfigDelegationPatch = openapiclient.ConfigDelegation{ Id: openapiclient.PtrString("ConfigDelegationPatch"), Comment: nil, DelegationServers: nil, @@ -46,7 +44,7 @@ var ConfigDelegation_Patch = openapiclient.ConfigDelegation{ View: nil, } -func Test_dns_config_DelegationAPIService(t *testing.T) { +func TestDelegationAPIService(t *testing.T) { t.Run("Test DelegationAPIService DelegationCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -57,7 +55,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { var reqBody openapiclient.ConfigDelegation require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigDelegation_Post, reqBody) + require.Equal(t, ConfigDelegationPost, reqBody) response := openapiclient.ConfigCreateDelegationResponse{} body, err := json.Marshal(response) @@ -70,7 +68,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(ConfigDelegation_Post).Execute() + resp, httpRes, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(ConfigDelegationPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -104,7 +102,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegationPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadDelegationResponse{} @@ -118,7 +116,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.DelegationAPI.DelegationRead(context.Background(), *ConfigDelegation_Post.Id).Execute() + resp, httpRes, err := apiClient.DelegationAPI.DelegationRead(context.Background(), *ConfigDelegationPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -128,12 +126,12 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegationPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) var reqBody openapiclient.ConfigDelegation require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigDelegation_Patch, reqBody) + require.Equal(t, ConfigDelegationPatch, reqBody) response := openapiclient.ConfigUpdateDelegationResponse{} body, err := json.Marshal(response) @@ -146,7 +144,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), *ConfigDelegation_Patch.Id).Body(ConfigDelegation_Patch).Execute() + resp, httpRes, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), *ConfigDelegationPatch.Id).Body(ConfigDelegationPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -156,7 +154,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegation_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/delegation/"+*ConfigDelegationPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -165,7 +163,7 @@ func Test_dns_config_DelegationAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), *ConfigDelegation_Post.Id).Execute() + httpRes, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), *ConfigDelegationPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) diff --git a/dns_config/test/api_forward_nsg_test.go b/dns_config/test/api_forward_nsg_test.go index 562a560..f98b055 100644 --- a/dns_config/test/api_forward_nsg_test.go +++ b/dns_config/test/api_forward_nsg_test.go @@ -5,8 +5,6 @@ Testing ForwardNsgAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,7 +21,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigForwardNSG_Post = openapiclient.ConfigForwardNSG{ +var ConfigForwardNSGPost = openapiclient.ConfigForwardNSG{ Id: openapiclient.PtrString("ConfigForwardNSGPost"), Comment: nil, ExternalForwarders: nil, @@ -34,7 +32,7 @@ var ConfigForwardNSG_Post = openapiclient.ConfigForwardNSG{ Nsgs: nil, Tags: make(map[string]interface{}), } -var ConfigForwardNSG_Patch = openapiclient.ConfigForwardNSG{ +var ConfigForwardNSGPatch = openapiclient.ConfigForwardNSG{ Id: openapiclient.PtrString("ConfigForwardNSGPatch"), Comment: nil, ExternalForwarders: nil, @@ -46,7 +44,7 @@ var ConfigForwardNSG_Patch = openapiclient.ConfigForwardNSG{ Tags: make(map[string]interface{}), } -func Test_dns_config_ForwardNsgAPIService(t *testing.T) { +func TestForwardNsgAPIService(t *testing.T) { t.Run("Test ForwardNsgAPIService ForwardNsgCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -57,7 +55,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { var reqBody openapiclient.ConfigForwardNSG require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigForwardNSG_Post, reqBody) + require.Equal(t, ConfigForwardNSGPost, reqBody) response := openapiclient.ConfigCreateForwardNSGResponse{} body, err := json.Marshal(response) @@ -70,7 +68,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(ConfigForwardNSG_Post).Execute() + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(ConfigForwardNSGPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -80,7 +78,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSGPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -89,7 +87,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), *ConfigForwardNSG_Post.Id).Execute() + httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), *ConfigForwardNSGPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -122,7 +120,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSGPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadForwardNSGResponse{} @@ -136,7 +134,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), *ConfigForwardNSG_Post.Id).Execute() + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), *ConfigForwardNSGPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -146,12 +144,12 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSG_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/forward_nsg/"+*ConfigForwardNSGPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigForwardNSG require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigForwardNSG_Patch, reqBody) + require.Equal(t, ConfigForwardNSGPatch, reqBody) response := openapiclient.ConfigUpdateForwardNSGResponse{} body, err := json.Marshal(response) @@ -164,7 +162,7 @@ func Test_dns_config_ForwardNsgAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), *ConfigForwardNSG_Patch.Id).Body(ConfigForwardNSG_Patch).Execute() + resp, httpRes, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), *ConfigForwardNSGPatch.Id).Body(ConfigForwardNSGPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_config/test/api_forward_zone_test.go b/dns_config/test/api_forward_zone_test.go index 49e6d73..32be5a7 100644 --- a/dns_config/test/api_forward_zone_test.go +++ b/dns_config/test/api_forward_zone_test.go @@ -5,8 +5,6 @@ Testing ForwardZoneAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,7 +21,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigCopyForwardZone_Post = openapiclient.ConfigCopyForwardZone{ +var ConfigCopyForwardZonePost = openapiclient.ConfigCopyForwardZone{ Id: openapiclient.PtrString("ConfigCopyForwardZonePost"), Comment: nil, ExternalForwarders: nil, @@ -34,7 +32,7 @@ var ConfigCopyForwardZone_Post = openapiclient.ConfigCopyForwardZone{ SkipOnError: nil, TargetView: "", } -var ConfigForwardZone_Post = openapiclient.ConfigForwardZone{ +var ConfigForwardZonePost = openapiclient.ConfigForwardZone{ Id: openapiclient.PtrString("ConfigForwardZonePost"), Comment: nil, CreatedAt: nil, @@ -55,7 +53,7 @@ var ConfigForwardZone_Post = openapiclient.ConfigForwardZone{ Warnings: nil, } -var ConfigForwardZone_Patch = openapiclient.ConfigForwardZone{ +var ConfigForwardZonePatch = openapiclient.ConfigForwardZone{ Id: openapiclient.PtrString("ConfigForwardZonePatch"), Comment: nil, CreatedAt: nil, @@ -76,7 +74,7 @@ var ConfigForwardZone_Patch = openapiclient.ConfigForwardZone{ Warnings: nil, } -func Test_dns_config_ForwardZoneAPIService(t *testing.T) { +func TestForwardZoneAPIService(t *testing.T) { t.Run("Test ForwardZoneAPIService ForwardZoneCopy", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -87,7 +85,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { var reqBody openapiclient.ConfigCopyForwardZone require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigCopyForwardZone_Post, reqBody) + require.Equal(t, ConfigCopyForwardZonePost, reqBody) response := openapiclient.ConfigCopyForwardZoneResponse{} body, err := json.Marshal(response) @@ -100,7 +98,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(ConfigCopyForwardZone_Post).Execute() + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(ConfigCopyForwardZonePost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -115,7 +113,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { var reqBody openapiclient.ConfigForwardZone require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigForwardZone_Post, reqBody) + require.Equal(t, ConfigForwardZonePost, reqBody) response := openapiclient.ConfigCreateForwardZoneResponse{} body, err := json.Marshal(response) @@ -128,7 +126,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(ConfigForwardZone_Post).Execute() + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(ConfigForwardZonePost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -162,7 +160,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZonePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadForwardZoneResponse{} @@ -176,7 +174,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), *ConfigForwardZone_Post.Id).Execute() + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), *ConfigForwardZonePost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -186,12 +184,12 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZonePatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) var reqBody openapiclient.ConfigForwardZone require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigForwardZone_Patch, reqBody) + require.Equal(t, ConfigForwardZonePatch, reqBody) response := openapiclient.ConfigUpdateForwardZoneResponse{} body, err := json.Marshal(response) @@ -204,7 +202,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), *ConfigForwardZone_Patch.Id).Body(ConfigForwardZone_Patch).Execute() + resp, httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), *ConfigForwardZonePatch.Id).Body(ConfigForwardZonePatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -214,7 +212,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZone_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/forward_zone/"+*ConfigForwardZonePost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -223,7 +221,7 @@ func Test_dns_config_ForwardZoneAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), *ConfigForwardZone_Post.Id).Execute() + httpRes, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), *ConfigForwardZonePost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) diff --git a/dns_config/test/api_global_test.go b/dns_config/test/api_global_test.go index ec0001f..1a5f682 100644 --- a/dns_config/test/api_global_test.go +++ b/dns_config/test/api_global_test.go @@ -5,8 +5,6 @@ Testing GlobalAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,14 +21,14 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigGlobal_Patch = openapiclient.ConfigGlobal{ +var ConfigGlobalPatch = openapiclient.ConfigGlobal{ Id: "Patch1", } -var ConfigGlobal_Patch2 = openapiclient.ConfigGlobal{ +var ConfigGlobalPatch2 = openapiclient.ConfigGlobal{ Id: "Patch2", } -func Test_dns_config_GlobalAPIService(t *testing.T) { +func TestGlobalAPIService(t *testing.T) { t.Run("Test GlobalAPIService GlobalRead", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -60,7 +58,7 @@ func Test_dns_config_GlobalAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobal_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobalPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadGlobalResponse{} @@ -74,7 +72,7 @@ func Test_dns_config_GlobalAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), ConfigGlobal_Patch.Id).Execute() + resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), ConfigGlobalPatch.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -89,7 +87,7 @@ func Test_dns_config_GlobalAPIService(t *testing.T) { var reqBody openapiclient.ConfigGlobal require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigGlobal_Patch, reqBody) + require.Equal(t, ConfigGlobalPatch, reqBody) response := openapiclient.ConfigUpdateGlobalResponse{} body, err := json.Marshal(response) @@ -102,7 +100,7 @@ func Test_dns_config_GlobalAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(ConfigGlobal_Patch).Execute() + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(ConfigGlobalPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -112,12 +110,12 @@ func Test_dns_config_GlobalAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobal_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/global/"+ConfigGlobalPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigGlobal require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigGlobal_Patch2, reqBody) + require.Equal(t, ConfigGlobalPatch2, reqBody) response := openapiclient.ConfigUpdateGlobalResponse{} body, err := json.Marshal(response) @@ -130,7 +128,7 @@ func Test_dns_config_GlobalAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), ConfigGlobal_Patch.Id).Body(ConfigGlobal_Patch2).Execute() + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), ConfigGlobalPatch.Id).Body(ConfigGlobalPatch2).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_config/test/api_host_test.go b/dns_config/test/api_host_test.go index 584f57f..672f427 100644 --- a/dns_config/test/api_host_test.go +++ b/dns_config/test/api_host_test.go @@ -5,8 +5,6 @@ Testing HostAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,12 +21,12 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigHost_Patch = openapiclient.ConfigHost{ +var ConfigHostPatch = openapiclient.ConfigHost{ Id: openapiclient.PtrString("ConfigHostPatch"), Tags: make(map[string]interface{}), } -func Test_dns_config_HostAPIService(t *testing.T) { +func TestHostAPIService(t *testing.T) { t.Run("Test HostAPIService HostList", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -58,7 +56,7 @@ func Test_dns_config_HostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHost_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHostPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadHostResponse{} @@ -72,7 +70,7 @@ func Test_dns_config_HostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), *ConfigHost_Patch.Id).Execute() + resp, httpRes, err := apiClient.HostAPI.HostRead(context.Background(), *ConfigHostPatch.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -82,12 +80,12 @@ func Test_dns_config_HostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHost_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/host/"+*ConfigHostPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigHost require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigHost_Patch, reqBody) + require.Equal(t, ConfigHostPatch, reqBody) response := openapiclient.ConfigUpdateHostResponse{} body, err := json.Marshal(response) @@ -100,7 +98,7 @@ func Test_dns_config_HostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), *ConfigHost_Patch.Id).Body(ConfigHost_Patch).Execute() + resp, httpRes, err := apiClient.HostAPI.HostUpdate(context.Background(), *ConfigHostPatch.Id).Body(ConfigHostPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_config/test/api_lbdn_test.go b/dns_config/test/api_lbdn_test.go index 7b6f81c..54e6336 100644 --- a/dns_config/test/api_lbdn_test.go +++ b/dns_config/test/api_lbdn_test.go @@ -5,8 +5,6 @@ Testing LbdnAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,16 +21,16 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigLBDN_Post = openapiclient.ConfigLBDN{ +var ConfigLBDNPost = openapiclient.ConfigLBDN{ Id: openapiclient.PtrString("ConfigLBDNPost"), Tags: make(map[string]interface{}), } -var ConfigLBDN_Patch = openapiclient.ConfigLBDN{ +var ConfigLBDNPatch = openapiclient.ConfigLBDN{ Id: openapiclient.PtrString("ConfigLBDNPatch"), Tags: make(map[string]interface{}), } -func Test_dns_config_LbdnAPIService(t *testing.T) { +func TestLbdnAPIService(t *testing.T) { t.Run("Test LbdnAPIService LbdnCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -43,7 +41,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { var reqBody openapiclient.ConfigLBDN require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigLBDN_Post, reqBody) + require.Equal(t, ConfigLBDNPost, reqBody) response := openapiclient.ConfigCreateLBDNResponse{} body, err := json.Marshal(response) @@ -56,7 +54,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(ConfigLBDN_Post).Execute() + resp, httpRes, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(ConfigLBDNPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -66,7 +64,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDNPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -75,7 +73,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), *ConfigLBDN_Post.Id).Execute() + httpRes, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), *ConfigLBDNPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -108,7 +106,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDNPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadLBDNResponse{} @@ -122,7 +120,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.LbdnAPI.LbdnRead(context.Background(), *ConfigLBDN_Post.Id).Execute() + resp, httpRes, err := apiClient.LbdnAPI.LbdnRead(context.Background(), *ConfigLBDNPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -132,12 +130,12 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDN_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dtc/lbdn/"+*ConfigLBDNPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigLBDN require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigLBDN_Patch, reqBody) + require.Equal(t, ConfigLBDNPatch, reqBody) response := openapiclient.ConfigUpdateLBDNResponse{} body, err := json.Marshal(response) @@ -150,7 +148,7 @@ func Test_dns_config_LbdnAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), *ConfigLBDN_Patch.Id).Body(ConfigLBDN_Patch).Execute() + resp, httpRes, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), *ConfigLBDNPatch.Id).Body(ConfigLBDNPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_config/test/api_server_test.go b/dns_config/test/api_server_test.go index 99ebd57..79d6824 100644 --- a/dns_config/test/api_server_test.go +++ b/dns_config/test/api_server_test.go @@ -5,8 +5,6 @@ Testing ServerAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,16 +21,16 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigServer_Post = openapiclient.ConfigServer{ +var ConfigServerPost = openapiclient.ConfigServer{ Id: openapiclient.PtrString("ConfigServerPost"), Tags: make(map[string]interface{}), } -var ConfigServer_Patch = openapiclient.ConfigServer{ +var ConfigServerPatch = openapiclient.ConfigServer{ Id: openapiclient.PtrString("ConfigServerPatch"), Tags: make(map[string]interface{}), } -func Test_dns_config_ServerAPIService(t *testing.T) { +func TestServerAPIService(t *testing.T) { t.Run("Test ServerAPIService ServerCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -43,7 +41,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { var reqBody openapiclient.ConfigServer require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigServer_Post, reqBody) + require.Equal(t, ConfigServerPost, reqBody) response := openapiclient.ConfigCreateServerResponse{} body, err := json.Marshal(response) @@ -56,7 +54,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(ConfigServer_Post).Execute() + resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(ConfigServerPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -66,7 +64,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServerPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -75,7 +73,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *ConfigServer_Post.Id).Execute() + httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *ConfigServerPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -108,7 +106,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServerPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadServerResponse{} @@ -122,7 +120,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *ConfigServer_Post.Id).Execute() + resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *ConfigServerPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -132,12 +130,12 @@ func Test_dns_config_ServerAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServer_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/server/"+*ConfigServerPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigServer require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigServer_Patch, reqBody) + require.Equal(t, ConfigServerPatch, reqBody) response := openapiclient.ConfigUpdateServerResponse{} body, err := json.Marshal(response) @@ -150,7 +148,7 @@ func Test_dns_config_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *ConfigServer_Patch.Id).Body(ConfigServer_Patch).Execute() + resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *ConfigServerPatch.Id).Body(ConfigServerPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_config/test/api_view_test.go b/dns_config/test/api_view_test.go index 564d658..9c97050 100644 --- a/dns_config/test/api_view_test.go +++ b/dns_config/test/api_view_test.go @@ -5,8 +5,6 @@ Testing ViewAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_config_test import ( @@ -23,7 +21,7 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var ConfigBulkCopyView_Post = openapiclient.ConfigBulkCopyView{ +var ConfigBulkCopyViewPost = openapiclient.ConfigBulkCopyView{ AuthZoneConfig: nil, ForwardZoneConfig: nil, Recursive: nil, @@ -32,16 +30,16 @@ var ConfigBulkCopyView_Post = openapiclient.ConfigBulkCopyView{ SkipOnError: nil, Target: "TargetPost", } -var ConfigView_Post = openapiclient.ConfigView{ +var ConfigViewPost = openapiclient.ConfigView{ Id: openapiclient.PtrString("ConfigViewPost"), Tags: make(map[string]interface{}), } -var ConfigView_Patch = openapiclient.ConfigView{ +var ConfigViewPatch = openapiclient.ConfigView{ Id: openapiclient.PtrString("ConfigViewPatch"), Tags: make(map[string]interface{}), } -func Test_dns_config_ViewAPIService(t *testing.T) { +func TestViewAPIService(t *testing.T) { t.Run("Test ViewAPIService ViewBulkCopy", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -52,7 +50,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { var reqBody openapiclient.ConfigBulkCopyView require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigBulkCopyView_Post, reqBody) + require.Equal(t, ConfigBulkCopyViewPost, reqBody) response := openapiclient.ConfigBulkCopyResponse{} body, err := json.Marshal(response) @@ -65,7 +63,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(ConfigBulkCopyView_Post).Execute() + resp, httpRes, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(ConfigBulkCopyViewPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -80,7 +78,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { var reqBody openapiclient.ConfigView require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigView_Post, reqBody) + require.Equal(t, ConfigViewPost, reqBody) response := openapiclient.ConfigCreateViewResponse{} body, err := json.Marshal(response) @@ -93,7 +91,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(ConfigView_Post).Execute() + resp, httpRes, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(ConfigViewPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -103,7 +101,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigViewPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -112,7 +110,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.ViewAPI.ViewDelete(context.Background(), *ConfigView_Post.Id).Execute() + httpRes, err := apiClient.ViewAPI.ViewDelete(context.Background(), *ConfigViewPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -145,7 +143,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigViewPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.ConfigReadViewResponse{} @@ -159,7 +157,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ViewAPI.ViewRead(context.Background(), *ConfigView_Post.Id).Execute() + resp, httpRes, err := apiClient.ViewAPI.ViewRead(context.Background(), *ConfigViewPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -169,12 +167,12 @@ func Test_dns_config_ViewAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigView_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/view/"+*ConfigViewPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.ConfigView require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, ConfigView_Patch, reqBody) + require.Equal(t, ConfigViewPatch, reqBody) response := openapiclient.ConfigUpdateViewResponse{} body, err := json.Marshal(response) @@ -187,7 +185,7 @@ func Test_dns_config_ViewAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ViewAPI.ViewUpdate(context.Background(), *ConfigView_Patch.Id).Body(ConfigView_Patch).Execute() + resp, httpRes, err := apiClient.ViewAPI.ViewUpdate(context.Background(), *ConfigViewPatch.Id).Body(ConfigViewPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/dns_data/test/api_record_test.go b/dns_data/test/api_record_test.go index 95e25d0..0cd9a89 100644 --- a/dns_data/test/api_record_test.go +++ b/dns_data/test/api_record_test.go @@ -23,19 +23,19 @@ import ( "github.com/infobloxopen/bloxone-go-client/internal" ) -var DataRecord_Post = openapiclient.DataRecord{ +var DataRecordPost = openapiclient.DataRecord{ Id: openapiclient.PtrString("DataRecordPost"), Tags: make(map[string]interface{}), } -var DataSOASerialIncrementRequest_Post = openapiclient.DataSOASerialIncrementRequest{ +var DataSOASerialIncrementRequestPost = openapiclient.DataSOASerialIncrementRequest{ Id: openapiclient.PtrString("IncrementRequest"), } -var DataRecord_Patch = openapiclient.DataRecord{ +var DataRecordPatch = openapiclient.DataRecord{ Id: openapiclient.PtrString("DataRecordPatch"), Tags: make(map[string]interface{}), } -func Test_dns_data_RecordAPIService(t *testing.T) { +func TestRecordAPIService(t *testing.T) { t.Run("Test RecordAPIService RecordCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -46,8 +46,8 @@ func Test_dns_data_RecordAPIService(t *testing.T) { var reqBody openapiclient.DataRecord require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, DataRecord_Post.Id, reqBody.Id) - require.Equal(t, DataRecord_Post.Tags, reqBody.Tags) + require.Equal(t, DataRecordPost.Id, reqBody.Id) + require.Equal(t, DataRecordPost.Tags, reqBody.Tags) response := openapiclient.DataCreateRecordResponse{} body, err := json.Marshal(response) @@ -60,7 +60,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(DataRecord_Post).Execute() + resp, httpRes, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(DataRecordPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -70,7 +70,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecordPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -79,7 +79,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.RecordAPI.RecordDelete(context.Background(), *DataRecord_Post.Id).Execute() + httpRes, err := apiClient.RecordAPI.RecordDelete(context.Background(), *DataRecordPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -112,7 +112,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecordPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.DataReadRecordResponse{} @@ -126,7 +126,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RecordAPI.RecordRead(context.Background(), *DataRecord_Post.Id).Execute() + resp, httpRes, err := apiClient.RecordAPI.RecordRead(context.Background(), *DataRecordPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -136,12 +136,12 @@ func Test_dns_data_RecordAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/dns/record/"+*DataSOASerialIncrementRequest_Post.Id+"/serial_increment", req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataSOASerialIncrementRequestPost.Id+"/serial_increment", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.DataSOASerialIncrementRequest require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, DataSOASerialIncrementRequest_Post, reqBody) + require.Equal(t, DataSOASerialIncrementRequestPost, reqBody) response := openapiclient.DataSOASerialIncrementResponse{} body, err := json.Marshal(response) @@ -154,7 +154,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), *DataSOASerialIncrementRequest_Post.Id).Body(DataSOASerialIncrementRequest_Post).Execute() + resp, httpRes, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), *DataSOASerialIncrementRequestPost.Id).Body(DataSOASerialIncrementRequestPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -164,12 +164,12 @@ func Test_dns_data_RecordAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecord_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dns/record/"+*DataRecordPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.DataRecord require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, DataRecord_Patch, reqBody) + require.Equal(t, DataRecordPatch, reqBody) response := openapiclient.DataUpdateRecordResponse{} body, err := json.Marshal(response) @@ -182,7 +182,7 @@ func Test_dns_data_RecordAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), *DataRecord_Post.Id).Body(DataRecord_Patch).Execute() + resp, httpRes, err := apiClient.RecordAPI.RecordUpdate(context.Background(), *DataRecordPost.Id).Body(DataRecordPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_address_block_test.go b/ipam/test/api_address_block_test.go index f05e418..d96a4b7 100644 --- a/ipam/test/api_address_block_test.go +++ b/ipam/test/api_address_block_test.go @@ -26,32 +26,32 @@ import ( var cidrValue int64 = 34 -var IpamsvcCopyAddressBlock_Post = openapiclient.IpamsvcCopyAddressBlock{ +var IpamsvcCopyAddressBlockPost = openapiclient.IpamsvcCopyAddressBlock{ Id: openapiclient.PtrString("Test Copy"), } -var IpamsvcAddressBlock_Post = openapiclient.IpamsvcAddressBlock{ +var IpamsvcAddressBlockPost = openapiclient.IpamsvcAddressBlock{ Id: openapiclient.PtrString("Test Create"), Cidr: &cidrValue, Tags: make(map[string]interface{}), } -var IpamsvcAddressBlock_Patch = openapiclient.IpamsvcAddressBlock{ +var IpamsvcAddressBlockPatch = openapiclient.IpamsvcAddressBlock{ Id: openapiclient.PtrString("Test Update"), Cidr: &cidrValue, Tags: make(map[string]interface{}), } -func Test_ipam_AddressBlockAPIService(t *testing.T) { +func TestAddressBlockAPIService(t *testing.T) { t.Run("Test AddressBlockAPIService AddressBlockCopy", func(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcCopyAddressBlock_Post.Id+"/copy", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcCopyAddressBlockPost.Id+"/copy", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcCopyAddressBlock assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcCopyAddressBlock_Post, reqBody) + assert.Equal(t, IpamsvcCopyAddressBlockPost, reqBody) response := openapiclient.IpamsvcCopyAddressBlockResponse{} body, err := json.Marshal(response) @@ -64,7 +64,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), *IpamsvcCopyAddressBlock_Post.Id).Body(IpamsvcCopyAddressBlock_Post).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), *IpamsvcCopyAddressBlockPost.Id).Body(IpamsvcCopyAddressBlockPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -78,7 +78,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcAddressBlock assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcAddressBlock_Post, reqBody) + assert.Equal(t, IpamsvcAddressBlockPost, reqBody) response := openapiclient.IpamsvcCreateAddressBlockResponse{} body, err := json.Marshal(response) @@ -91,7 +91,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(IpamsvcAddressBlock_Post).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(IpamsvcAddressBlockPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -100,7 +100,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableaddressblock", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id+"/nextavailableaddressblock", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcCreateNextAvailableABResponse{} @@ -114,7 +114,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), *IpamsvcAddressBlock_Post.Id).Cidr(34).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), *IpamsvcAddressBlockPost.Id).Cidr(34).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -123,7 +123,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id+"/nextavailableip", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcCreateNextAvailableIPResponse{} @@ -137,7 +137,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), *IpamsvcAddressBlockPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -146,7 +146,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailablesubnet", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id+"/nextavailablesubnet", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcCreateNextAvailableSubnetResponse{} @@ -160,7 +160,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), *IpamsvcAddressBlock_Post.Id).Cidr(34).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), *IpamsvcAddressBlockPost.Id).Cidr(34).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -169,7 +169,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -178,7 +178,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + httpRes, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), *IpamsvcAddressBlockPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -209,7 +209,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableaddressblock", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id+"/nextavailableaddressblock", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcNextAvailableABResponse{} @@ -223,7 +223,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), *IpamsvcAddressBlockPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -233,7 +233,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id+"/nextavailableip", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcNextAvailableIPResponse{} @@ -247,7 +247,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), *IpamsvcAddressBlockPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -256,7 +256,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id+"/nextavailablesubnet", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id+"/nextavailablesubnet", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcNextAvailableSubnetResponse{} @@ -270,7 +270,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), *IpamsvcAddressBlockPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -279,7 +279,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadAddressBlockResponse{} @@ -293,7 +293,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), *IpamsvcAddressBlock_Post.Id).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), *IpamsvcAddressBlockPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -302,12 +302,12 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlock_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address_block/"+*IpamsvcAddressBlockPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcAddressBlock assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcAddressBlock_Patch, reqBody) + assert.Equal(t, IpamsvcAddressBlockPatch, reqBody) response := openapiclient.IpamsvcUpdateAddressBlockResponse{} body, err := json.Marshal(response) @@ -320,7 +320,7 @@ func Test_ipam_AddressBlockAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), *IpamsvcAddressBlock_Patch.Id).Body(IpamsvcAddressBlock_Patch).Execute() + resp, httpRes, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), *IpamsvcAddressBlockPatch.Id).Body(IpamsvcAddressBlockPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_address_test.go b/ipam/test/api_address_test.go index 3f1dd0c..ce3b7d5 100644 --- a/ipam/test/api_address_test.go +++ b/ipam/test/api_address_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcAddress_Post = openapiclient.IpamsvcAddress{ +var IpamsvcAddressPost = openapiclient.IpamsvcAddress{ Id: openapiclient.PtrString("Test Create"), Tags: make(map[string]interface{}), } -var IpamsvcAddress_Patch = openapiclient.IpamsvcAddress{ +var IpamsvcAddressPatch = openapiclient.IpamsvcAddress{ Id: openapiclient.PtrString("Test Update"), Tags: make(map[string]interface{}), } -func Test_ipam_AddressAPIService(t *testing.T) { +func TestAddressAPIService(t *testing.T) { t.Run("Test AddressAPIService AddressCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcAddress assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcAddress_Post, reqBody) + assert.Equal(t, IpamsvcAddressPost, reqBody) response := openapiclient.IpamsvcCreateAddressResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(IpamsvcAddress_Post).Execute() + resp, httpRes, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(IpamsvcAddressPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddress_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddressPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.AddressAPI.AddressDelete(context.Background(), *IpamsvcAddress_Post.Id).Execute() + httpRes, err := apiClient.AddressAPI.AddressDelete(context.Background(), *IpamsvcAddressPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddress_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddressPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadAddressResponse{} @@ -123,7 +123,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressAPI.AddressRead(context.Background(), *IpamsvcAddress_Post.Id).Execute() + resp, httpRes, err := apiClient.AddressAPI.AddressRead(context.Background(), *IpamsvcAddressPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_AddressAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddress_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/address/"+*IpamsvcAddressPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcAddress assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcAddress_Patch, reqBody) + assert.Equal(t, IpamsvcAddressPatch, reqBody) response := openapiclient.IpamsvcUpdateAddressResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_AddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AddressAPI.AddressUpdate(context.Background(), *IpamsvcAddress_Patch.Id).Body(IpamsvcAddress_Patch).Execute() + resp, httpRes, err := apiClient.AddressAPI.AddressUpdate(context.Background(), *IpamsvcAddressPatch.Id).Body(IpamsvcAddressPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_asm_test.go b/ipam/test/api_asm_test.go index 7406546..daedbeb 100644 --- a/ipam/test/api_asm_test.go +++ b/ipam/test/api_asm_test.go @@ -24,11 +24,11 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcASM_Post = openapiclient.IpamsvcASM{ +var IpamsvcASMPost = openapiclient.IpamsvcASM{ Id: openapiclient.PtrString("Test Create"), } -func Test_ipam_AsmAPIService(t *testing.T) { +func TestAsmAPIService(t *testing.T) { t.Run("Test AsmAPIService AsmCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -39,7 +39,7 @@ func Test_ipam_AsmAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcASM assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcASM_Post, reqBody) + assert.Equal(t, IpamsvcASMPost, reqBody) response := openapiclient.IpamsvcCreateASMResponse{} body, err := json.Marshal(response) @@ -52,7 +52,7 @@ func Test_ipam_AsmAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(IpamsvcASM_Post).Execute() + resp, httpRes, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(IpamsvcASMPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -84,7 +84,7 @@ func Test_ipam_AsmAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/asm/"+*IpamsvcASM_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/asm/"+*IpamsvcASMPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadASMResponse{} @@ -98,7 +98,7 @@ func Test_ipam_AsmAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.AsmAPI.AsmRead(context.Background(), *IpamsvcASM_Post.Id).Execute() + resp, httpRes, err := apiClient.AsmAPI.AsmRead(context.Background(), *IpamsvcASMPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_dhcp_host_test.go b/ipam/test/api_dhcp_host_test.go index 7cc3aba..7111c1a 100644 --- a/ipam/test/api_dhcp_host_test.go +++ b/ipam/test/api_dhcp_host_test.go @@ -24,12 +24,12 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcHost_Patch = openapiclient.IpamsvcHost{ +var IpamsvcHostPatch = openapiclient.IpamsvcHost{ Id: openapiclient.PtrString("Test"), Tags: make(map[string]interface{}), } -func Test_ipam_DhcpHostAPIService(t *testing.T) { +func TestDhcpHostAPIService(t *testing.T) { t.Run("Test DhcpHostAPIService DhcpHostList", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -59,7 +59,7 @@ func Test_ipam_DhcpHostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHost_Patch.Id+"/associations", req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHostPatch.Id+"/associations", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcHostAssociationsResponse{} @@ -73,7 +73,7 @@ func Test_ipam_DhcpHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), *IpamsvcHost_Patch.Id).Execute() + resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), *IpamsvcHostPatch.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -83,7 +83,7 @@ func Test_ipam_DhcpHostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHost_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHostPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadHostResponse{} @@ -97,7 +97,7 @@ func Test_ipam_DhcpHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), *IpamsvcHost_Patch.Id).Execute() + resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), *IpamsvcHostPatch.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -107,12 +107,12 @@ func Test_ipam_DhcpHostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHost_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/host/"+*IpamsvcHostPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcHost assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcHost_Patch, reqBody) + assert.Equal(t, IpamsvcHostPatch, reqBody) response := openapiclient.IpamsvcUpdateHostResponse{} body, err := json.Marshal(response) @@ -125,7 +125,7 @@ func Test_ipam_DhcpHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), *IpamsvcHost_Patch.Id).Body(IpamsvcHost_Patch).Execute() + resp, httpRes, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), *IpamsvcHostPatch.Id).Body(IpamsvcHostPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_dns_usage_test.go b/ipam/test/api_dns_usage_test.go index 8af395c..4f9af8f 100644 --- a/ipam/test/api_dns_usage_test.go +++ b/ipam/test/api_dns_usage_test.go @@ -28,7 +28,7 @@ var IpamsvcDNSUsage = openapiclient.IpamsvcDNSUsage{ Id: openapiclient.PtrString("Test"), } -func Test_ipam_DnsUsageAPIService(t *testing.T) { +func TestDnsUsageAPIService(t *testing.T) { t.Run("Test DnsUsageAPIService DnsUsageList", func(t *testing.T) { configuration := internal.NewConfiguration() diff --git a/ipam/test/api_filter_test.go b/ipam/test/api_filter_test.go index 5d74dd4..4e2971b 100644 --- a/ipam/test/api_filter_test.go +++ b/ipam/test/api_filter_test.go @@ -24,12 +24,7 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcFilter_Post = openapiclient.IpamsvcFilter{ - - Id: openapiclient.PtrString("Test"), -} - -func Test_ipam_FilterAPIService(t *testing.T) { +func TestFilterAPIService(t *testing.T) { t.Run("Test FilterAPIService FilterList", func(t *testing.T) { configuration := internal.NewConfiguration() diff --git a/ipam/test/api_fixed_address_test.go b/ipam/test/api_fixed_address_test.go index b6a8502..a4ddece 100644 --- a/ipam/test/api_fixed_address_test.go +++ b/ipam/test/api_fixed_address_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcFixedAddress_Post = openapiclient.IpamsvcFixedAddress{ +var IpamsvcFixedAddressPost = openapiclient.IpamsvcFixedAddress{ Id: openapiclient.PtrString("Test Create"), Tags: make(map[string]interface{}), } -var IpamsvcFixedAddress_Patch = openapiclient.IpamsvcFixedAddress{ +var IpamsvcFixedAddressPatch = openapiclient.IpamsvcFixedAddress{ Id: openapiclient.PtrString("Test Update"), Tags: make(map[string]interface{}), } -func Test_ipam_FixedAddressAPIService(t *testing.T) { +func TestFixedAddressAPIService(t *testing.T) { t.Run("Test FixedAddressAPIService FixedAddressCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcFixedAddress assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcFixedAddress_Post, reqBody) + assert.Equal(t, IpamsvcFixedAddressPost, reqBody) response := openapiclient.IpamsvcCreateFixedAddressResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(IpamsvcFixedAddress_Post).Execute() + resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(IpamsvcFixedAddressPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddress_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddressPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), *IpamsvcFixedAddress_Post.Id).Execute() + httpRes, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), *IpamsvcFixedAddressPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddress_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddressPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadFixedAddressResponse{} @@ -123,7 +123,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), *IpamsvcFixedAddress_Post.Id).Execute() + resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), *IpamsvcFixedAddressPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddress_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/fixed_address/"+*IpamsvcFixedAddressPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcFixedAddress assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcFixedAddress_Patch, reqBody) + assert.Equal(t, IpamsvcFixedAddressPatch, reqBody) response := openapiclient.IpamsvcUpdateFixedAddressResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_FixedAddressAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), *IpamsvcAddress_Patch.Id).Body(IpamsvcFixedAddress_Patch).Execute() + resp, httpRes, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), *IpamsvcAddressPatch.Id).Body(IpamsvcFixedAddressPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_global_test.go b/ipam/test/api_global_test.go index 2e041fe..fee9f16 100644 --- a/ipam/test/api_global_test.go +++ b/ipam/test/api_global_test.go @@ -24,14 +24,14 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcGlobal_Patch1 = openapiclient.IpamsvcGlobal{ +var IpamsvcGlobalPatch1 = openapiclient.IpamsvcGlobal{ Id: openapiclient.PtrString("Test 1"), } -var IpamsvcGlobal_Patch2 = openapiclient.IpamsvcGlobal{ +var IpamsvcGlobalPatch2 = openapiclient.IpamsvcGlobal{ Id: openapiclient.PtrString("Test 2"), } -func Test_ipam_GlobalAPIService(t *testing.T) { +func TestGlobalAPIService(t *testing.T) { t.Run("Test GlobalAPIService GlobalRead", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -61,7 +61,7 @@ func Test_ipam_GlobalAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/global/"+*IpamsvcGlobal_Patch2.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/global/"+*IpamsvcGlobalPatch2.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadGlobalResponse{} @@ -75,7 +75,7 @@ func Test_ipam_GlobalAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), *IpamsvcGlobal_Patch2.Id).Execute() + resp, httpRes, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), *IpamsvcGlobalPatch2.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -89,7 +89,7 @@ func Test_ipam_GlobalAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcGlobal assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcGlobal_Patch1, reqBody) + assert.Equal(t, IpamsvcGlobalPatch1, reqBody) response := openapiclient.IpamsvcUpdateGlobalResponse{} body, err := json.Marshal(response) @@ -102,7 +102,7 @@ func Test_ipam_GlobalAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(IpamsvcGlobal_Patch1).Execute() + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(IpamsvcGlobalPatch1).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -112,12 +112,12 @@ func Test_ipam_GlobalAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/global/"+*IpamsvcGlobal_Patch2.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/global/"+*IpamsvcGlobalPatch2.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcGlobal assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcGlobal_Patch2, reqBody) + assert.Equal(t, IpamsvcGlobalPatch2, reqBody) response := openapiclient.IpamsvcUpdateGlobalResponse{} body, err := json.Marshal(response) @@ -130,7 +130,7 @@ func Test_ipam_GlobalAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), *IpamsvcGlobal_Patch2.Id).Body(IpamsvcGlobal_Patch2).Execute() + resp, httpRes, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), *IpamsvcGlobalPatch2.Id).Body(IpamsvcGlobalPatch2).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_ha_group_test.go b/ipam/test/api_ha_group_test.go index ebdbf11..f242991 100644 --- a/ipam/test/api_ha_group_test.go +++ b/ipam/test/api_ha_group_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcHAGroup_Post = openapiclient.IpamsvcHAGroup{ +var IpamsvcHAGroupPost = openapiclient.IpamsvcHAGroup{ Id: openapiclient.PtrString("Test Create"), Tags: make(map[string]interface{}), } -var IpamsvcHAGroup_Patch = openapiclient.IpamsvcHAGroup{ +var IpamsvcHAGroupPatch = openapiclient.IpamsvcHAGroup{ Id: openapiclient.PtrString("Test Update"), Tags: make(map[string]interface{}), } -func Test_ipam_HaGroupAPIService(t *testing.T) { +func TestHaGroupAPIService(t *testing.T) { t.Run("Test HaGroupAPIService HaGroupCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcHAGroup assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcHAGroup_Post, reqBody) + assert.Equal(t, IpamsvcHAGroupPost, reqBody) response := openapiclient.IpamsvcCreateHAGroupResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(IpamsvcHAGroup_Post).Execute() + resp, httpRes, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(IpamsvcHAGroupPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroup_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroupPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), *IpamsvcHAGroup_Post.Id).Execute() + httpRes, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), *IpamsvcHAGroupPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroup_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroupPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadHAGroupResponse{} @@ -123,7 +123,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), *IpamsvcHAGroup_Post.Id).Execute() + resp, httpRes, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), *IpamsvcHAGroupPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroup_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/ha_group/"+*IpamsvcHAGroupPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcHAGroup assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcHAGroup_Patch, reqBody) + assert.Equal(t, IpamsvcHAGroupPatch, reqBody) response := openapiclient.IpamsvcUpdateHAGroupResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_HaGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), *IpamsvcHAGroup_Patch.Id).Body(IpamsvcHAGroup_Patch).Execute() + resp, httpRes, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), *IpamsvcHAGroupPatch.Id).Body(IpamsvcHAGroupPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_hardware_filter_test.go b/ipam/test/api_hardware_filter_test.go index d5bbfca..ff91d14 100644 --- a/ipam/test/api_hardware_filter_test.go +++ b/ipam/test/api_hardware_filter_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcHardwareFilter_Post = openapiclient.IpamsvcHardwareFilter{ +var IpamsvcHardwareFilterPost = openapiclient.IpamsvcHardwareFilter{ Id: openapiclient.PtrString("Test Create"), Tags: make(map[string]interface{}), } -var IpamsvcHardwareFilter_Patch = openapiclient.IpamsvcHardwareFilter{ +var IpamsvcHardwareFilterPatch = openapiclient.IpamsvcHardwareFilter{ Id: openapiclient.PtrString("Test Update"), Tags: make(map[string]interface{}), } -func Test_ipam_HardwareFilterAPIService(t *testing.T) { +func TestHardwareFilterAPIService(t *testing.T) { t.Run("Test HardwareFilterAPIService HardwareFilterCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcHardwareFilter assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcHardwareFilter_Post, reqBody) + assert.Equal(t, IpamsvcHardwareFilterPost, reqBody) response := openapiclient.IpamsvcCreateHardwareFilterResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(IpamsvcHardwareFilter_Post).Execute() + resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(IpamsvcHardwareFilterPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilter_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilterPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), *IpamsvcHardwareFilter_Post.Id).Execute() + httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), *IpamsvcHardwareFilterPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilter_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilterPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadHardwareFilterResponse{} @@ -123,7 +123,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), *IpamsvcHardwareFilter_Post.Id).Execute() + resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), *IpamsvcHardwareFilterPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilter_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/hardware_filter/"+*IpamsvcHardwareFilterPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcHardwareFilter assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcHardwareFilter_Patch, reqBody) + assert.Equal(t, IpamsvcHardwareFilterPatch, reqBody) response := openapiclient.IpamsvcUpdateHardwareFilterResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_HardwareFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), *IpamsvcHardwareFilter_Post.Id).Body(IpamsvcHardwareFilter_Patch).Execute() + resp, httpRes, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), *IpamsvcHardwareFilterPost.Id).Body(IpamsvcHardwareFilterPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_ip_space_test.go b/ipam/test/api_ip_space_test.go index 5707986..1e2d7d6 100644 --- a/ipam/test/api_ip_space_test.go +++ b/ipam/test/api_ip_space_test.go @@ -24,20 +24,20 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcBulkCopyIPSpace_Post = openapiclient.IpamsvcBulkCopyIPSpace{} -var IpamsvcCopyIPSpace_Post = openapiclient.IpamsvcCopyIPSpace{ +var IpamsvcBulkCopyIPSpacePost = openapiclient.IpamsvcBulkCopyIPSpace{} +var IpamsvcCopyIPSpacePost = openapiclient.IpamsvcCopyIPSpace{ Id: openapiclient.PtrString("Test Copy Post"), } -var IpamsvcIPSpace_Post = openapiclient.IpamsvcIPSpace{ +var IpamsvcIPSpacePost = openapiclient.IpamsvcIPSpace{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcIPSpace_Patch = openapiclient.IpamsvcIPSpace{ +var IpamsvcIPSpacePatch = openapiclient.IpamsvcIPSpace{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_IpSpaceAPIService(t *testing.T) { +func TestIpSpaceAPIService(t *testing.T) { t.Run("Test IpSpaceAPIService IpSpaceBulkCopy", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -48,7 +48,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcBulkCopyIPSpace assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcBulkCopyIPSpace_Post, reqBody) + assert.Equal(t, IpamsvcBulkCopyIPSpacePost, reqBody) response := openapiclient.IpamsvcBulkCopyIPSpaceResponse{} body, err := json.Marshal(response) @@ -61,7 +61,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(IpamsvcBulkCopyIPSpace_Post).Execute() + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(IpamsvcBulkCopyIPSpacePost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -71,12 +71,12 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcCopyIPSpace_Post.Id+"/copy", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcCopyIPSpacePost.Id+"/copy", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcCopyIPSpace assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcCopyIPSpace_Post, reqBody) + assert.Equal(t, IpamsvcCopyIPSpacePost, reqBody) response := openapiclient.IpamsvcCopyIPSpaceResponse{} body, err := json.Marshal(response) @@ -89,7 +89,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), *IpamsvcCopyIPSpace_Post.Id).Body(IpamsvcCopyIPSpace_Post).Execute() + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), *IpamsvcCopyIPSpacePost.Id).Body(IpamsvcCopyIPSpacePost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -104,7 +104,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcIPSpace assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcIPSpace_Post, reqBody) + assert.Equal(t, IpamsvcIPSpacePost, reqBody) response := openapiclient.IpamsvcCreateIPSpaceResponse{} body, err := json.Marshal(response) @@ -117,7 +117,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(IpamsvcIPSpace_Post).Execute() + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(IpamsvcIPSpacePost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -127,7 +127,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpace_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpacePost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -136,7 +136,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), *IpamsvcIPSpace_Post.Id).Execute() + httpRes, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), *IpamsvcIPSpacePost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -169,7 +169,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpace_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpacePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadIPSpaceResponse{} @@ -183,7 +183,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), *IpamsvcIPSpace_Post.Id).Execute() + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), *IpamsvcIPSpacePost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -193,12 +193,12 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpace_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/ip_space/"+*IpamsvcIPSpacePatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcIPSpace assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcIPSpace_Patch, reqBody) + assert.Equal(t, IpamsvcIPSpacePatch, reqBody) response := openapiclient.IpamsvcUpdateIPSpaceResponse{} body, err := json.Marshal(response) @@ -211,7 +211,7 @@ func Test_ipam_IpSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), *IpamsvcIPSpace_Patch.Id).Body(IpamsvcIPSpace_Patch).Execute() + resp, httpRes, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), *IpamsvcIPSpacePatch.Id).Body(IpamsvcIPSpacePatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_ipam_host_test.go b/ipam/test/api_ipam_host_test.go index 5e1244a..abb6894 100644 --- a/ipam/test/api_ipam_host_test.go +++ b/ipam/test/api_ipam_host_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcIpamHost_Post = openapiclient.IpamsvcIpamHost{ +var IpamsvcIpamHostPost = openapiclient.IpamsvcIpamHost{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcIpamHost_Patch = openapiclient.IpamsvcIpamHost{ +var IpamsvcIpamHostPatch = openapiclient.IpamsvcIpamHost{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_IpamHostAPIService(t *testing.T) { +func TestIpamHostAPIService(t *testing.T) { t.Run("Test IpamHostAPIService IpamHostCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcIpamHost assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcIpamHost_Post, reqBody) + assert.Equal(t, IpamsvcIpamHostPost, reqBody) response := openapiclient.IpamsvcCreateIpamHostResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(IpamsvcIpamHost_Post).Execute() + resp, httpRes, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(IpamsvcIpamHostPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHost_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHostPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), *IpamsvcIpamHost_Post.Id).Execute() + httpRes, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), *IpamsvcIpamHostPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHost_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHostPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadIpamHostResponse{} @@ -123,7 +123,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), *IpamsvcIpamHost_Post.Id).Execute() + resp, httpRes, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), *IpamsvcIpamHostPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHost_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/host/"+*IpamsvcIpamHostPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcIpamHost assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcIpamHost_Patch, reqBody) + assert.Equal(t, IpamsvcIpamHostPatch, reqBody) response := openapiclient.IpamsvcUpdateIpamHostResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_IpamHostAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), *IpamsvcIpamHost_Patch.Id).Body(IpamsvcIpamHost_Patch).Execute() + resp, httpRes, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), *IpamsvcIpamHostPatch.Id).Body(IpamsvcIpamHostPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_leases_command_test.go b/ipam/test/api_leases_command_test.go index 408864c..55d80c5 100644 --- a/ipam/test/api_leases_command_test.go +++ b/ipam/test/api_leases_command_test.go @@ -24,9 +24,9 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcLeasesCommand_Post = openapiclient.IpamsvcLeasesCommand{} +var IpamsvcLeasesCommandPost = openapiclient.IpamsvcLeasesCommand{} -func Test_ipam_LeasesCommandAPIService(t *testing.T) { +func TestLeasesCommandAPIService(t *testing.T) { t.Run("Test LeasesCommandAPIService LeasesCommandCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -37,7 +37,7 @@ func Test_ipam_LeasesCommandAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcLeasesCommand assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcLeasesCommand_Post, reqBody) + assert.Equal(t, IpamsvcLeasesCommandPost, reqBody) response := openapiclient.IpamsvcCreateLeasesCommandResponse{} body, err := json.Marshal(response) @@ -50,7 +50,7 @@ func Test_ipam_LeasesCommandAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(IpamsvcLeasesCommand_Post).Execute() + resp, httpRes, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(IpamsvcLeasesCommandPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_option_code_test.go b/ipam/test/api_option_code_test.go index 4b57f12..dfcec0a 100644 --- a/ipam/test/api_option_code_test.go +++ b/ipam/test/api_option_code_test.go @@ -24,14 +24,14 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcOptionCode_Post = openapiclient.IpamsvcOptionCode{ +var IpamsvcOptionCodePost = openapiclient.IpamsvcOptionCode{ Id: openapiclient.PtrString("Test Post"), } -var IpamsvcOptionCode_Patch = openapiclient.IpamsvcOptionCode{ +var IpamsvcOptionCodePatch = openapiclient.IpamsvcOptionCode{ Id: openapiclient.PtrString("Test Patch"), } -func Test_ipam_OptionCodeAPIService(t *testing.T) { +func TestOptionCodeAPIService(t *testing.T) { t.Run("Test OptionCodeAPIService OptionCodeCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -42,7 +42,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcOptionCode assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionCode_Post, reqBody) + assert.Equal(t, IpamsvcOptionCodePost, reqBody) response := openapiclient.IpamsvcCreateOptionCodeResponse{} body, err := json.Marshal(response) @@ -55,7 +55,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(IpamsvcOptionCode_Post).Execute() + resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(IpamsvcOptionCodePost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -65,7 +65,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCode_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCodePost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -75,7 +75,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), *IpamsvcOptionCode_Post.Id).Execute() + httpRes, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), *IpamsvcOptionCodePost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -108,7 +108,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCode_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCodePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadOptionCodeResponse{} @@ -122,7 +122,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), *IpamsvcOptionCode_Post.Id).Execute() + resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), *IpamsvcOptionCodePost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -132,12 +132,12 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCode_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_code/"+*IpamsvcOptionCodePatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcOptionCode assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionCode_Patch, reqBody) + assert.Equal(t, IpamsvcOptionCodePatch, reqBody) response := openapiclient.IpamsvcUpdateOptionCodeResponse{} body, err := json.Marshal(response) @@ -150,7 +150,7 @@ func Test_ipam_OptionCodeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), *IpamsvcOptionCode_Patch.Id).Body(IpamsvcOptionCode_Patch).Execute() + resp, httpRes, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), *IpamsvcOptionCodePatch.Id).Body(IpamsvcOptionCodePatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_option_filter_test.go b/ipam/test/api_option_filter_test.go index 092c6e6..99b119f 100644 --- a/ipam/test/api_option_filter_test.go +++ b/ipam/test/api_option_filter_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcOptionFilter_Post = openapiclient.IpamsvcOptionFilter{ +var IpamsvcOptionFilterPost = openapiclient.IpamsvcOptionFilter{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcOptionFilter_Patch = openapiclient.IpamsvcOptionFilter{ +var IpamsvcOptionFilterPatch = openapiclient.IpamsvcOptionFilter{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_OptionFilterAPIService(t *testing.T) { +func TestOptionFilterAPIService(t *testing.T) { t.Run("Test OptionFilterAPIService OptionFilterCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcOptionFilter assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionFilter_Post, reqBody) + assert.Equal(t, IpamsvcOptionFilterPost, reqBody) response := openapiclient.IpamsvcCreateOptionFilterResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(IpamsvcOptionFilter_Post).Execute() + resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(IpamsvcOptionFilterPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilter_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilterPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), *IpamsvcOptionFilter_Post.Id).Execute() + httpRes, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), *IpamsvcOptionFilterPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilter_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilterPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadOptionFilterResponse{} @@ -123,7 +123,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), *IpamsvcOptionFilter_Post.Id).Execute() + resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), *IpamsvcOptionFilterPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilter_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_filter/"+*IpamsvcOptionFilterPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcOptionFilter assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionFilter_Patch, reqBody) + assert.Equal(t, IpamsvcOptionFilterPatch, reqBody) response := openapiclient.IpamsvcUpdateOptionFilterResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_OptionFilterAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), *IpamsvcOptionFilter_Post.Id).Body(IpamsvcOptionFilter_Patch).Execute() + resp, httpRes, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), *IpamsvcOptionFilterPost.Id).Body(IpamsvcOptionFilterPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_option_group_test.go b/ipam/test/api_option_group_test.go index be177b3..6fa9f01 100644 --- a/ipam/test/api_option_group_test.go +++ b/ipam/test/api_option_group_test.go @@ -24,11 +24,11 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcOptionGroup_Post = openapiclient.IpamsvcOptionGroup{ +var IpamsvcOptionGroupPost = openapiclient.IpamsvcOptionGroup{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcOptionGroup_Patch = openapiclient.IpamsvcOptionGroup{ +var IpamsvcOptionGroupPatch = openapiclient.IpamsvcOptionGroup{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } @@ -44,7 +44,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcOptionGroup assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionGroup_Post, reqBody) + assert.Equal(t, IpamsvcOptionGroupPost, reqBody) response := openapiclient.IpamsvcCreateOptionGroupResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(IpamsvcOptionGroup_Post).Execute() + resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(IpamsvcOptionGroupPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroup_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroupPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), *IpamsvcOptionGroup_Post.Id).Execute() + httpRes, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), *IpamsvcOptionGroupPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroup_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroupPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadOptionGroupResponse{} @@ -123,7 +123,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), *IpamsvcOptionGroup_Post.Id).Execute() + resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), *IpamsvcOptionGroupPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroup_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_group/"+*IpamsvcOptionGroupPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcOptionGroup assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionGroup_Patch, reqBody) + assert.Equal(t, IpamsvcOptionGroupPatch, reqBody) response := openapiclient.IpamsvcUpdateOptionGroupResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_OptionGroupAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), *IpamsvcOptionGroup_Patch.Id).Body(IpamsvcOptionGroup_Patch).Execute() + resp, httpRes, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), *IpamsvcOptionGroupPatch.Id).Body(IpamsvcOptionGroupPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_option_space_test.go b/ipam/test/api_option_space_test.go index 577bdd7..86dfbc5 100644 --- a/ipam/test/api_option_space_test.go +++ b/ipam/test/api_option_space_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcOptionSpace_Post = openapiclient.IpamsvcOptionSpace{ +var IpamsvcOptionSpacePost = openapiclient.IpamsvcOptionSpace{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcOptionSpace_Patch = openapiclient.IpamsvcOptionSpace{ +var IpamsvcOptionSpacePatch = openapiclient.IpamsvcOptionSpace{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_OptionSpaceAPIService(t *testing.T) { +func TestOptionSpaceAPIService(t *testing.T) { t.Run("Test OptionSpaceAPIService OptionSpaceCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcOptionSpace assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionSpace_Post, reqBody) + assert.Equal(t, IpamsvcOptionSpacePost, reqBody) response := openapiclient.IpamsvcCreateOptionSpaceResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(IpamsvcOptionSpace_Post).Execute() + resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(IpamsvcOptionSpacePost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpace_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpacePost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), *IpamsvcOptionSpace_Post.Id).Execute() + httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), *IpamsvcOptionSpacePost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpace_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpacePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadOptionSpaceResponse{} @@ -123,7 +123,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), *IpamsvcOptionSpace_Post.Id).Execute() + resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), *IpamsvcOptionSpacePost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpace_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/option_space/"+*IpamsvcOptionSpacePatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcOptionSpace assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcOptionSpace_Patch, reqBody) + assert.Equal(t, IpamsvcOptionSpacePatch, reqBody) response := openapiclient.IpamsvcUpdateOptionSpaceResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_OptionSpaceAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), *IpamsvcOptionSpace_Patch.Id).Body(IpamsvcOptionSpace_Patch).Execute() + resp, httpRes, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), *IpamsvcOptionSpacePatch.Id).Body(IpamsvcOptionSpacePatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_range_test.go b/ipam/test/api_range_test.go index 317170f..d8c5fa5 100644 --- a/ipam/test/api_range_test.go +++ b/ipam/test/api_range_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcRange_Post = openapiclient.IpamsvcRange{ +var IpamsvcRangePost = openapiclient.IpamsvcRange{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcRange_Patch = openapiclient.IpamsvcRange{ +var IpamsvcRangePatch = openapiclient.IpamsvcRange{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_RangeAPIService(t *testing.T) { +func TestRangeAPIService(t *testing.T) { t.Run("Test RangeAPIService RangeCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcRange assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcRange_Post, reqBody) + assert.Equal(t, IpamsvcRangePost, reqBody) response := openapiclient.IpamsvcCreateRangeResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(IpamsvcRange_Post).Execute() + resp, httpRes, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(IpamsvcRangePost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRangePost.Id+"/nextavailableip", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcCreateNextAvailableIPResponse{} @@ -81,7 +81,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), *IpamsvcRange_Post.Id).Execute() + resp, httpRes, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), *IpamsvcRangePost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -91,7 +91,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRangePost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -101,7 +101,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.RangeAPI.RangeDelete(context.Background(), *IpamsvcRange_Post.Id).Execute() + httpRes, err := apiClient.RangeAPI.RangeDelete(context.Background(), *IpamsvcRangePost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -134,7 +134,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRangePost.Id+"/nextavailableip", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcNextAvailableIPResponse{} @@ -148,7 +148,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), *IpamsvcRange_Post.Id).Execute() + resp, httpRes, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), *IpamsvcRangePost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -158,7 +158,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRangePost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadRangeResponse{} @@ -172,7 +172,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RangeAPI.RangeRead(context.Background(), *IpamsvcRange_Post.Id).Execute() + resp, httpRes, err := apiClient.RangeAPI.RangeRead(context.Background(), *IpamsvcRangePost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -182,12 +182,12 @@ func Test_ipam_RangeAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRange_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/range/"+*IpamsvcRangePatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcRange assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcRange_Patch, reqBody) + assert.Equal(t, IpamsvcRangePatch, reqBody) response := openapiclient.IpamsvcUpdateRangeResponse{} body, err := json.Marshal(response) @@ -200,7 +200,7 @@ func Test_ipam_RangeAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.RangeAPI.RangeUpdate(context.Background(), *IpamsvcRange_Patch.Id).Body(IpamsvcRange_Patch).Execute() + resp, httpRes, err := apiClient.RangeAPI.RangeUpdate(context.Background(), *IpamsvcRangePatch.Id).Body(IpamsvcRangePatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_server_test.go b/ipam/test/api_server_test.go index e876ac9..6d0e212 100644 --- a/ipam/test/api_server_test.go +++ b/ipam/test/api_server_test.go @@ -24,16 +24,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcServer_Post = openapiclient.IpamsvcServer{ +var IpamsvcServerPost = openapiclient.IpamsvcServer{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcServer_Patch = openapiclient.IpamsvcServer{ +var IpamsvcServerPatch = openapiclient.IpamsvcServer{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_ServerAPIService(t *testing.T) { +func TestServerAPIService(t *testing.T) { t.Run("Test ServerAPIService ServerCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -44,7 +44,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcServer assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcServer_Post, reqBody) + assert.Equal(t, IpamsvcServerPost, reqBody) response := openapiclient.IpamsvcCreateServerResponse{} body, err := json.Marshal(response) @@ -57,7 +57,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(IpamsvcServer_Post).Execute() + resp, httpRes, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(IpamsvcServerPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -67,7 +67,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServer_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServerPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -76,7 +76,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *IpamsvcServer_Post.Id).Execute() + httpRes, err := apiClient.ServerAPI.ServerDelete(context.Background(), *IpamsvcServerPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -109,7 +109,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServer_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServerPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadServerResponse{} @@ -123,7 +123,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *IpamsvcServer_Post.Id).Execute() + resp, httpRes, err := apiClient.ServerAPI.ServerRead(context.Background(), *IpamsvcServerPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -133,12 +133,12 @@ func Test_ipam_ServerAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServer_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/dhcp/server/"+*IpamsvcServerPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcServer assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcServer_Patch, reqBody) + assert.Equal(t, IpamsvcServerPatch, reqBody) response := openapiclient.IpamsvcUpdateServerResponse{} body, err := json.Marshal(response) @@ -151,7 +151,7 @@ func Test_ipam_ServerAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *IpamsvcServer_Patch.Id).Body(IpamsvcServer_Patch).Execute() + resp, httpRes, err := apiClient.ServerAPI.ServerUpdate(context.Background(), *IpamsvcServerPatch.Id).Body(IpamsvcServerPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/ipam/test/api_subnet_test.go b/ipam/test/api_subnet_test.go index e4edd19..a7e6f82 100644 --- a/ipam/test/api_subnet_test.go +++ b/ipam/test/api_subnet_test.go @@ -24,30 +24,30 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/ipam" ) -var IpamsvcCopySubnet_Post = openapiclient.IpamsvcCopySubnet{ +var IpamsvcCopySubnetPost = openapiclient.IpamsvcCopySubnet{ Id: openapiclient.PtrString("Test Copy"), } -var IpamsvcSubnet_Post = openapiclient.IpamsvcSubnet{ +var IpamsvcSubnetPost = openapiclient.IpamsvcSubnet{ Id: openapiclient.PtrString("Test Post"), Tags: make(map[string]interface{}), } -var IpamsvcSubnet_Patch = openapiclient.IpamsvcSubnet{ +var IpamsvcSubnetPatch = openapiclient.IpamsvcSubnet{ Id: openapiclient.PtrString("Test Patch"), Tags: make(map[string]interface{}), } -func Test_ipam_SubnetAPIService(t *testing.T) { +func TestSubnetAPIService(t *testing.T) { t.Run("Test SubnetAPIService SubnetCopy", func(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcCopySubnet_Post.Id+"/copy", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcCopySubnetPost.Id+"/copy", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcCopySubnet assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcCopySubnet_Post, reqBody) + assert.Equal(t, IpamsvcCopySubnetPost, reqBody) response := openapiclient.IpamsvcCopySubnetResponse{} body, err := json.Marshal(response) @@ -60,7 +60,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), *IpamsvcCopySubnet_Post.Id).Body(IpamsvcCopySubnet_Post).Execute() + resp, httpRes, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), *IpamsvcCopySubnetPost.Id).Body(IpamsvcCopySubnetPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -75,7 +75,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { var reqBody openapiclient.IpamsvcSubnet assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcSubnet_Post, reqBody) + assert.Equal(t, IpamsvcSubnetPost, reqBody) response := openapiclient.IpamsvcCreateSubnetResponse{} body, err := json.Marshal(response) @@ -88,7 +88,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(IpamsvcSubnet_Post).Execute() + resp, httpRes, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(IpamsvcSubnetPost).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -98,7 +98,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPost, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnetPost.Id+"/nextavailableip", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcCreateNextAvailableIPResponse{} @@ -112,7 +112,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + resp, httpRes, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), *IpamsvcSubnetPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -122,7 +122,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnetPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -131,7 +131,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + httpRes, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), *IpamsvcSubnetPost.Id).Execute() require.NoError(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -164,7 +164,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id+"/nextavailableip", req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnetPost.Id+"/nextavailableip", req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcNextAvailableIPResponse{} @@ -178,7 +178,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + resp, httpRes, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), *IpamsvcSubnetPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -188,7 +188,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnetPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.IpamsvcReadSubnetResponse{} @@ -202,7 +202,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.SubnetAPI.SubnetRead(context.Background(), *IpamsvcSubnet_Post.Id).Execute() + resp, httpRes, err := apiClient.SubnetAPI.SubnetRead(context.Background(), *IpamsvcSubnetPost.Id).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -212,12 +212,12 @@ func Test_ipam_SubnetAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnet_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/ipam/subnet/"+*IpamsvcSubnetPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcSubnet assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcSubnet_Patch, reqBody) + assert.Equal(t, IpamsvcSubnetPatch, reqBody) response := openapiclient.IpamsvcUpdateSubnetResponse{} body, err := json.Marshal(response) @@ -230,7 +230,7 @@ func Test_ipam_SubnetAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), *IpamsvcSubnet_Patch.Id).Body(IpamsvcSubnet_Patch).Execute() + resp, httpRes, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), *IpamsvcSubnetPatch.Id).Body(IpamsvcSubnetPatch).Execute() require.NoError(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/keys/test/api_generate_tsig_test.go b/keys/test/api_generate_tsig_test.go index 5b5d0c3..e082806 100644 --- a/keys/test/api_generate_tsig_test.go +++ b/keys/test/api_generate_tsig_test.go @@ -5,8 +5,6 @@ Testing GenerateTsigAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package keys_test import ( @@ -23,7 +21,7 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -func Test_keys_GenerateTsigAPIService(t *testing.T) { +func TestGenerateTsigAPIService(t *testing.T) { t.Run("Test GenerateTsigAPIService GenerateTsigGenerateTSIG", func(t *testing.T) { configuration := internal.NewConfiguration() diff --git a/keys/test/api_kerberos_test.go b/keys/test/api_kerberos_test.go index 240fe01..e76bb8e 100644 --- a/keys/test/api_kerberos_test.go +++ b/keys/test/api_kerberos_test.go @@ -5,8 +5,6 @@ Testing KerberosAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package keys_test import ( @@ -23,20 +21,20 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -var KerberosKey_Patch = openapiclient.KerberosKey{ +var KerberosKeyPatch = openapiclient.KerberosKey{ Id: openapiclient.PtrString("KerberosKeyPost"), } -var KerberosKey_Post = openapiclient.KerberosKey{ +var KerberosKeyPost = openapiclient.KerberosKey{ Id: openapiclient.PtrString("KerberosKeyPatch"), } -func Test_keys_KerberosAPIService(t *testing.T) { +func TestKerberosAPIService(t *testing.T) { t.Run("Test KerberosAPIService KerberosDelete", func(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKeyPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -45,7 +43,7 @@ func Test_keys_KerberosAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), *KerberosKey_Post.Id).Execute() + httpRes, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), *KerberosKeyPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -78,7 +76,7 @@ func Test_keys_KerberosAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKeyPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.KeysReadKerberosKeyResponse{} @@ -92,7 +90,7 @@ func Test_keys_KerberosAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), *KerberosKey_Post.Id).Execute() + resp, httpRes, err := apiClient.KerberosAPI.KerberosRead(context.Background(), *KerberosKeyPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -102,12 +100,12 @@ func Test_keys_KerberosAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKey_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/keys/kerberos/"+*KerberosKeyPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) var reqBody openapiclient.KerberosKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, KerberosKey_Patch, reqBody) + require.Equal(t, KerberosKeyPatch, reqBody) response := openapiclient.KeysUpdateKerberosKeyResponse{} body, err := json.Marshal(response) @@ -120,7 +118,7 @@ func Test_keys_KerberosAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), *KerberosKey_Patch.Id).Body(KerberosKey_Patch).Execute() + resp, httpRes, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), *KerberosKeyPatch.Id).Body(KerberosKeyPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -135,7 +133,7 @@ func Test_keys_KerberosAPIService(t *testing.T) { var reqBody openapiclient.KerberosKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, KerberosKey_Post, reqBody) + require.Equal(t, KerberosKeyPost, reqBody) response := openapiclient.KeysListKerberosKeyResponse{} body, err := json.Marshal(response) @@ -148,7 +146,7 @@ func Test_keys_KerberosAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(KerberosKey_Post).Execute() + resp, httpRes, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(KerberosKeyPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/keys/test/api_tsig_test.go b/keys/test/api_tsig_test.go index 6c1c62e..e5acadf 100644 --- a/keys/test/api_tsig_test.go +++ b/keys/test/api_tsig_test.go @@ -5,8 +5,6 @@ Testing TsigAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package keys_test import ( @@ -23,16 +21,16 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -var KeysTSIGKey_Post = openapiclient.KeysTSIGKey{ +var KeysTSIGKeyPost = openapiclient.KeysTSIGKey{ Id: openapiclient.PtrString("KeysTsigPost"), Tags: make(map[string]interface{}), } -var KeysTSIGKey_Patch = openapiclient.KeysTSIGKey{ +var KeysTSIGKeyPatch = openapiclient.KeysTSIGKey{ Id: openapiclient.PtrString("KeysTsigPatch"), Tags: make(map[string]interface{}), } -func Test_keys_TsigAPIService(t *testing.T) { +func TestTsigAPIService(t *testing.T) { t.Run("Test TsigAPIService TsigCreate", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -43,7 +41,7 @@ func Test_keys_TsigAPIService(t *testing.T) { var reqBody openapiclient.KeysTSIGKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, KeysTSIGKey_Post, reqBody) + require.Equal(t, KeysTSIGKeyPost, reqBody) response := openapiclient.KeysCreateTSIGKeyResponse{} body, err := json.Marshal(response) @@ -56,7 +54,7 @@ func Test_keys_TsigAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(KeysTSIGKey_Post).Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(KeysTSIGKeyPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -66,7 +64,7 @@ func Test_keys_TsigAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodDelete, req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKeyPost.Id, req.URL.Path) return &http.Response{ StatusCode: http.StatusOK, @@ -75,7 +73,7 @@ func Test_keys_TsigAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), *KeysTSIGKey_Post.Id).Execute() + httpRes, err := apiClient.TsigAPI.TsigDelete(context.Background(), *KeysTSIGKeyPost.Id).Execute() require.Nil(t, err) require.Equal(t, http.StatusOK, httpRes.StatusCode) }) @@ -108,7 +106,7 @@ func Test_keys_TsigAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodGet, req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Post.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKeyPost.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Accept")) response := openapiclient.KeysReadTSIGKeyResponse{} @@ -122,7 +120,7 @@ func Test_keys_TsigAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), *KeysTSIGKey_Post.Id).Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigRead(context.Background(), *KeysTSIGKeyPost.Id).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) @@ -132,12 +130,12 @@ func Test_keys_TsigAPIService(t *testing.T) { configuration := internal.NewConfiguration() configuration.HTTPClient = internal.NewTestClient(func(req *http.Request) *http.Response { require.Equal(t, http.MethodPatch, req.Method) - require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKey_Patch.Id, req.URL.Path) + require.Equal(t, "/api/ddi/v1/keys/tsig/"+*KeysTSIGKeyPatch.Id, req.URL.Path) require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.KeysTSIGKey require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, KeysTSIGKey_Patch, reqBody) + require.Equal(t, KeysTSIGKeyPatch, reqBody) response := openapiclient.KeysUpdateTSIGKeyResponse{} body, err := json.Marshal(response) @@ -150,7 +148,7 @@ func Test_keys_TsigAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.TsigAPI.TsigUpdate(context.Background(), *KeysTSIGKey_Patch.Id).Body(KeysTSIGKey_Patch).Execute() + resp, httpRes, err := apiClient.TsigAPI.TsigUpdate(context.Background(), *KeysTSIGKeyPatch.Id).Body(KeysTSIGKeyPatch).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) diff --git a/keys/test/api_upload_test.go b/keys/test/api_upload_test.go index 1542999..d5449b7 100644 --- a/keys/test/api_upload_test.go +++ b/keys/test/api_upload_test.go @@ -5,8 +5,6 @@ Testing UploadAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package keys_test import ( @@ -23,14 +21,14 @@ import ( openapiclient "github.com/infobloxopen/bloxone-go-client/keys" ) -var UploadRequest_Post = openapiclient.UploadRequest{ +var UploadRequestPost = openapiclient.UploadRequest{ Comment: openapiclient.PtrString("Upload Request"), Content: "SGVsbG8gd29ybGQ=", // "Hello world" in base64 Type: openapiclient.UPLOADCONTENTTYPE_KEYTAB, // Replace "your_content_type" with the actual content type Tags: make(map[string]interface{}), } -func Test_keys_UploadAPIService(t *testing.T) { +func TestUploadAPIService(t *testing.T) { t.Run("Test UploadAPIService UploadUpload", func(t *testing.T) { configuration := internal.NewConfiguration() @@ -41,7 +39,7 @@ func Test_keys_UploadAPIService(t *testing.T) { var reqBody openapiclient.UploadRequest require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - require.Equal(t, UploadRequest_Post, reqBody) + require.Equal(t, UploadRequestPost, reqBody) response := openapiclient.DdiuploadResponse{} body, err := json.Marshal(response) @@ -54,7 +52,7 @@ func Test_keys_UploadAPIService(t *testing.T) { } }) apiClient := openapiclient.NewAPIClient(configuration) - resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(UploadRequest_Post).Execute() + resp, httpRes, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(UploadRequestPost).Execute() require.Nil(t, err) require.NotNil(t, resp) require.Equal(t, http.StatusOK, httpRes.StatusCode) From 4e63706afe0488d79746414fc6af0a69499554c2 Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Mon, 4 Mar 2024 15:20:14 -0800 Subject: [PATCH 17/18] Complete unit tests for dns_data, dns_config, ipam/dhcp, infra_mgmt and keys modules: 1. Removed the first line in test 2. Updated test object name to camel case --- dns_config/test/api_auth_zone_test.go | 2 +- dns_data/test/api_record_test.go | 2 - infra_mgmt/test/api_detail_test.go | 52 --------- infra_mgmt/test/api_hosts_test.go | 146 -------------------------- infra_mgmt/test/api_services_test.go | 105 ------------------ ipam/test/api_ipam_host_test.go | 17 ++- 6 files changed, 9 insertions(+), 315 deletions(-) delete mode 100644 infra_mgmt/test/api_detail_test.go delete mode 100644 infra_mgmt/test/api_hosts_test.go delete mode 100644 infra_mgmt/test/api_services_test.go diff --git a/dns_config/test/api_auth_zone_test.go b/dns_config/test/api_auth_zone_test.go index 22ec8a1..28d3a1d 100644 --- a/dns_config/test/api_auth_zone_test.go +++ b/dns_config/test/api_auth_zone_test.go @@ -22,7 +22,7 @@ import ( ) var ConfigCopyAuthZonePost = openapiclient.ConfigCopyAuthZone{ - Comment: openapiclient.PtrString("This is a copyping AuthZone for testing."), + Comment: openapiclient.PtrString("This is a copy AuthZone for testing."), Id: openapiclient.PtrString("dummyAuthZoneId"), } var ConfigAuthZonePost = openapiclient.ConfigAuthZone{ diff --git a/dns_data/test/api_record_test.go b/dns_data/test/api_record_test.go index 0cd9a89..20e2a41 100644 --- a/dns_data/test/api_record_test.go +++ b/dns_data/test/api_record_test.go @@ -5,8 +5,6 @@ Testing RecordAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package dns_data_test import ( diff --git a/infra_mgmt/test/api_detail_test.go b/infra_mgmt/test/api_detail_test.go deleted file mode 100644 index c78318d..0000000 --- a/infra_mgmt/test/api_detail_test.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Infrastructure Management API - -Testing DetailAPIService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package infra_mgmt - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/infra_mgmt" - "github.com/infobloxopen/bloxone-go-client/internal" -) - -func Test_infra_mgmt_DetailAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DetailAPIService DetailHostsList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DetailAPI.DetailHostsList(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DetailAPIService DetailServicesList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DetailAPI.DetailServicesList(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/infra_mgmt/test/api_hosts_test.go b/infra_mgmt/test/api_hosts_test.go deleted file mode 100644 index f215a66..0000000 --- a/infra_mgmt/test/api_hosts_test.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Infrastructure Management API - -Testing HostsAPIService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package infra_mgmt - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/infra_mgmt" - "github.com/infobloxopen/bloxone-go-client/internal" -) - -func Test_infra_mgmt_HostsAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test HostsAPIService HostsAssignTags", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.HostsAPI.HostsAssignTags(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.HostsAPI.HostsCreate(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.HostsAPI.HostsDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsDisconnect", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HostsAPI.HostsDisconnect(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.HostsAPI.HostsList(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HostsAPI.HostsRead(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsReplace", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var fromResourceId string - var toResourceId string - - resp, httpRes, err := apiClient.HostsAPI.HostsReplace(context.Background(), fromResourceId, toResourceId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsUnassignTags", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.HostsAPI.HostsUnassignTags(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HostsAPIService HostsUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.HostsAPI.HostsUpdate(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/infra_mgmt/test/api_services_test.go b/infra_mgmt/test/api_services_test.go deleted file mode 100644 index 1fff76e..0000000 --- a/infra_mgmt/test/api_services_test.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -Infrastructure Management API - -Testing ServicesAPIService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package infra_mgmt - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - openapiclient "github.com/infobloxopen/bloxone-go-client/infra_mgmt" - "github.com/infobloxopen/bloxone-go-client/internal" -) - -func Test_infra_mgmt_ServicesAPIService(t *testing.T) { - - configuration := internal.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ServicesAPIService ServicesApplications", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ServicesAPI.ServicesApplications(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServicesAPIService ServicesCreate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ServicesAPI.ServicesCreate(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServicesAPIService ServicesDelete", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - httpRes, err := apiClient.ServicesAPI.ServicesDelete(context.Background(), id).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServicesAPIService ServicesList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ServicesAPI.ServicesList(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServicesAPIService ServicesRead", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServicesAPI.ServicesRead(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServicesAPIService ServicesUpdate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var id string - - resp, httpRes, err := apiClient.ServicesAPI.ServicesUpdate(context.Background(), id).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/ipam/test/api_ipam_host_test.go b/ipam/test/api_ipam_host_test.go index abb6894..2dd7644 100644 --- a/ipam/test/api_ipam_host_test.go +++ b/ipam/test/api_ipam_host_test.go @@ -13,7 +13,6 @@ import ( "bytes" "context" "encoding/json" - "github.com/stretchr/testify/assert" "io" "net/http" "testing" @@ -43,12 +42,12 @@ func TestIpamHostAPIService(t *testing.T) { require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcIpamHost - assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcIpamHostPost, reqBody) + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, IpamsvcIpamHostPost, reqBody) response := openapiclient.IpamsvcCreateIpamHostResponse{} body, err := json.Marshal(response) - assert.NoError(t, err) + require.NoError(t, err) return &http.Response{ StatusCode: http.StatusOK, @@ -90,7 +89,7 @@ func TestIpamHostAPIService(t *testing.T) { response := openapiclient.IpamsvcListIpamHostResponse{} body, err := json.Marshal(response) - assert.NoError(t, err) + require.NoError(t, err) return &http.Response{ StatusCode: http.StatusOK, @@ -114,7 +113,7 @@ func TestIpamHostAPIService(t *testing.T) { response := openapiclient.IpamsvcReadIpamHostResponse{} body, err := json.Marshal(response) - assert.NoError(t, err) + require.NoError(t, err) return &http.Response{ StatusCode: http.StatusOK, @@ -137,12 +136,12 @@ func TestIpamHostAPIService(t *testing.T) { require.Equal(t, "application/json", req.Header.Get("Content-Type")) var reqBody openapiclient.IpamsvcIpamHost - assert.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) - assert.Equal(t, IpamsvcIpamHostPatch, reqBody) + require.NoError(t, json.NewDecoder(req.Body).Decode(&reqBody)) + require.Equal(t, IpamsvcIpamHostPatch, reqBody) response := openapiclient.IpamsvcUpdateIpamHostResponse{} body, err := json.Marshal(response) - assert.NoError(t, err) + require.NoError(t, err) return &http.Response{ StatusCode: http.StatusOK, From 384a5f3e3b02f4f6f63dfd6cfd742b5378f602eb Mon Sep 17 00:00:00 2001 From: Min Jiang Date: Mon, 4 Mar 2024 19:08:54 -0800 Subject: [PATCH 18/18] Complete unit tests for dns_data, dns_config, ipam/dhcp, infra_mgmt and keys modules: 1. Removed the first line in test 2. Updated test object name to camel case --- ipam/test/api_address_block_test.go | 2 -- ipam/test/api_address_test.go | 2 -- ipam/test/api_asm_test.go | 2 -- ipam/test/api_dhcp_host_test.go | 2 -- ipam/test/api_dns_usage_test.go | 2 -- ipam/test/api_filter_test.go | 2 -- ipam/test/api_fixed_address_test.go | 2 -- ipam/test/api_global_test.go | 2 -- ipam/test/api_ha_group_test.go | 2 -- ipam/test/api_hardware_filter_test.go | 2 -- ipam/test/api_ip_space_test.go | 2 -- ipam/test/api_ipam_host_test.go | 2 -- ipam/test/api_leases_command_test.go | 2 -- ipam/test/api_option_code_test.go | 2 -- ipam/test/api_option_filter_test.go | 2 -- ipam/test/api_option_group_test.go | 2 -- ipam/test/api_option_space_test.go | 2 -- ipam/test/api_range_test.go | 2 -- ipam/test/api_server_test.go | 2 -- ipam/test/api_subnet_test.go | 2 -- 20 files changed, 40 deletions(-) diff --git a/ipam/test/api_address_block_test.go b/ipam/test/api_address_block_test.go index d96a4b7..e6fbd86 100644 --- a/ipam/test/api_address_block_test.go +++ b/ipam/test/api_address_block_test.go @@ -5,8 +5,6 @@ Testing AddressBlockAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_address_test.go b/ipam/test/api_address_test.go index ce3b7d5..66382d6 100644 --- a/ipam/test/api_address_test.go +++ b/ipam/test/api_address_test.go @@ -5,8 +5,6 @@ Testing AddressAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_asm_test.go b/ipam/test/api_asm_test.go index daedbeb..63e4f1d 100644 --- a/ipam/test/api_asm_test.go +++ b/ipam/test/api_asm_test.go @@ -5,8 +5,6 @@ Testing AsmAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_dhcp_host_test.go b/ipam/test/api_dhcp_host_test.go index 7111c1a..5c294a2 100644 --- a/ipam/test/api_dhcp_host_test.go +++ b/ipam/test/api_dhcp_host_test.go @@ -5,8 +5,6 @@ Testing DhcpHostAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_dns_usage_test.go b/ipam/test/api_dns_usage_test.go index 4f9af8f..18ec09d 100644 --- a/ipam/test/api_dns_usage_test.go +++ b/ipam/test/api_dns_usage_test.go @@ -5,8 +5,6 @@ Testing DnsUsageAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_filter_test.go b/ipam/test/api_filter_test.go index 4e2971b..865bb48 100644 --- a/ipam/test/api_filter_test.go +++ b/ipam/test/api_filter_test.go @@ -5,8 +5,6 @@ Testing FilterAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_fixed_address_test.go b/ipam/test/api_fixed_address_test.go index a4ddece..a344827 100644 --- a/ipam/test/api_fixed_address_test.go +++ b/ipam/test/api_fixed_address_test.go @@ -5,8 +5,6 @@ Testing FixedAddressAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_global_test.go b/ipam/test/api_global_test.go index fee9f16..636e97c 100644 --- a/ipam/test/api_global_test.go +++ b/ipam/test/api_global_test.go @@ -5,8 +5,6 @@ Testing GlobalAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_ha_group_test.go b/ipam/test/api_ha_group_test.go index f242991..5ead8ec 100644 --- a/ipam/test/api_ha_group_test.go +++ b/ipam/test/api_ha_group_test.go @@ -5,8 +5,6 @@ Testing HaGroupAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_hardware_filter_test.go b/ipam/test/api_hardware_filter_test.go index ff91d14..ffbf7d5 100644 --- a/ipam/test/api_hardware_filter_test.go +++ b/ipam/test/api_hardware_filter_test.go @@ -5,8 +5,6 @@ Testing HardwareFilterAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_ip_space_test.go b/ipam/test/api_ip_space_test.go index 1e2d7d6..972ad70 100644 --- a/ipam/test/api_ip_space_test.go +++ b/ipam/test/api_ip_space_test.go @@ -5,8 +5,6 @@ Testing IpSpaceAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_ipam_host_test.go b/ipam/test/api_ipam_host_test.go index 2dd7644..319c6ec 100644 --- a/ipam/test/api_ipam_host_test.go +++ b/ipam/test/api_ipam_host_test.go @@ -5,8 +5,6 @@ Testing IpamHostAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_leases_command_test.go b/ipam/test/api_leases_command_test.go index 55d80c5..29181b0 100644 --- a/ipam/test/api_leases_command_test.go +++ b/ipam/test/api_leases_command_test.go @@ -5,8 +5,6 @@ Testing LeasesCommandAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_option_code_test.go b/ipam/test/api_option_code_test.go index dfcec0a..a58c9e5 100644 --- a/ipam/test/api_option_code_test.go +++ b/ipam/test/api_option_code_test.go @@ -5,8 +5,6 @@ Testing OptionCodeAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_option_filter_test.go b/ipam/test/api_option_filter_test.go index 99b119f..1ee0b60 100644 --- a/ipam/test/api_option_filter_test.go +++ b/ipam/test/api_option_filter_test.go @@ -5,8 +5,6 @@ Testing OptionFilterAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_option_group_test.go b/ipam/test/api_option_group_test.go index 6fa9f01..e3bd9b2 100644 --- a/ipam/test/api_option_group_test.go +++ b/ipam/test/api_option_group_test.go @@ -5,8 +5,6 @@ Testing OptionGroupAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_option_space_test.go b/ipam/test/api_option_space_test.go index 86dfbc5..2a8e1dd 100644 --- a/ipam/test/api_option_space_test.go +++ b/ipam/test/api_option_space_test.go @@ -5,8 +5,6 @@ Testing OptionSpaceAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_range_test.go b/ipam/test/api_range_test.go index d8c5fa5..f5ba4cc 100644 --- a/ipam/test/api_range_test.go +++ b/ipam/test/api_range_test.go @@ -5,8 +5,6 @@ Testing RangeAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_server_test.go b/ipam/test/api_server_test.go index 6d0e212..dbea89e 100644 --- a/ipam/test/api_server_test.go +++ b/ipam/test/api_server_test.go @@ -5,8 +5,6 @@ Testing ServerAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import ( diff --git a/ipam/test/api_subnet_test.go b/ipam/test/api_subnet_test.go index a7e6f82..821432c 100644 --- a/ipam/test/api_subnet_test.go +++ b/ipam/test/api_subnet_test.go @@ -5,8 +5,6 @@ Testing SubnetAPIService */ -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - package ipam_test import (