diff --git a/client/configuration.go b/client/configuration.go index f2e404d..1cfd2dc 100644 --- a/client/configuration.go +++ b/client/configuration.go @@ -18,11 +18,10 @@ const ( HeaderClient = "x-infoblox-client" HeaderSDK = "x-infoblox-sdk" HeaderAuthorization = "Authorization" + version = "0.1" + sdkIdentifier = "golang-sdk" ) -const version = "0.1" -const sdkIdentifier = "golang-sdk" - // Configuration stores the configuration of the API client type Configuration struct { // ClientName is the name of the client using the SDK. @@ -43,6 +42,10 @@ type Configuration struct { // HTTPClient to use for the SDK. // Optional. The default HTTPClient will be used if not provided. HTTPClient *http.Client + + // Default tags the client can set for objects that has tags support. + // Optional. The default is an empty map. + DefaultTags map[string]string } func (c Configuration) internal(basePath string) (*internal.Configuration, error) { @@ -83,12 +86,15 @@ func (c Configuration) internal(basePath string) (*internal.Configuration, error userAgent := fmt.Sprintf("bloxone-%s/%s", sdkIdentifier, version) - return &internal.Configuration{ + ic := &internal.Configuration{ DefaultHeader: defaultHeaders, UserAgent: userAgent, Debug: false, OperationServers: nil, Servers: []internal.ServerConfiguration{{URL: cspURL}}, HTTPClient: httpClient, - }, nil + DefaultTags: c.DefaultTags, + } + + return ic, nil } diff --git a/client/configuration_test.go b/client/configuration_test.go new file mode 100644 index 0000000..8b4d54a --- /dev/null +++ b/client/configuration_test.go @@ -0,0 +1,130 @@ +package client + +import ( + "fmt" + "net/http" + "os" + "reflect" + "testing" + + "github.com/infobloxopen/bloxone-go-client/internal" +) + +func TestConfiguration_internal(t *testing.T) { + type fields struct { + ClientName string + CSPURL string + APIKey string + HTTPClient *http.Client + DefaultTags map[string]string + } + type args struct { + basePath string + } + tests := []struct { + name string + fields fields + args args + want *internal.Configuration + wantErr bool + }{ + { + "empty API key", + fields{ + APIKey: "", + }, + args{basePath: ""}, + nil, + true, + }, + {"empty clientName", + fields{ + ClientName: "", + }, + args{basePath: ""}, + nil, + true, + }, + { + "empty DefaultTags", + fields{ + ClientName: "terraform/v1.1#yug278872h", + APIKey: "12323455", + }, + args{basePath: ""}, + &internal.Configuration{ + DefaultHeader: map[string]string{ + HeaderAuthorization: "Token 12323455", + HeaderClient: "terraform/v1.1#yug278872h", + HeaderSDK: sdkIdentifier, + }, + Debug: false, + UserAgent: fmt.Sprintf("bloxone-%s/%s", sdkIdentifier, version), + Servers: []internal.ServerConfiguration{{URL: "https://csp.infoblox.com"}}, + HTTPClient: http.DefaultClient, + DefaultTags: nil, + }, + false, + }, + { + "DefaultTags provided", + fields{ + CSPURL: "https://stage.csp.infoblox.com", + ClientName: "terraformv1.1#yug278872h", + APIKey: "12323455", + DefaultTags: map[string]string{ + "site": "A", + "env": "test", + }, + }, + args{basePath: ""}, + &internal.Configuration{ + DefaultHeader: map[string]string{ + HeaderAuthorization: "Token 12323455", + HeaderClient: "terraformv1.1#yug278872h", + HeaderSDK: sdkIdentifier, + }, + Debug: false, + UserAgent: fmt.Sprintf("bloxone-%s/%s", sdkIdentifier, version), + Servers: []internal.ServerConfiguration{{URL: "https://stage.csp.infoblox.com"}}, + HTTPClient: http.DefaultClient, + DefaultTags: map[string]string{ + "site": "A", + "env": "test", + }, + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var curEnvVal string + c := Configuration{ + ClientName: tt.fields.ClientName, + CSPURL: tt.fields.CSPURL, + APIKey: tt.fields.APIKey, + HTTPClient: tt.fields.HTTPClient, + DefaultTags: tt.fields.DefaultTags, + } + if c.CSPURL != "" { + curEnvVal = os.Getenv(ENVBloxOneCSPURL) + t.Setenv(ENVBloxOneCSPURL, c.CSPURL) + } + + got, err := c.internal(tt.args.basePath) + if (err != nil) != tt.wantErr { + t.Errorf("internal() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("internal() got = %v, want %v", got, tt.want) + } + t.Cleanup(func() { + // Set it to the value prior to executing the test + if c.CSPURL != "" { + t.Setenv(ENVBloxOneCSPURL, curEnvVal) + } + }) + }) + } +} diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index 9a00650..d6a4f4d 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..5d80d1e 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..b95b1b9 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..8e9cc7b 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..5e51dc5 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..31b6ffc 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..78eeceb 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.GetDefaultTags() { + 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..d1a985f 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..0155963 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..7118450 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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_data/api_record.go b/dns_data/api_record.go index 844179e..ce669d7 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..e7e4f92 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..0fcfc0a 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..6b62640 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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/internal/configuration.go b/internal/configuration.go index 2a34dce..6270583 100644 --- a/internal/configuration.go +++ b/internal/configuration.go @@ -73,6 +73,7 @@ type Configuration struct { Servers ServerConfigurations OperationServers map[string]ServerConfigurations HTTPClient *http.Client + DefaultTags map[string]string } // NewConfiguration returns a new Configuration object @@ -89,6 +90,7 @@ func NewConfiguration() *Configuration { }, }, OperationServers: map[string]ServerConfigurations{}, + DefaultTags: make(map[string]string), } return cfg } @@ -98,6 +100,10 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } +func (c *Configuration) GetDefaultTags() map[string]string { + return c.DefaultTags +} + // URL formats template on a index using given variables func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { if index < 0 || len(sc) <= index { diff --git a/ipam/api_address.go b/ipam/api_address.go index 6dd7836..ee54861 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..6e8ecc2 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..c380680 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.GetDefaultTags() { + 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..80c6d36 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..ef87672 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.GetDefaultTags() { + 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..3779ebd 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..290da0b 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..6100f40 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..30675dd 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..a8ae748 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..10673fc 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..92712fe 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..f51df8d 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..9913cde 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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/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..c735519 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.GetDefaultTags() { + 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.GetDefaultTags() { + 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..c933ccb 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.GetDefaultTags() { + 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 }