From 9ec26cd4a0921f00a95ded3862011f5564c4e208 Mon Sep 17 00:00:00 2001 From: Venkat Venkatasubramanian Date: Thu, 25 Jan 2024 15:53:34 -0800 Subject: [PATCH] generator changes and support for custom tags --- client/configuration.go | 43 ++-- client/configuration_test.go | 120 +++++++++++ dns_config/.openapi-generator/VERSION | 2 +- dns_config/README.md | 10 +- dns_config/api_acl.go | 77 +++---- dns_config/api_auth_nsg.go | 77 +++---- dns_config/api_auth_zone.go | 126 ++++++++---- dns_config/api_cache_flush.go | 9 +- dns_config/api_convert_domain_name.go | 11 +- dns_config/api_convert_rname.go | 11 +- dns_config/api_delegation.go | 77 +++---- dns_config/api_forward_nsg.go | 77 +++---- dns_config/api_forward_zone.go | 86 ++++---- dns_config/api_global.go | 44 ++-- dns_config/api_host.go | 83 +++++--- dns_config/api_lbdn.go | 77 +++---- dns_config/api_server.go | 117 +++++++---- dns_config/api_view.go | 126 ++++++++---- dns_config/client.go | 34 +-- dns_config/docs/AuthZoneAPI.md | 24 ++- dns_config/docs/ConfigInheritedACLItems.md | 2 +- .../docs/ConfigInheritedCustomRootNSBlock.md | 2 +- .../ConfigInheritedDNSSECValidationBlock.md | 2 +- dns_config/docs/ConfigInheritedECSBlock.md | 2 +- .../docs/ConfigInheritedForwardersBlock.md | 2 +- .../docs/ConfigInheritedKerberosKeys.md | 2 +- .../docs/ConfigInheritedSortListItems.md | 2 +- .../ConfigInheritedZoneAuthorityMNameBlock.md | 2 +- dns_config/docs/HostAPI.md | 18 +- dns_config/docs/Inheritance2InheritedBool.md | 2 +- .../docs/Inheritance2InheritedString.md | 2 +- .../docs/Inheritance2InheritedUInt32.md | 2 +- dns_config/docs/ServerAPI.md | 24 ++- dns_config/docs/ViewAPI.md | 24 ++- dns_config/model_config_acl.go | 38 ++++ dns_config/model_config_acl_item.go | 39 ++++ dns_config/model_config_auth_nsg.go | 38 ++++ dns_config/model_config_bulk_copy_view.go | 39 ++++ dns_config/model_config_copy_auth_zone.go | 38 ++++ dns_config/model_config_copy_forward_zone.go | 38 ++++ dns_config/model_config_delegation_server.go | 38 ++++ dns_config/model_config_ecs_zone.go | 39 ++++ dns_config/model_config_external_primary.go | 38 ++++ dns_config/model_config_external_secondary.go | 39 ++++ dns_config/model_config_forward_nsg.go | 38 ++++ dns_config/model_config_forwarder.go | 39 ++++ dns_config/model_config_global.go | 38 ++++ dns_config/model_config_internal_secondary.go | 38 ++++ dns_config/model_config_kerberos_key.go | 38 ++++ dns_config/model_config_lbdn.go | 39 ++++ dns_config/model_config_root_ns.go | 39 ++++ dns_config/model_config_server.go | 38 ++++ dns_config/model_config_sort_list_item.go | 38 ++++ dns_config/model_config_trust_anchor.go | 40 ++++ dns_config/model_config_view.go | 38 ++++ dns_config/utils.go | 2 +- dns_data/.openapi-generator/VERSION | 2 +- dns_data/README.md | 10 +- dns_data/api_record.go | 128 ++++++++---- dns_data/client.go | 8 +- dns_data/docs/Inheritance2InheritedUInt32.md | 2 +- dns_data/docs/RecordAPI.md | 24 ++- dns_data/model_data_record.go | 38 ++++ dns_data/utils.go | 2 +- infra_mgmt/.openapi-generator/VERSION | 2 +- infra_mgmt/README.md | 10 +- infra_mgmt/api_detail.go | 42 ++-- infra_mgmt/api_hosts.go | 133 ++++++------ infra_mgmt/api_services.go | 84 ++++---- infra_mgmt/client.go | 12 +- infra_mgmt/model_infra_host.go | 38 ++++ infra_mgmt/model_infra_service.go | 40 ++++ infra_mgmt/utils.go | 2 +- infra_provision/.openapi-generator/VERSION | 2 +- infra_provision/README.md | 10 +- infra_provision/api_ui_join_token.go | 80 ++++---- infra_provision/api_uicsr.go | 63 +++--- infra_provision/client.go | 8 +- .../docs/HostactivationJoinToken.md | 9 +- infra_provision/docs/UIJoinTokenAPI.md | 4 +- .../model_hostactivation_join_token.go | 73 +++++-- internal/configuration.go | 30 ++- internal/configuration_test.go | 76 +++++++ ipam/.openapi-generator/VERSION | 2 +- ipam/README.md | 10 +- ipam/api_address.go | 77 +++---- ipam/api_address_block.go | 194 ++++++++++-------- ipam/api_asm.go | 33 ++- ipam/api_dhcp_host.go | 64 +++--- ipam/api_dns_usage.go | 34 ++- ipam/api_filter.go | 21 +- ipam/api_fixed_address.go | 117 +++++++---- ipam/api_global.go | 44 ++-- ipam/api_ha_group.go | 69 +++---- ipam/api_hardware_filter.go | 77 +++---- ipam/api_ip_space.go | 137 ++++++++----- ipam/api_ipam_host.go | 79 +++---- ipam/api_leases_command.go | 9 +- ipam/api_option_code.go | 61 +++--- ipam/api_option_filter.go | 77 +++---- ipam/api_option_group.go | 77 +++---- ipam/api_option_space.go | 77 +++---- ipam/api_range.go | 139 ++++++++----- ipam/api_server.go | 117 +++++++---- ipam/api_subnet.go | 150 ++++++++------ ipam/client.go | 44 ++-- ipam/docs/AddressBlockAPI.md | 24 ++- ipam/docs/FixedAddressAPI.md | 24 ++- ipam/docs/InheritanceInheritedBool.md | 2 +- ipam/docs/InheritanceInheritedFloat.md | 2 +- ipam/docs/InheritanceInheritedIdentifier.md | 2 +- ipam/docs/InheritanceInheritedString.md | 2 +- ipam/docs/InheritanceInheritedUInt32.md | 2 +- ipam/docs/InheritedDHCPConfigFilterList.md | 2 +- .../docs/InheritedDHCPConfigIgnoreItemList.md | 2 +- ipam/docs/IpSpaceAPI.md | 24 ++- ipam/docs/IpamsvcInheritedAsmEnableBlock.md | 2 +- ipam/docs/IpamsvcInheritedAsmGrowthBlock.md | 2 +- ipam/docs/IpamsvcInheritedDDNSBlock.md | 2 +- .../docs/IpamsvcInheritedDDNSHostnameBlock.md | 2 +- ipam/docs/IpamsvcInheritedDDNSUpdateBlock.md | 2 +- ipam/docs/IpamsvcInheritedDHCPOption.md | 2 +- .../IpamsvcInheritedHostnameRewriteBlock.md | 2 +- ipam/docs/IpamsvcRange.md | 9 +- ipam/docs/RangeAPI.md | 24 ++- ipam/docs/ServerAPI.md | 24 ++- ipam/docs/SubnetAPI.md | 24 ++- ipam/model_ipamsvc_access_filter.go | 38 ++++ ipam/model_ipamsvc_address.go | 38 ++++ ipam/model_ipamsvc_asm.go | 38 ++++ ipam/model_ipamsvc_bulk_copy_ip_space.go | 39 ++++ ipam/model_ipamsvc_copy_address_block.go | 38 ++++ ipam/model_ipamsvc_copy_ip_space.go | 38 ++++ ipam/model_ipamsvc_copy_subnet.go | 38 ++++ ipam/model_ipamsvc_ddns_zone.go | 38 ++++ ...odel_ipamsvc_dhcp_utilization_threshold.go | 40 ++++ ipam/model_ipamsvc_exclusion_range.go | 39 ++++ ipam/model_ipamsvc_fixed_address.go | 40 ++++ ipam/model_ipamsvc_ha_group.go | 39 ++++ ipam/model_ipamsvc_ha_group_host.go | 38 ++++ ipam/model_ipamsvc_hardware_filter.go | 38 ++++ ipam/model_ipamsvc_host_name.go | 39 ++++ ipam/model_ipamsvc_ignore_item.go | 39 ++++ ipam/model_ipamsvc_ip_space.go | 38 ++++ ipam/model_ipamsvc_ipam_host.go | 38 ++++ ipam/model_ipamsvc_kerberos_key.go | 38 ++++ ipam/model_ipamsvc_leases_command.go | 38 ++++ ipam/model_ipamsvc_name.go | 39 ++++ ipam/model_ipamsvc_option_code.go | 41 ++++ ipam/model_ipamsvc_option_filter.go | 39 ++++ ipam/model_ipamsvc_option_filter_rule.go | 39 ++++ ipam/model_ipamsvc_option_group.go | 38 ++++ ipam/model_ipamsvc_option_space.go | 38 ++++ ipam/model_ipamsvc_server.go | 38 ++++ ipam/model_ipamsvc_tsig_key.go | 38 ++++ ipam/model_ipamsvc_utilization_threshold.go | 40 ++++ keys/.openapi-generator/VERSION | 2 +- keys/README.md | 11 +- keys/api_generate_tsig.go | 9 +- keys/api_kerberos.go | 176 +++++++++++++--- keys/api_tsig.go | 77 +++---- keys/api_upload.go | 17 +- keys/client.go | 14 +- keys/docs/KerberosAPI.md | 65 ++++++ keys/model_keys_tsig_key.go | 39 ++++ keys/model_upload_request.go | 39 ++++ keys/utils.go | 2 +- 167 files changed, 4761 insertions(+), 1759 deletions(-) create mode 100644 client/configuration_test.go create mode 100644 internal/configuration_test.go diff --git a/client/configuration.go b/client/configuration.go index f2e404d..96ce333 100644 --- a/client/configuration.go +++ b/client/configuration.go @@ -5,7 +5,8 @@ import ( "fmt" "net/http" "os" - + "strings" + "github.com/infobloxopen/bloxone-go-client/internal" ) @@ -22,27 +23,31 @@ const ( const version = "0.1" const sdkIdentifier = "golang-sdk" +const clientIdentifier = "automation" // Configuration stores the configuration of the API client type Configuration struct { // ClientName is the name of the client using the SDK. // Required. ClientName string - + // CSPURL is the URL for BloxOne Cloud Services Portal. // Can also be configured using the `BLOXONE_CSP_URL` environment variable. // Optional. Default is https://csp.infoblox.com CSPURL string - + // APIKey for accessing the BloxOne API. // Can also be configured by using the `BLOXONE_API_KEY` environment variable. // https://docs.infoblox.com/space/BloxOneCloud/35430405/Configuring+User+API+Keys // Required. APIKey string - + // HTTPClient to use for the SDK. // Optional. The default HTTPClient will be used if not provided. HTTPClient *http.Client + + // Default global tags the client can set for all requests. + DefaultTags map[string]string } func (c Configuration) internal(basePath string) (*internal.Configuration, error) { @@ -54,7 +59,7 @@ func (c Configuration) internal(basePath string) (*internal.Configuration, error cspURL = c.CSPURL } cspURL = cspURL + basePath - + apiKey := "" if v, ok := os.LookupEnv(ENVBloxOneAPIKey); ok { apiKey = v @@ -65,30 +70,44 @@ func (c Configuration) internal(basePath string) (*internal.Configuration, error if len(apiKey) == 0 { return nil, errors.New("APIKey is required") } - + if len(c.ClientName) == 0 { return nil, errors.New("ClientName is required") } - + httpClient := c.HTTPClient if httpClient == nil { httpClient = http.DefaultClient } - + defaultHeaders := map[string]string{ HeaderAuthorization: "Token " + apiKey, HeaderClient: c.ClientName, HeaderSDK: sdkIdentifier, } - + 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: make(map[string]string), + } + // Add default tags set + if c.DefaultTags != nil { + ic.AddDefaultTags(c.DefaultTags) + } + + // setting up custom tag to identify the client + dfTags := make(map[string]string) + // Extract client from ClientName string + // Format: /version#commit + dfTags[clientIdentifier] = strings.Split(c.ClientName, "/")[0] + ic.AddDefaultTags(dfTags) + + return ic, nil } diff --git a/client/configuration_test.go b/client/configuration_test.go new file mode 100644 index 0000000..9624de3 --- /dev/null +++ b/client/configuration_test.go @@ -0,0 +1,120 @@ +package client + +import ( + "fmt" + "net/http" + "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: map[string]string{ + clientIdentifier: "terraform", + }, + }, + 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{ + clientIdentifier: "terraformv1.1#yug278872h", + "site": "A", + "env": "test", + }, + }, + false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := Configuration{ + ClientName: tt.fields.ClientName, + CSPURL: tt.fields.CSPURL, + APIKey: tt.fields.APIKey, + HTTPClient: tt.fields.HTTPClient, + DefaultTags: tt.fields.DefaultTags, + } + 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) + } + }) + } +} diff --git a/dns_config/.openapi-generator/VERSION b/dns_config/.openapi-generator/VERSION index 73a86b1..3769235 100644 --- a/dns_config/.openapi-generator/VERSION +++ b/dns_config/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/dns_config/README.md b/dns_config/README.md index 9289f28..72de352 100644 --- a/dns_config/README.md +++ b/dns_config/README.md @@ -38,7 +38,7 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_config.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), dns_config.ContextServerIndex, 1) @@ -46,7 +46,7 @@ ctx := context.WithValue(context.Background(), dns_config.ContextServerIndex, 1) ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_config.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), dns_config.ContextServerVariables, map[string]string{ @@ -60,7 +60,7 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_config.ContextOperationServerIndices` and `dns_config.ContextOperationServerVariables` context maps. ```golang ctx := context.WithValue(context.Background(), dns_config.ContextOperationServerIndices, map[string]int{ @@ -269,8 +269,8 @@ Example ```golang auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_config.ContextAPIKeys, + map[string]dns_config.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_config/api_acl.go b/dns_config/api_acl.go index 9a00650..4205842 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. @@ -125,8 +120,8 @@ AclCreate Create the ACL object. Use this method to create an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclCreateRequest */ func (a *AclAPIService) AclCreate(ctx context.Context) ApiAclCreateRequest { return ApiAclCreateRequest{ @@ -136,8 +131,7 @@ func (a *AclAPIService) AclCreate(ctx context.Context) ApiAclCreateRequest { } // Execute executes the request -// -// @return ConfigCreateACLResponse +// @return ConfigCreateACLResponse func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateACLResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *AclAPIService) AclCreateExecute(r ApiAclCreateRequest) (*ConfigCreateAC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ AclDelete Move the ACL object to Recyclebin. Use this method to move an ACL object to Recyclebin. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclDeleteRequest */ func (a *AclAPIService) AclDelete(ctx context.Context, id string) ApiAclDeleteRequest { return ApiAclDeleteRequest{ @@ -341,37 +342,37 @@ type ApiAclListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAclListRequest) Fields(fields string) ApiAclListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAclListRequest) Filter(filter string) ApiAclListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAclListRequest) Offset(offset int32) ApiAclListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAclListRequest) Limit(limit int32) ApiAclListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAclListRequest) PageToken(pageToken string) ApiAclListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAclListRequest) OrderBy(orderBy string) ApiAclListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ AclList List ACL objects. Use this method to list ACL objects. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAclListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAclListRequest */ func (a *AclAPIService) AclList(ctx context.Context) ApiAclListRequest { return ApiAclListRequest{ @@ -410,8 +411,7 @@ func (a *AclAPIService) AclList(ctx context.Context) ApiAclListRequest { } // Execute executes the request -// -// @return ConfigListACLResponse +// @return ConfigListACLResponse func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *AclAPIService) AclListExecute(r ApiAclListRequest) (*ConfigListACLRespo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiAclReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAclReadRequest) Fields(fields string) ApiAclReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ AclRead Read the ACL object. Use this method to read an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclReadRequest */ func (a *AclAPIService) AclRead(ctx context.Context, id string) ApiAclReadRequest { return ApiAclReadRequest{ @@ -553,8 +552,7 @@ func (a *AclAPIService) AclRead(ctx context.Context, id string) ApiAclReadReques } // Execute executes the request -// -// @return ConfigReadACLResponse +// @return ConfigReadACLResponse func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *AclAPIService) AclReadExecute(r ApiAclReadRequest) (*ConfigReadACLRespo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ AclUpdate Update the ACL object. Use this method to update an ACL object. ACL object (_dns/acl_) represents a named Access Control List. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAclUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAclUpdateRequest */ func (a *AclAPIService) AclUpdate(ctx context.Context, id string) ApiAclUpdateRequest { return ApiAclUpdateRequest{ @@ -675,8 +672,7 @@ func (a *AclAPIService) AclUpdate(ctx context.Context, id string) ApiAclUpdateRe } // Execute executes the request -// -// @return ConfigUpdateACLResponse +// @return ConfigUpdateACLResponse func (a *AclAPIService) AclUpdateExecute(r ApiAclUpdateRequest) (*ConfigUpdateACLResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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..162b6d1 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. @@ -125,8 +120,8 @@ AuthNsgCreate Create the AuthNSG object. Use this method to create an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgCreateRequest */ func (a *AuthNsgAPIService) AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateRequest { return ApiAuthNsgCreateRequest{ @@ -136,8 +131,7 @@ func (a *AuthNsgAPIService) AuthNsgCreate(ctx context.Context) ApiAuthNsgCreateR } // Execute executes the request -// -// @return ConfigCreateAuthNSGResponse +// @return ConfigCreateAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*ConfigCreateAuthNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *AuthNsgAPIService) AuthNsgCreateExecute(r ApiAuthNsgCreateRequest) (*Co newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ AuthNsgDelete Move the AuthNSG object to Recyclebin. Use this method to move an AuthNSG object to Recyclebin. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgDeleteRequest */ func (a *AuthNsgAPIService) AuthNsgDelete(ctx context.Context, id string) ApiAuthNsgDeleteRequest { return ApiAuthNsgDeleteRequest{ @@ -341,37 +342,37 @@ type ApiAuthNsgListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthNsgListRequest) Fields(fields string) ApiAuthNsgListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAuthNsgListRequest) Filter(filter string) ApiAuthNsgListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAuthNsgListRequest) Offset(offset int32) ApiAuthNsgListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAuthNsgListRequest) Limit(limit int32) ApiAuthNsgListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAuthNsgListRequest) PageToken(pageToken string) ApiAuthNsgListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAuthNsgListRequest) OrderBy(orderBy string) ApiAuthNsgListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ AuthNsgList List AuthNSG objects. Use this method to list AuthNSG objects. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthNsgListRequest */ func (a *AuthNsgAPIService) AuthNsgList(ctx context.Context) ApiAuthNsgListRequest { return ApiAuthNsgListRequest{ @@ -410,8 +411,7 @@ func (a *AuthNsgAPIService) AuthNsgList(ctx context.Context) ApiAuthNsgListReque } // Execute executes the request -// -// @return ConfigListAuthNSGResponse +// @return ConfigListAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*ConfigListAuthNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *AuthNsgAPIService) AuthNsgListExecute(r ApiAuthNsgListRequest) (*Config newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiAuthNsgReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthNsgReadRequest) Fields(fields string) ApiAuthNsgReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ AuthNsgRead Read the AuthNSG object. Use this method to read an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgReadRequest */ func (a *AuthNsgAPIService) AuthNsgRead(ctx context.Context, id string) ApiAuthNsgReadRequest { return ApiAuthNsgReadRequest{ @@ -553,8 +552,7 @@ func (a *AuthNsgAPIService) AuthNsgRead(ctx context.Context, id string) ApiAuthN } // Execute executes the request -// -// @return ConfigReadAuthNSGResponse +// @return ConfigReadAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*ConfigReadAuthNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *AuthNsgAPIService) AuthNsgReadExecute(r ApiAuthNsgReadRequest) (*Config newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ AuthNsgUpdate Update the AuthNSG object. Use this method to update an AuthNSG object. The _dns/auth_nsg_ object represents an Authoritative DNS Server Group for authoritative zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthNsgUpdateRequest */ func (a *AuthNsgAPIService) AuthNsgUpdate(ctx context.Context, id string) ApiAuthNsgUpdateRequest { return ApiAuthNsgUpdateRequest{ @@ -675,8 +672,7 @@ func (a *AuthNsgAPIService) AuthNsgUpdate(ctx context.Context, id string) ApiAut } // Execute executes the request -// -// @return ConfigUpdateAuthNSGResponse +// @return ConfigUpdateAuthNSGResponse func (a *AuthNsgAPIService) AuthNsgUpdateExecute(r ApiAuthNsgUpdateRequest) (*ConfigUpdateAuthNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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 a9cdf68..6254905 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. @@ -140,8 +134,8 @@ AuthZoneCopy Copies the __AuthZone__ object. Use this method to copy an __AuthZone__ object to a different __View__. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCopyRequest */ func (a *AuthZoneAPIService) AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRequest { return ApiAuthZoneCopyRequest{ @@ -151,8 +145,7 @@ func (a *AuthZoneAPIService) AuthZoneCopy(ctx context.Context) ApiAuthZoneCopyRe } // Execute executes the request -// -// @return ConfigCopyAuthZoneResponse +// @return ConfigCopyAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*ConfigCopyAuthZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -235,7 +228,6 @@ func (a *AuthZoneAPIService) AuthZoneCopyExecute(r ApiAuthZoneCopyRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -243,6 +235,7 @@ type ApiAuthZoneCreateRequest struct { ctx context.Context ApiService AuthZoneAPI body *ConfigAuthZone + inherit *string } func (r ApiAuthZoneCreateRequest) Body(body ConfigAuthZone) ApiAuthZoneCreateRequest { @@ -250,6 +243,12 @@ func (r ApiAuthZoneCreateRequest) Body(body ConfigAuthZone) ApiAuthZoneCreateReq return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAuthZoneCreateRequest) Inherit(inherit string) ApiAuthZoneCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiAuthZoneCreateRequest) Execute() (*ConfigCreateAuthZoneResponse, *http.Response, error) { return r.ApiService.AuthZoneCreateExecute(r) } @@ -260,8 +259,8 @@ AuthZoneCreate Create the AuthZone object. Use this method to create an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneCreateRequest */ func (a *AuthZoneAPIService) AuthZoneCreate(ctx context.Context) ApiAuthZoneCreateRequest { return ApiAuthZoneCreateRequest{ @@ -271,8 +270,7 @@ func (a *AuthZoneAPIService) AuthZoneCreate(ctx context.Context) ApiAuthZoneCrea } // Execute executes the request -// -// @return ConfigCreateAuthZoneResponse +// @return ConfigCreateAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) (*ConfigCreateAuthZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -295,6 +293,9 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -312,6 +313,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 { @@ -355,7 +364,6 @@ func (a *AuthZoneAPIService) AuthZoneCreateExecute(r ApiAuthZoneCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -375,9 +383,9 @@ AuthZoneDelete Moves the AuthZone object to Recyclebin. Use this method to move an AuthZone object to Recyclebin. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneDeleteRequest */ func (a *AuthZoneAPIService) AuthZoneDelete(ctx context.Context, id string) ApiAuthZoneDeleteRequest { return ApiAuthZoneDeleteRequest{ @@ -474,39 +482,40 @@ type ApiAuthZoneListRequest struct { orderBy *string tfilter *string torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthZoneListRequest) Fields(fields string) ApiAuthZoneListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAuthZoneListRequest) Filter(filter string) ApiAuthZoneListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAuthZoneListRequest) Offset(offset int32) ApiAuthZoneListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAuthZoneListRequest) Limit(limit int32) ApiAuthZoneListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAuthZoneListRequest) PageToken(pageToken string) ApiAuthZoneListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAuthZoneListRequest) OrderBy(orderBy string) ApiAuthZoneListRequest { r.orderBy = &orderBy return r @@ -524,6 +533,12 @@ func (r ApiAuthZoneListRequest) TorderBy(torderBy string) ApiAuthZoneListRequest return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAuthZoneListRequest) Inherit(inherit string) ApiAuthZoneListRequest { + r.inherit = &inherit + return r +} + func (r ApiAuthZoneListRequest) Execute() (*ConfigListAuthZoneResponse, *http.Response, error) { return r.ApiService.AuthZoneListExecute(r) } @@ -534,8 +549,8 @@ AuthZoneList List AuthZone objects. Use this method to list AuthZone objects. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthZoneListRequest */ func (a *AuthZoneAPIService) AuthZoneList(ctx context.Context) ApiAuthZoneListRequest { return ApiAuthZoneListRequest{ @@ -545,8 +560,7 @@ func (a *AuthZoneAPIService) AuthZoneList(ctx context.Context) ApiAuthZoneListRe } // Execute executes the request -// -// @return ConfigListAuthZoneResponse +// @return ConfigListAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*ConfigListAuthZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -590,6 +604,9 @@ func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*Con if r.torderBy != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -648,7 +665,6 @@ func (a *AuthZoneAPIService) AuthZoneListExecute(r ApiAuthZoneListRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -657,14 +673,21 @@ type ApiAuthZoneReadRequest struct { ApiService AuthZoneAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAuthZoneReadRequest) Fields(fields string) ApiAuthZoneReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAuthZoneReadRequest) Inherit(inherit string) ApiAuthZoneReadRequest { + r.inherit = &inherit + return r +} + func (r ApiAuthZoneReadRequest) Execute() (*ConfigReadAuthZoneResponse, *http.Response, error) { return r.ApiService.AuthZoneReadExecute(r) } @@ -675,9 +698,9 @@ AuthZoneRead Read the AuthZone object. Use this method to read an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneReadRequest */ func (a *AuthZoneAPIService) AuthZoneRead(ctx context.Context, id string) ApiAuthZoneReadRequest { return ApiAuthZoneReadRequest{ @@ -688,8 +711,7 @@ func (a *AuthZoneAPIService) AuthZoneRead(ctx context.Context, id string) ApiAut } // Execute executes the request -// -// @return ConfigReadAuthZoneResponse +// @return ConfigReadAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*ConfigReadAuthZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -713,6 +735,9 @@ func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*Con if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -771,7 +796,6 @@ func (a *AuthZoneAPIService) AuthZoneReadExecute(r ApiAuthZoneReadRequest) (*Con newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -780,6 +804,7 @@ type ApiAuthZoneUpdateRequest struct { ApiService AuthZoneAPI id string body *ConfigAuthZone + inherit *string } func (r ApiAuthZoneUpdateRequest) Body(body ConfigAuthZone) ApiAuthZoneUpdateRequest { @@ -787,6 +812,12 @@ func (r ApiAuthZoneUpdateRequest) Body(body ConfigAuthZone) ApiAuthZoneUpdateReq return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAuthZoneUpdateRequest) Inherit(inherit string) ApiAuthZoneUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiAuthZoneUpdateRequest) Execute() (*ConfigUpdateAuthZoneResponse, *http.Response, error) { return r.ApiService.AuthZoneUpdateExecute(r) } @@ -797,9 +828,9 @@ AuthZoneUpdate Update the AuthZone object. Use this method to update an AuthZone object. This object (_dns/auth_zone_) represents an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAuthZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAuthZoneUpdateRequest */ func (a *AuthZoneAPIService) AuthZoneUpdate(ctx context.Context, id string) ApiAuthZoneUpdateRequest { return ApiAuthZoneUpdateRequest{ @@ -810,8 +841,7 @@ func (a *AuthZoneAPIService) AuthZoneUpdate(ctx context.Context, id string) ApiA } // Execute executes the request -// -// @return ConfigUpdateAuthZoneResponse +// @return ConfigUpdateAuthZoneResponse func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) (*ConfigUpdateAuthZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -835,6 +865,9 @@ func (a *AuthZoneAPIService) AuthZoneUpdateExecute(r ApiAuthZoneUpdateRequest) ( return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -852,6 +885,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 { @@ -895,6 +936,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..3c70986 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. @@ -62,8 +61,8 @@ CacheFlushCreate Create the Cache Flush object. Use this method to create a Cache Flush object. The Cache Flush object is for removing entries from the DNS cache on a host. The host must be available and running DNS for this to succeed. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCacheFlushCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCacheFlushCreateRequest */ func (a *CacheFlushAPIService) CacheFlushCreate(ctx context.Context) ApiCacheFlushCreateRequest { return ApiCacheFlushCreateRequest{ @@ -73,8 +72,7 @@ func (a *CacheFlushAPIService) CacheFlushCreate(ctx context.Context) ApiCacheFlu } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *CacheFlushAPIService) CacheFlushCreateExecute(r ApiCacheFlushCreateRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -157,6 +155,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..884d899 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. @@ -57,9 +56,9 @@ ConvertDomainNameConvert Convert the object. Use this method to convert between Internationalized Domain Name (IDN) and ASCII domain name (Punycode). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param domainName Input domain name in either of IDN or punycode representations. - @return ApiConvertDomainNameConvertRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainName Input domain name in either of IDN or punycode representations. + @return ApiConvertDomainNameConvertRequest */ func (a *ConvertDomainNameAPIService) ConvertDomainNameConvert(ctx context.Context, domainName string) ApiConvertDomainNameConvertRequest { return ApiConvertDomainNameConvertRequest{ @@ -70,8 +69,7 @@ func (a *ConvertDomainNameAPIService) ConvertDomainNameConvert(ctx context.Conte } // Execute executes the request -// -// @return ConfigConvertDomainNameResponse +// @return ConfigConvertDomainNameResponse func (a *ConvertDomainNameAPIService) ConvertDomainNameConvertExecute(r ApiConvertDomainNameConvertRequest) (*ConfigConvertDomainNameResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -150,6 +148,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..3924806 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. @@ -57,9 +56,9 @@ ConvertRnameConvertRName Convert the object. Use this method to convert email address to the master file RNAME format. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param emailAddress Input email address. - @return ApiConvertRnameConvertRNameRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param emailAddress Input email address. + @return ApiConvertRnameConvertRNameRequest */ func (a *ConvertRnameAPIService) ConvertRnameConvertRName(ctx context.Context, emailAddress string) ApiConvertRnameConvertRNameRequest { return ApiConvertRnameConvertRNameRequest{ @@ -70,8 +69,7 @@ func (a *ConvertRnameAPIService) ConvertRnameConvertRName(ctx context.Context, e } // Execute executes the request -// -// @return ConfigConvertRNameResponse +// @return ConfigConvertRNameResponse func (a *ConvertRnameAPIService) ConvertRnameConvertRNameExecute(r ApiConvertRnameConvertRNameRequest) (*ConfigConvertRNameResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -150,6 +148,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..9804f8f 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. @@ -125,8 +120,8 @@ DelegationCreate Create the Delegation object. Use this method to create a Delegation object. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationCreateRequest */ func (a *DelegationAPIService) DelegationCreate(ctx context.Context) ApiDelegationCreateRequest { return ApiDelegationCreateRequest{ @@ -136,8 +131,7 @@ func (a *DelegationAPIService) DelegationCreate(ctx context.Context) ApiDelegati } // Execute executes the request -// -// @return ConfigCreateDelegationResponse +// @return ConfigCreateDelegationResponse func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequest) (*ConfigCreateDelegationResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *DelegationAPIService) DelegationCreateExecute(r ApiDelegationCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ DelegationDelete Moves the Delegation object to Recyclebin. Use this method to move a Delegation object to Recyclebin. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationDeleteRequest */ func (a *DelegationAPIService) DelegationDelete(ctx context.Context, id string) ApiDelegationDeleteRequest { return ApiDelegationDeleteRequest{ @@ -341,37 +342,37 @@ type ApiDelegationListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDelegationListRequest) Fields(fields string) ApiDelegationListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDelegationListRequest) Filter(filter string) ApiDelegationListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDelegationListRequest) Offset(offset int32) ApiDelegationListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDelegationListRequest) Limit(limit int32) ApiDelegationListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDelegationListRequest) PageToken(pageToken string) ApiDelegationListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDelegationListRequest) OrderBy(orderBy string) ApiDelegationListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ DelegationList List Delegation objects. Use this method to list Delegation objects. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDelegationListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDelegationListRequest */ func (a *DelegationAPIService) DelegationList(ctx context.Context) ApiDelegationListRequest { return ApiDelegationListRequest{ @@ -410,8 +411,7 @@ func (a *DelegationAPIService) DelegationList(ctx context.Context) ApiDelegation } // Execute executes the request -// -// @return ConfigListDelegationResponse +// @return ConfigListDelegationResponse func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) (*ConfigListDelegationResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *DelegationAPIService) DelegationListExecute(r ApiDelegationListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiDelegationReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDelegationReadRequest) Fields(fields string) ApiDelegationReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ DelegationRead Read the Delegation object. Use this method to read a Delegation object. This object (_dns/delegation)_ represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationReadRequest */ func (a *DelegationAPIService) DelegationRead(ctx context.Context, id string) ApiDelegationReadRequest { return ApiDelegationReadRequest{ @@ -553,8 +552,7 @@ func (a *DelegationAPIService) DelegationRead(ctx context.Context, id string) Ap } // Execute executes the request -// -// @return ConfigReadDelegationResponse +// @return ConfigReadDelegationResponse func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) (*ConfigReadDelegationResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *DelegationAPIService) DelegationReadExecute(r ApiDelegationReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ DelegationUpdate Update the Delegation object. Use this method to update a Delegation object. This object (_dns/delegation_) represents a zone delegation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDelegationUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDelegationUpdateRequest */ func (a *DelegationAPIService) DelegationUpdate(ctx context.Context, id string) ApiDelegationUpdateRequest { return ApiDelegationUpdateRequest{ @@ -675,8 +672,7 @@ func (a *DelegationAPIService) DelegationUpdate(ctx context.Context, id string) } // Execute executes the request -// -// @return ConfigUpdateDelegationResponse +// @return ConfigUpdateDelegationResponse func (a *DelegationAPIService) DelegationUpdateExecute(r ApiDelegationUpdateRequest) (*ConfigUpdateDelegationResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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..70c6581 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. @@ -125,8 +120,8 @@ ForwardNsgCreate Create the ForwardNSG object. Use this method to create a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgCreateRequest */ func (a *ForwardNsgAPIService) ForwardNsgCreate(ctx context.Context) ApiForwardNsgCreateRequest { return ApiForwardNsgCreateRequest{ @@ -136,8 +131,7 @@ func (a *ForwardNsgAPIService) ForwardNsgCreate(ctx context.Context) ApiForwardN } // Execute executes the request -// -// @return ConfigCreateForwardNSGResponse +// @return ConfigCreateForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequest) (*ConfigCreateForwardNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *ForwardNsgAPIService) ForwardNsgCreateExecute(r ApiForwardNsgCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ ForwardNsgDelete Move the ForwardNSG object to Recyclebin. Use this method to move a ForwardNSG object to Recyclebin. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgDeleteRequest */ func (a *ForwardNsgAPIService) ForwardNsgDelete(ctx context.Context, id string) ApiForwardNsgDeleteRequest { return ApiForwardNsgDeleteRequest{ @@ -341,37 +342,37 @@ type ApiForwardNsgListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardNsgListRequest) Fields(fields string) ApiForwardNsgListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiForwardNsgListRequest) Filter(filter string) ApiForwardNsgListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiForwardNsgListRequest) Offset(offset int32) ApiForwardNsgListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiForwardNsgListRequest) Limit(limit int32) ApiForwardNsgListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiForwardNsgListRequest) PageToken(pageToken string) ApiForwardNsgListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiForwardNsgListRequest) OrderBy(orderBy string) ApiForwardNsgListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ ForwardNsgList List ForwardNSG objects. Use this method to list ForwardNSG objects. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardNsgListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardNsgListRequest */ func (a *ForwardNsgAPIService) ForwardNsgList(ctx context.Context) ApiForwardNsgListRequest { return ApiForwardNsgListRequest{ @@ -410,8 +411,7 @@ func (a *ForwardNsgAPIService) ForwardNsgList(ctx context.Context) ApiForwardNsg } // Execute executes the request -// -// @return ConfigListForwardNSGResponse +// @return ConfigListForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) (*ConfigListForwardNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *ForwardNsgAPIService) ForwardNsgListExecute(r ApiForwardNsgListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiForwardNsgReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardNsgReadRequest) Fields(fields string) ApiForwardNsgReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ ForwardNsgRead Read the ForwardNSG object. Use this method to read a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgReadRequest */ func (a *ForwardNsgAPIService) ForwardNsgRead(ctx context.Context, id string) ApiForwardNsgReadRequest { return ApiForwardNsgReadRequest{ @@ -553,8 +552,7 @@ func (a *ForwardNsgAPIService) ForwardNsgRead(ctx context.Context, id string) Ap } // Execute executes the request -// -// @return ConfigReadForwardNSGResponse +// @return ConfigReadForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) (*ConfigReadForwardNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *ForwardNsgAPIService) ForwardNsgReadExecute(r ApiForwardNsgReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ ForwardNsgUpdate Update the ForwardNSG object. Use this method to update a ForwardNSG object. The _dns/forward_nsg_ object represents a Forward DNS Server Group for forward zones. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardNsgUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardNsgUpdateRequest */ func (a *ForwardNsgAPIService) ForwardNsgUpdate(ctx context.Context, id string) ApiForwardNsgUpdateRequest { return ApiForwardNsgUpdateRequest{ @@ -675,8 +672,7 @@ func (a *ForwardNsgAPIService) ForwardNsgUpdate(ctx context.Context, id string) } // Execute executes the request -// -// @return ConfigUpdateForwardNSGResponse +// @return ConfigUpdateForwardNSGResponse func (a *ForwardNsgAPIService) ForwardNsgUpdateExecute(r ApiForwardNsgUpdateRequest) (*ConfigUpdateForwardNSGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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..55db1d9 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. @@ -140,8 +134,8 @@ ForwardZoneCopy Copies the __ForwardZone__ object. Use this method to copy an __ForwardZone__ object to a different __View__. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCopyRequest */ func (a *ForwardZoneAPIService) ForwardZoneCopy(ctx context.Context) ApiForwardZoneCopyRequest { return ApiForwardZoneCopyRequest{ @@ -151,8 +145,7 @@ func (a *ForwardZoneAPIService) ForwardZoneCopy(ctx context.Context) ApiForwardZ } // Execute executes the request -// -// @return ConfigCopyForwardZoneResponse +// @return ConfigCopyForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyRequest) (*ConfigCopyForwardZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -235,7 +228,6 @@ func (a *ForwardZoneAPIService) ForwardZoneCopyExecute(r ApiForwardZoneCopyReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -260,8 +252,8 @@ ForwardZoneCreate Create the ForwardZone object. Use this method to create a ForwardZone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneCreateRequest */ func (a *ForwardZoneAPIService) ForwardZoneCreate(ctx context.Context) ApiForwardZoneCreateRequest { return ApiForwardZoneCreateRequest{ @@ -271,8 +263,7 @@ func (a *ForwardZoneAPIService) ForwardZoneCreate(ctx context.Context) ApiForwar } // Execute executes the request -// -// @return ConfigCreateForwardZoneResponse +// @return ConfigCreateForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateRequest) (*ConfigCreateForwardZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -312,6 +303,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 +354,6 @@ func (a *ForwardZoneAPIService) ForwardZoneCreateExecute(r ApiForwardZoneCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -375,9 +373,9 @@ ForwardZoneDelete Move the Forward Zone object to Recyclebin. Use this method to move a Forward Zone object to Recyclebin. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneDeleteRequest */ func (a *ForwardZoneAPIService) ForwardZoneDelete(ctx context.Context, id string) ApiForwardZoneDeleteRequest { return ApiForwardZoneDeleteRequest{ @@ -476,37 +474,37 @@ type ApiForwardZoneListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardZoneListRequest) Fields(fields string) ApiForwardZoneListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiForwardZoneListRequest) Filter(filter string) ApiForwardZoneListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiForwardZoneListRequest) Offset(offset int32) ApiForwardZoneListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiForwardZoneListRequest) Limit(limit int32) ApiForwardZoneListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiForwardZoneListRequest) PageToken(pageToken string) ApiForwardZoneListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiForwardZoneListRequest) OrderBy(orderBy string) ApiForwardZoneListRequest { r.orderBy = &orderBy return r @@ -534,8 +532,8 @@ ForwardZoneList List Forward Zone objects. Use this method to list Forward Zone objects. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiForwardZoneListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiForwardZoneListRequest */ func (a *ForwardZoneAPIService) ForwardZoneList(ctx context.Context) ApiForwardZoneListRequest { return ApiForwardZoneListRequest{ @@ -545,8 +543,7 @@ func (a *ForwardZoneAPIService) ForwardZoneList(ctx context.Context) ApiForwardZ } // Execute executes the request -// -// @return ConfigListForwardZoneResponse +// @return ConfigListForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListRequest) (*ConfigListForwardZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -648,7 +645,6 @@ func (a *ForwardZoneAPIService) ForwardZoneListExecute(r ApiForwardZoneListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -659,7 +655,7 @@ type ApiForwardZoneReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiForwardZoneReadRequest) Fields(fields string) ApiForwardZoneReadRequest { r.fields = &fields return r @@ -675,9 +671,9 @@ ForwardZoneRead Read the Forward Zone object. Use this method to read a Forward Zone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneReadRequest */ func (a *ForwardZoneAPIService) ForwardZoneRead(ctx context.Context, id string) ApiForwardZoneReadRequest { return ApiForwardZoneReadRequest{ @@ -688,8 +684,7 @@ func (a *ForwardZoneAPIService) ForwardZoneRead(ctx context.Context, id string) } // Execute executes the request -// -// @return ConfigReadForwardZoneResponse +// @return ConfigReadForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadRequest) (*ConfigReadForwardZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -771,7 +766,6 @@ func (a *ForwardZoneAPIService) ForwardZoneReadExecute(r ApiForwardZoneReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -797,9 +791,9 @@ ForwardZoneUpdate Update the Forward Zone object. Use this method to update a Forward Zone object. This object (_dns/forward_zone_) represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiForwardZoneUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiForwardZoneUpdateRequest */ func (a *ForwardZoneAPIService) ForwardZoneUpdate(ctx context.Context, id string) ApiForwardZoneUpdateRequest { return ApiForwardZoneUpdateRequest{ @@ -810,8 +804,7 @@ func (a *ForwardZoneAPIService) ForwardZoneUpdate(ctx context.Context, id string } // Execute executes the request -// -// @return ConfigUpdateForwardZoneResponse +// @return ConfigUpdateForwardZoneResponse func (a *ForwardZoneAPIService) ForwardZoneUpdateExecute(r ApiForwardZoneUpdateRequest) (*ConfigUpdateForwardZoneResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -852,6 +845,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 +896,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..63f4408 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. @@ -95,7 +91,7 @@ type ApiGlobalReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalReadRequest) Fields(fields string) ApiGlobalReadRequest { r.fields = &fields return r @@ -111,8 +107,8 @@ GlobalRead Read the Global configuration object. Use this method to read the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest { return ApiGlobalReadRequest{ @@ -122,8 +118,7 @@ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest } // Execute executes the request -// -// @return ConfigReadGlobalResponse +// @return ConfigReadGlobalResponse func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigReadGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -204,7 +199,6 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*ConfigRea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -215,7 +209,7 @@ type ApiGlobalRead2Request struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalRead2Request) Fields(fields string) ApiGlobalRead2Request { r.fields = &fields return r @@ -231,9 +225,9 @@ GlobalRead2 Read the Global configuration object. Use this method to read the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request { return ApiGlobalRead2Request{ @@ -244,8 +238,7 @@ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobal } // Execute executes the request -// -// @return ConfigReadGlobalResponse +// @return ConfigReadGlobalResponse func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigReadGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -327,7 +320,6 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*ConfigR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -352,8 +344,8 @@ GlobalUpdate Update the Global configuration object. Use this method to update the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest { return ApiGlobalUpdateRequest{ @@ -363,8 +355,7 @@ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequ } // Execute executes the request -// -// @return ConfigUpdateGlobalResponse +// @return ConfigUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*ConfigUpdateGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -447,7 +438,6 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -473,9 +463,9 @@ GlobalUpdate2 Update the Global configuration object. Use this method to update the Global configuration object. Service operates on Global singleton object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request { return ApiGlobalUpdate2Request{ @@ -486,8 +476,7 @@ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlob } // Execute executes the request -// -// @return ConfigUpdateGlobalResponse +// @return ConfigUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*ConfigUpdateGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -571,6 +560,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 e2a7e05..631ebb2 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. @@ -85,39 +82,40 @@ type ApiHostListRequest struct { orderBy *string tfilter *string torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostListRequest) Fields(fields string) ApiHostListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHostListRequest) Filter(filter string) ApiHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHostListRequest) Offset(offset int32) ApiHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHostListRequest) Limit(limit int32) ApiHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHostListRequest) PageToken(pageToken string) ApiHostListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHostListRequest) OrderBy(orderBy string) ApiHostListRequest { r.orderBy = &orderBy return r @@ -135,6 +133,12 @@ func (r ApiHostListRequest) TorderBy(torderBy string) ApiHostListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiHostListRequest) Inherit(inherit string) ApiHostListRequest { + r.inherit = &inherit + return r +} + func (r ApiHostListRequest) Execute() (*ConfigListHostResponse, *http.Response, error) { return r.ApiService.HostListExecute(r) } @@ -145,8 +149,8 @@ HostList List DNS Host objects. Use this method to list DNS Host objects. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostListRequest */ func (a *HostAPIService) HostList(ctx context.Context) ApiHostListRequest { return ApiHostListRequest{ @@ -156,8 +160,7 @@ func (a *HostAPIService) HostList(ctx context.Context) ApiHostListRequest { } // Execute executes the request -// -// @return ConfigListHostResponse +// @return ConfigListHostResponse func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -201,6 +204,9 @@ func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostR if r.torderBy != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -259,7 +265,6 @@ func (a *HostAPIService) HostListExecute(r ApiHostListRequest) (*ConfigListHostR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -268,14 +273,21 @@ type ApiHostReadRequest struct { ApiService HostAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostReadRequest) Fields(fields string) ApiHostReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiHostReadRequest) Inherit(inherit string) ApiHostReadRequest { + r.inherit = &inherit + return r +} + func (r ApiHostReadRequest) Execute() (*ConfigReadHostResponse, *http.Response, error) { return r.ApiService.HostReadExecute(r) } @@ -286,9 +298,9 @@ HostRead Read the DNS Host object. Use this method to read a DNS Host object. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostReadRequest */ func (a *HostAPIService) HostRead(ctx context.Context, id string) ApiHostReadRequest { return ApiHostReadRequest{ @@ -299,8 +311,7 @@ func (a *HostAPIService) HostRead(ctx context.Context, id string) ApiHostReadReq } // Execute executes the request -// -// @return ConfigReadHostResponse +// @return ConfigReadHostResponse func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -324,6 +335,9 @@ func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostR if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -382,7 +396,6 @@ func (a *HostAPIService) HostReadExecute(r ApiHostReadRequest) (*ConfigReadHostR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -391,6 +404,7 @@ type ApiHostUpdateRequest struct { ApiService HostAPI id string body *ConfigHost + inherit *string } func (r ApiHostUpdateRequest) Body(body ConfigHost) ApiHostUpdateRequest { @@ -398,6 +412,12 @@ func (r ApiHostUpdateRequest) Body(body ConfigHost) ApiHostUpdateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiHostUpdateRequest) Inherit(inherit string) ApiHostUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiHostUpdateRequest) Execute() (*ConfigUpdateHostResponse, *http.Response, error) { return r.ApiService.HostUpdateExecute(r) } @@ -408,9 +428,9 @@ HostUpdate Update the DNS Host object. Use this method to update a DNS Host object. A DNS Host object associates DNS configuration with hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostUpdateRequest */ func (a *HostAPIService) HostUpdate(ctx context.Context, id string) ApiHostUpdateRequest { return ApiHostUpdateRequest{ @@ -421,8 +441,7 @@ func (a *HostAPIService) HostUpdate(ctx context.Context, id string) ApiHostUpdat } // Execute executes the request -// -// @return ConfigUpdateHostResponse +// @return ConfigUpdateHostResponse func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdateHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -446,6 +465,9 @@ func (a *HostAPIService) HostUpdateExecute(r ApiHostUpdateRequest) (*ConfigUpdat return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -463,6 +485,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 { @@ -506,6 +536,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..3241194 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. @@ -119,8 +114,8 @@ LbdnCreate Create the __LBDN__ object. Use this method to create a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnCreateRequest */ func (a *LbdnAPIService) LbdnCreate(ctx context.Context) ApiLbdnCreateRequest { return ApiLbdnCreateRequest{ @@ -130,8 +125,7 @@ func (a *LbdnAPIService) LbdnCreate(ctx context.Context) ApiLbdnCreateRequest { } // Execute executes the request -// -// @return ConfigCreateLBDNResponse +// @return ConfigCreateLBDNResponse func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreateLBDNResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -171,6 +165,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 +216,6 @@ func (a *LbdnAPIService) LbdnCreateExecute(r ApiLbdnCreateRequest) (*ConfigCreat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -233,9 +234,9 @@ LbdnDelete Delete the __LBDN__ object. Use this method to delete a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnDeleteRequest */ func (a *LbdnAPIService) LbdnDelete(ctx context.Context, id string) ApiLbdnDeleteRequest { return ApiLbdnDeleteRequest{ @@ -334,37 +335,37 @@ type ApiLbdnListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiLbdnListRequest) Fields(fields string) ApiLbdnListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiLbdnListRequest) Filter(filter string) ApiLbdnListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiLbdnListRequest) Offset(offset int32) ApiLbdnListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiLbdnListRequest) Limit(limit int32) ApiLbdnListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiLbdnListRequest) PageToken(pageToken string) ApiLbdnListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiLbdnListRequest) OrderBy(orderBy string) ApiLbdnListRequest { r.orderBy = &orderBy return r @@ -391,8 +392,8 @@ LbdnList List __LBDN__ objects. Use this method to list __LBDN__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLbdnListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLbdnListRequest */ func (a *LbdnAPIService) LbdnList(ctx context.Context) ApiLbdnListRequest { return ApiLbdnListRequest{ @@ -402,8 +403,7 @@ func (a *LbdnAPIService) LbdnList(ctx context.Context) ApiLbdnListRequest { } // Execute executes the request -// -// @return ConfigListLBDNResponse +// @return ConfigListLBDNResponse func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -505,7 +505,6 @@ func (a *LbdnAPIService) LbdnListExecute(r ApiLbdnListRequest) (*ConfigListLBDNR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -516,7 +515,7 @@ type ApiLbdnReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiLbdnReadRequest) Fields(fields string) ApiLbdnReadRequest { r.fields = &fields return r @@ -531,9 +530,9 @@ LbdnRead Read the __LBDN__ object. Use this method to read a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnReadRequest */ func (a *LbdnAPIService) LbdnRead(ctx context.Context, id string) ApiLbdnReadRequest { return ApiLbdnReadRequest{ @@ -544,8 +543,7 @@ func (a *LbdnAPIService) LbdnRead(ctx context.Context, id string) ApiLbdnReadReq } // Execute executes the request -// -// @return ConfigReadLBDNResponse +// @return ConfigReadLBDNResponse func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -627,7 +625,6 @@ func (a *LbdnAPIService) LbdnReadExecute(r ApiLbdnReadRequest) (*ConfigReadLBDNR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -652,9 +649,9 @@ LbdnUpdate Update the __LBDN__ object. Use this method to update a __LBDN__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiLbdnUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiLbdnUpdateRequest */ func (a *LbdnAPIService) LbdnUpdate(ctx context.Context, id string) ApiLbdnUpdateRequest { return ApiLbdnUpdateRequest{ @@ -665,8 +662,7 @@ func (a *LbdnAPIService) LbdnUpdate(ctx context.Context, id string) ApiLbdnUpdat } // Execute executes the request -// -// @return ConfigUpdateLBDNResponse +// @return ConfigUpdateLBDNResponse func (a *LbdnAPIService) LbdnUpdateExecute(r ApiLbdnUpdateRequest) (*ConfigUpdateLBDNResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -707,6 +703,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 +754,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 e311ff3..10ef927 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. @@ -108,6 +103,7 @@ type ApiServerCreateRequest struct { ctx context.Context ApiService ServerAPI body *ConfigServer + inherit *string } func (r ApiServerCreateRequest) Body(body ConfigServer) ApiServerCreateRequest { @@ -115,6 +111,12 @@ func (r ApiServerCreateRequest) Body(body ConfigServer) ApiServerCreateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerCreateRequest) Inherit(inherit string) ApiServerCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiServerCreateRequest) Execute() (*ConfigCreateServerResponse, *http.Response, error) { return r.ApiService.ServerCreateExecute(r) } @@ -125,8 +127,8 @@ ServerCreate Create the Server object. Use this method to create a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequest { return ApiServerCreateRequest{ @@ -136,8 +138,7 @@ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequ } // Execute executes the request -// -// @return ConfigCreateServerResponse +// @return ConfigCreateServerResponse func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*ConfigCreateServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -160,6 +161,9 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -177,6 +181,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 { @@ -220,7 +232,6 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Confi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +251,9 @@ ServerDelete Move the Server object to Recyclebin. Use this method to move a Server object to Recyclebin. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ func (a *ServerAPIService) ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest { return ApiServerDeleteRequest{ @@ -339,39 +350,40 @@ type ApiServerListRequest struct { orderBy *string tfilter *string torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerListRequest) Fields(fields string) ApiServerListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServerListRequest) Filter(filter string) ApiServerListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServerListRequest) Offset(offset int32) ApiServerListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServerListRequest) Limit(limit int32) ApiServerListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServerListRequest) PageToken(pageToken string) ApiServerListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServerListRequest) OrderBy(orderBy string) ApiServerListRequest { r.orderBy = &orderBy return r @@ -389,6 +401,12 @@ func (r ApiServerListRequest) TorderBy(torderBy string) ApiServerListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerListRequest) Inherit(inherit string) ApiServerListRequest { + r.inherit = &inherit + return r +} + func (r ApiServerListRequest) Execute() (*ConfigListServerResponse, *http.Response, error) { return r.ApiService.ServerListExecute(r) } @@ -399,8 +417,8 @@ ServerList List Server objects. Use this method to list Server objects. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest { return ApiServerListRequest{ @@ -410,8 +428,7 @@ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest } // Execute executes the request -// -// @return ConfigListServerResponse +// @return ConfigListServerResponse func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigListServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -455,6 +472,9 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigLis if r.torderBy != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -513,7 +533,6 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*ConfigLis newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -522,14 +541,21 @@ type ApiServerReadRequest struct { ApiService ServerAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerReadRequest) Fields(fields string) ApiServerReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerReadRequest) Inherit(inherit string) ApiServerReadRequest { + r.inherit = &inherit + return r +} + func (r ApiServerReadRequest) Execute() (*ConfigReadServerResponse, *http.Response, error) { return r.ApiService.ServerReadExecute(r) } @@ -540,9 +566,9 @@ ServerRead Read the Server object. Use this method to read a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerReadRequest { return ApiServerReadRequest{ @@ -553,8 +579,7 @@ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerR } // Execute executes the request -// -// @return ConfigReadServerResponse +// @return ConfigReadServerResponse func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigReadServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -578,6 +603,9 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigRea if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -636,7 +664,6 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*ConfigRea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -645,6 +672,7 @@ type ApiServerUpdateRequest struct { ApiService ServerAPI id string body *ConfigServer + inherit *string } func (r ApiServerUpdateRequest) Body(body ConfigServer) ApiServerUpdateRequest { @@ -652,6 +680,12 @@ func (r ApiServerUpdateRequest) Body(body ConfigServer) ApiServerUpdateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerUpdateRequest) Inherit(inherit string) ApiServerUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiServerUpdateRequest) Execute() (*ConfigUpdateServerResponse, *http.Response, error) { return r.ApiService.ServerUpdateExecute(r) } @@ -662,9 +696,9 @@ ServerUpdate Update the Server object. Use this method to update a Server object. A DNS Config Profile is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest { return ApiServerUpdateRequest{ @@ -675,8 +709,7 @@ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServe } // Execute executes the request -// -// @return ConfigUpdateServerResponse +// @return ConfigUpdateServerResponse func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*ConfigUpdateServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -700,6 +733,9 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Confi return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -717,6 +753,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 { @@ -760,6 +804,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 e141cc0..a90add9 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. @@ -142,8 +136,8 @@ Use this method to bulk copy __AuthZone__ and __ForwardZone__ objects from one _ The __AuthZone__ object represents an authoritative zone. The __ForwardZone__ object represents a forwarding zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewBulkCopyRequest */ func (a *ViewAPIService) ViewBulkCopy(ctx context.Context) ApiViewBulkCopyRequest { return ApiViewBulkCopyRequest{ @@ -153,8 +147,7 @@ func (a *ViewAPIService) ViewBulkCopy(ctx context.Context) ApiViewBulkCopyReques } // Execute executes the request -// -// @return ConfigBulkCopyResponse +// @return ConfigBulkCopyResponse func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigBulkCopyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -237,7 +230,6 @@ func (a *ViewAPIService) ViewBulkCopyExecute(r ApiViewBulkCopyRequest) (*ConfigB newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -245,6 +237,7 @@ type ApiViewCreateRequest struct { ctx context.Context ApiService ViewAPI body *ConfigView + inherit *string } func (r ApiViewCreateRequest) Body(body ConfigView) ApiViewCreateRequest { @@ -252,6 +245,12 @@ func (r ApiViewCreateRequest) Body(body ConfigView) ApiViewCreateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiViewCreateRequest) Inherit(inherit string) ApiViewCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiViewCreateRequest) Execute() (*ConfigCreateViewResponse, *http.Response, error) { return r.ApiService.ViewCreateExecute(r) } @@ -262,8 +261,8 @@ ViewCreate Create the View object. Use this method to create a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewCreateRequest */ func (a *ViewAPIService) ViewCreate(ctx context.Context) ApiViewCreateRequest { return ApiViewCreateRequest{ @@ -273,8 +272,7 @@ func (a *ViewAPIService) ViewCreate(ctx context.Context) ApiViewCreateRequest { } // Execute executes the request -// -// @return ConfigCreateViewResponse +// @return ConfigCreateViewResponse func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreateViewResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -297,6 +295,9 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -314,6 +315,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 { @@ -357,7 +366,6 @@ func (a *ViewAPIService) ViewCreateExecute(r ApiViewCreateRequest) (*ConfigCreat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -377,9 +385,9 @@ ViewDelete Move the View object to Recyclebin. Use this method to move a View object to Recyclebin. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewDeleteRequest */ func (a *ViewAPIService) ViewDelete(ctx context.Context, id string) ApiViewDeleteRequest { return ApiViewDeleteRequest{ @@ -476,39 +484,40 @@ type ApiViewListRequest struct { orderBy *string tfilter *string torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiViewListRequest) Fields(fields string) ApiViewListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiViewListRequest) Filter(filter string) ApiViewListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiViewListRequest) Offset(offset int32) ApiViewListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiViewListRequest) Limit(limit int32) ApiViewListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiViewListRequest) PageToken(pageToken string) ApiViewListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiViewListRequest) OrderBy(orderBy string) ApiViewListRequest { r.orderBy = &orderBy return r @@ -526,6 +535,12 @@ func (r ApiViewListRequest) TorderBy(torderBy string) ApiViewListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiViewListRequest) Inherit(inherit string) ApiViewListRequest { + r.inherit = &inherit + return r +} + func (r ApiViewListRequest) Execute() (*ConfigListViewResponse, *http.Response, error) { return r.ApiService.ViewListExecute(r) } @@ -536,8 +551,8 @@ ViewList List View objects. Use this method to list View objects. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiViewListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiViewListRequest */ func (a *ViewAPIService) ViewList(ctx context.Context) ApiViewListRequest { return ApiViewListRequest{ @@ -547,8 +562,7 @@ func (a *ViewAPIService) ViewList(ctx context.Context) ApiViewListRequest { } // Execute executes the request -// -// @return ConfigListViewResponse +// @return ConfigListViewResponse func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -592,6 +606,9 @@ func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewR if r.torderBy != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -650,7 +667,6 @@ func (a *ViewAPIService) ViewListExecute(r ApiViewListRequest) (*ConfigListViewR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -659,14 +675,21 @@ type ApiViewReadRequest struct { ApiService ViewAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiViewReadRequest) Fields(fields string) ApiViewReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiViewReadRequest) Inherit(inherit string) ApiViewReadRequest { + r.inherit = &inherit + return r +} + func (r ApiViewReadRequest) Execute() (*ConfigReadViewResponse, *http.Response, error) { return r.ApiService.ViewReadExecute(r) } @@ -677,9 +700,9 @@ ViewRead Read the View object. Use this method to read a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewReadRequest */ func (a *ViewAPIService) ViewRead(ctx context.Context, id string) ApiViewReadRequest { return ApiViewReadRequest{ @@ -690,8 +713,7 @@ func (a *ViewAPIService) ViewRead(ctx context.Context, id string) ApiViewReadReq } // Execute executes the request -// -// @return ConfigReadViewResponse +// @return ConfigReadViewResponse func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -715,6 +737,9 @@ func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewR if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -773,7 +798,6 @@ func (a *ViewAPIService) ViewReadExecute(r ApiViewReadRequest) (*ConfigReadViewR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -782,6 +806,7 @@ type ApiViewUpdateRequest struct { ApiService ViewAPI id string body *ConfigView + inherit *string } func (r ApiViewUpdateRequest) Body(body ConfigView) ApiViewUpdateRequest { @@ -789,6 +814,12 @@ func (r ApiViewUpdateRequest) Body(body ConfigView) ApiViewUpdateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiViewUpdateRequest) Inherit(inherit string) ApiViewUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiViewUpdateRequest) Execute() (*ConfigUpdateViewResponse, *http.Response, error) { return r.ApiService.ViewUpdateExecute(r) } @@ -799,9 +830,9 @@ ViewUpdate Update the View object. Use this method to update a View object. Named collection of DNS View settings. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiViewUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiViewUpdateRequest */ func (a *ViewAPIService) ViewUpdate(ctx context.Context, id string) ApiViewUpdateRequest { return ApiViewUpdateRequest{ @@ -812,8 +843,7 @@ func (a *ViewAPIService) ViewUpdate(ctx context.Context, id string) ApiViewUpdat } // Execute executes the request -// -// @return ConfigUpdateViewResponse +// @return ConfigUpdateViewResponse func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdateViewResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -837,6 +867,9 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -854,6 +887,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 { @@ -897,6 +938,5 @@ func (a *ViewAPIService) ViewUpdateExecute(r ApiViewUpdateRequest) (*ConfigUpdat newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/dns_config/client.go b/dns_config/client.go index 95b6d87..2df6699 100644 --- a/dns_config/client.go +++ b/dns_config/client.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package dns_config import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,30 +19,30 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DNS Configuration API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - AclAPI AclAPI - AuthNsgAPI AuthNsgAPI - AuthZoneAPI AuthZoneAPI - CacheFlushAPI CacheFlushAPI + AclAPI AclAPI + AuthNsgAPI AuthNsgAPI + AuthZoneAPI AuthZoneAPI + CacheFlushAPI CacheFlushAPI ConvertDomainNameAPI ConvertDomainNameAPI - ConvertRnameAPI ConvertRnameAPI - DelegationAPI DelegationAPI - ForwardNsgAPI ForwardNsgAPI - ForwardZoneAPI ForwardZoneAPI - GlobalAPI GlobalAPI - HostAPI HostAPI - LbdnAPI LbdnAPI - ServerAPI ServerAPI - ViewAPI ViewAPI + ConvertRnameAPI ConvertRnameAPI + DelegationAPI DelegationAPI + ForwardNsgAPI ForwardNsgAPI + ForwardZoneAPI ForwardZoneAPI + GlobalAPI GlobalAPI + HostAPI HostAPI + LbdnAPI LbdnAPI + ServerAPI ServerAPI + ViewAPI ViewAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.AclAPI = (*AclAPIService)(&c.Common) diff --git a/dns_config/docs/AuthZoneAPI.md b/dns_config/docs/AuthZoneAPI.md index 44b23fb..041d137 100644 --- a/dns_config/docs/AuthZoneAPI.md +++ b/dns_config/docs/AuthZoneAPI.md @@ -81,7 +81,7 @@ Name | Type | Description | Notes ## AuthZoneCreate -> ConfigCreateAuthZoneResponse AuthZoneCreate(ctx).Body(body).Execute() +> ConfigCreateAuthZoneResponse AuthZoneCreate(ctx).Body(body).Inherit(inherit).Execute() Create the AuthZone object. @@ -101,10 +101,11 @@ import ( func main() { body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -126,6 +127,7 @@ Other parameters are passed through a pointer to a apiAuthZoneCreateRequest stru Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigAuthZone**](ConfigAuthZone.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -215,7 +217,7 @@ Name | Type | Description | Notes ## AuthZoneList -> ConfigListAuthZoneResponse AuthZoneList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() +> ConfigListAuthZoneResponse AuthZoneList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() List AuthZone objects. @@ -242,10 +244,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -274,6 +277,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **tfilter** | **string** | This parameter is used for filtering by tags. | **torderBy** | **string** | This parameter is used for sorting by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -295,7 +299,7 @@ Name | Type | Description | Notes ## AuthZoneRead -> ConfigReadAuthZoneResponse AuthZoneRead(ctx, id).Fields(fields).Execute() +> ConfigReadAuthZoneResponse AuthZoneRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Read the AuthZone object. @@ -316,10 +320,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -346,6 +351,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -367,7 +373,7 @@ Name | Type | Description | Notes ## AuthZoneUpdate -> ConfigUpdateAuthZoneResponse AuthZoneUpdate(ctx, id).Body(body).Execute() +> ConfigUpdateAuthZoneResponse AuthZoneUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the AuthZone object. @@ -388,10 +394,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -418,6 +425,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigAuthZone**](ConfigAuthZone.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/dns_config/docs/ConfigInheritedACLItems.md b/dns_config/docs/ConfigInheritedACLItems.md index 27a2619..543a7ce 100644 --- a/dns_config/docs/ConfigInheritedACLItems.md +++ b/dns_config/docs/ConfigInheritedACLItems.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Optional. Inheritance setting for a field. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**[]ConfigACLItem**](ConfigACLItem.md) | Inherited value. | [optional] [readonly] ## Methods diff --git a/dns_config/docs/ConfigInheritedCustomRootNSBlock.md b/dns_config/docs/ConfigInheritedCustomRootNSBlock.md index 3cb2422..c74c62a 100644 --- a/dns_config/docs/ConfigInheritedCustomRootNSBlock.md +++ b/dns_config/docs/ConfigInheritedCustomRootNSBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**ConfigCustomRootNSBlock**](ConfigCustomRootNSBlock.md) | | [optional] ## Methods diff --git a/dns_config/docs/ConfigInheritedDNSSECValidationBlock.md b/dns_config/docs/ConfigInheritedDNSSECValidationBlock.md index 0a59814..57f76e1 100644 --- a/dns_config/docs/ConfigInheritedDNSSECValidationBlock.md +++ b/dns_config/docs/ConfigInheritedDNSSECValidationBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**ConfigDNSSECValidationBlock**](ConfigDNSSECValidationBlock.md) | | [optional] ## Methods diff --git a/dns_config/docs/ConfigInheritedECSBlock.md b/dns_config/docs/ConfigInheritedECSBlock.md index e79f1ee..39852cf 100644 --- a/dns_config/docs/ConfigInheritedECSBlock.md +++ b/dns_config/docs/ConfigInheritedECSBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**ConfigECSBlock**](ConfigECSBlock.md) | | [optional] ## Methods diff --git a/dns_config/docs/ConfigInheritedForwardersBlock.md b/dns_config/docs/ConfigInheritedForwardersBlock.md index 0991656..277050e 100644 --- a/dns_config/docs/ConfigInheritedForwardersBlock.md +++ b/dns_config/docs/ConfigInheritedForwardersBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**ConfigForwardersBlock**](ConfigForwardersBlock.md) | | [optional] ## Methods diff --git a/dns_config/docs/ConfigInheritedKerberosKeys.md b/dns_config/docs/ConfigInheritedKerberosKeys.md index 43d4e37..e537394 100644 --- a/dns_config/docs/ConfigInheritedKerberosKeys.md +++ b/dns_config/docs/ConfigInheritedKerberosKeys.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Optional. Inheritance setting for a field. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**[]ConfigKerberosKey**](ConfigKerberosKey.md) | Inherited value. | [optional] [readonly] ## Methods diff --git a/dns_config/docs/ConfigInheritedSortListItems.md b/dns_config/docs/ConfigInheritedSortListItems.md index 339fbf9..d0bb177 100644 --- a/dns_config/docs/ConfigInheritedSortListItems.md +++ b/dns_config/docs/ConfigInheritedSortListItems.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Optional. Inheritance setting for a field. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**[]ConfigSortListItem**](ConfigSortListItem.md) | Inherited value. | [optional] [readonly] ## Methods diff --git a/dns_config/docs/ConfigInheritedZoneAuthorityMNameBlock.md b/dns_config/docs/ConfigInheritedZoneAuthorityMNameBlock.md index c782a3f..4b2dfef 100644 --- a/dns_config/docs/ConfigInheritedZoneAuthorityMNameBlock.md +++ b/dns_config/docs/ConfigInheritedZoneAuthorityMNameBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | Human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**ConfigZoneAuthorityMNameBlock**](ConfigZoneAuthorityMNameBlock.md) | | [optional] ## Methods diff --git a/dns_config/docs/HostAPI.md b/dns_config/docs/HostAPI.md index 7286d84..c6433fa 100644 --- a/dns_config/docs/HostAPI.md +++ b/dns_config/docs/HostAPI.md @@ -12,7 +12,7 @@ Method | HTTP request | Description ## HostList -> ConfigListHostResponse HostList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() +> ConfigListHostResponse HostList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() List DNS Host objects. @@ -39,10 +39,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -71,6 +72,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **tfilter** | **string** | This parameter is used for filtering by tags. | **torderBy** | **string** | This parameter is used for sorting by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -92,7 +94,7 @@ Name | Type | Description | Notes ## HostRead -> ConfigReadHostResponse HostRead(ctx, id).Fields(fields).Execute() +> ConfigReadHostResponse HostRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Read the DNS Host object. @@ -113,10 +115,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -143,6 +146,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -164,7 +168,7 @@ Name | Type | Description | Notes ## HostUpdate -> ConfigUpdateHostResponse HostUpdate(ctx, id).Body(body).Execute() +> ConfigUpdateHostResponse HostUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the DNS Host object. @@ -185,10 +189,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewConfigHost() // ConfigHost | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -215,6 +220,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigHost**](ConfigHost.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/dns_config/docs/Inheritance2InheritedBool.md b/dns_config/docs/Inheritance2InheritedBool.md index e54af5a..19a7854 100644 --- a/dns_config/docs/Inheritance2InheritedBool.md +++ b/dns_config/docs/Inheritance2InheritedBool.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **bool** | The inherited value. | [optional] [readonly] ## Methods diff --git a/dns_config/docs/Inheritance2InheritedString.md b/dns_config/docs/Inheritance2InheritedString.md index 9dffe6b..b7d0707 100644 --- a/dns_config/docs/Inheritance2InheritedString.md +++ b/dns_config/docs/Inheritance2InheritedString.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **string** | The inherited value. | [optional] [readonly] ## Methods diff --git a/dns_config/docs/Inheritance2InheritedUInt32.md b/dns_config/docs/Inheritance2InheritedUInt32.md index 2420707..ebe5512 100644 --- a/dns_config/docs/Inheritance2InheritedUInt32.md +++ b/dns_config/docs/Inheritance2InheritedUInt32.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **int64** | The inherited value. | [optional] [readonly] ## Methods diff --git a/dns_config/docs/ServerAPI.md b/dns_config/docs/ServerAPI.md index bd0b879..3413e39 100644 --- a/dns_config/docs/ServerAPI.md +++ b/dns_config/docs/ServerAPI.md @@ -14,7 +14,7 @@ Method | HTTP request | Description ## ServerCreate -> ConfigCreateServerResponse ServerCreate(ctx).Body(body).Execute() +> ConfigCreateServerResponse ServerCreate(ctx).Body(body).Inherit(inherit).Execute() Create the Server object. @@ -34,10 +34,11 @@ import ( func main() { body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -59,6 +60,7 @@ Other parameters are passed through a pointer to a apiServerCreateRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigServer**](ConfigServer.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -148,7 +150,7 @@ Name | Type | Description | Notes ## ServerList -> ConfigListServerResponse ServerList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() +> ConfigListServerResponse ServerList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() List Server objects. @@ -175,10 +177,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -207,6 +210,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **tfilter** | **string** | This parameter is used for filtering by tags. | **torderBy** | **string** | This parameter is used for sorting by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -228,7 +232,7 @@ Name | Type | Description | Notes ## ServerRead -> ConfigReadServerResponse ServerRead(ctx, id).Fields(fields).Execute() +> ConfigReadServerResponse ServerRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Read the Server object. @@ -249,10 +253,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -279,6 +284,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -300,7 +306,7 @@ Name | Type | Description | Notes ## ServerUpdate -> ConfigUpdateServerResponse ServerUpdate(ctx, id).Body(body).Execute() +> ConfigUpdateServerResponse ServerUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the Server object. @@ -321,10 +327,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -351,6 +358,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigServer**](ConfigServer.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/dns_config/docs/ViewAPI.md b/dns_config/docs/ViewAPI.md index f5e155a..88cb110 100644 --- a/dns_config/docs/ViewAPI.md +++ b/dns_config/docs/ViewAPI.md @@ -81,7 +81,7 @@ Name | Type | Description | Notes ## ViewCreate -> ConfigCreateViewResponse ViewCreate(ctx).Body(body).Execute() +> ConfigCreateViewResponse ViewCreate(ctx).Body(body).Inherit(inherit).Execute() Create the View object. @@ -101,10 +101,11 @@ import ( func main() { body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -126,6 +127,7 @@ Other parameters are passed through a pointer to a apiViewCreateRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigView**](ConfigView.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -215,7 +217,7 @@ Name | Type | Description | Notes ## ViewList -> ConfigListViewResponse ViewList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() +> ConfigListViewResponse ViewList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() List View objects. @@ -242,10 +244,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -274,6 +277,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **tfilter** | **string** | This parameter is used for filtering by tags. | **torderBy** | **string** | This parameter is used for sorting by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -295,7 +299,7 @@ Name | Type | Description | Notes ## ViewRead -> ConfigReadViewResponse ViewRead(ctx, id).Fields(fields).Execute() +> ConfigReadViewResponse ViewRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Read the View object. @@ -316,10 +320,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -346,6 +351,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -367,7 +373,7 @@ Name | Type | Description | Notes ## ViewUpdate -> ConfigUpdateViewResponse ViewUpdate(ctx, id).Body(body).Execute() +> ConfigUpdateViewResponse ViewUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the View object. @@ -388,10 +394,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -418,6 +425,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ConfigView**](ConfigView.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/dns_config/model_config_acl.go b/dns_config/model_config_acl.go index 932e0ce..b59723e 100644 --- a/dns_config/model_config_acl.go +++ b/dns_config/model_config_acl.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigACL type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type ConfigACL struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigACL ConfigACL + // NewConfigACL instantiates a new ConfigACL object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -227,6 +230,41 @@ func (o ConfigACL) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigACL) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigACL := _ConfigACL{} + + err = json.Unmarshal(bytes, &varConfigACL) + + if err != nil { + return err + } + + *o = ConfigACL(varConfigACL) + + return err +} + type NullableConfigACL struct { value *ConfigACL isSet bool diff --git a/dns_config/model_config_acl_item.go b/dns_config/model_config_acl_item.go index 56a0482..9f21fd9 100644 --- a/dns_config/model_config_acl_item.go +++ b/dns_config/model_config_acl_item.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigACLItem type satisfies the MappedNullable interface at compile time @@ -30,6 +31,8 @@ type ConfigACLItem struct { TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` } +type _ConfigACLItem ConfigACLItem + // NewConfigACLItem instantiates a new ConfigACLItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -217,6 +220,42 @@ func (o ConfigACLItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigACLItem) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + "element", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigACLItem := _ConfigACLItem{} + + err = json.Unmarshal(bytes, &varConfigACLItem) + + if err != nil { + return err + } + + *o = ConfigACLItem(varConfigACLItem) + + return err +} + type NullableConfigACLItem struct { value *ConfigACLItem isSet bool diff --git a/dns_config/model_config_auth_nsg.go b/dns_config/model_config_auth_nsg.go index 86e2519..b0a1228 100644 --- a/dns_config/model_config_auth_nsg.go +++ b/dns_config/model_config_auth_nsg.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigAuthNSG type satisfies the MappedNullable interface at compile time @@ -37,6 +38,8 @@ type ConfigAuthNSG struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigAuthNSG ConfigAuthNSG + // NewConfigAuthNSG instantiates a new ConfigAuthNSG object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -338,6 +341,41 @@ func (o ConfigAuthNSG) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigAuthNSG) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigAuthNSG := _ConfigAuthNSG{} + + err = json.Unmarshal(bytes, &varConfigAuthNSG) + + if err != nil { + return err + } + + *o = ConfigAuthNSG(varConfigAuthNSG) + + return err +} + type NullableConfigAuthNSG struct { value *ConfigAuthNSG isSet bool diff --git a/dns_config/model_config_bulk_copy_view.go b/dns_config/model_config_bulk_copy_view.go index d8bbec7..b9dc6f3 100644 --- a/dns_config/model_config_bulk_copy_view.go +++ b/dns_config/model_config_bulk_copy_view.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigBulkCopyView type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type ConfigBulkCopyView struct { Target string `json:"target"` } +type _ConfigBulkCopyView ConfigBulkCopyView + // NewConfigBulkCopyView instantiates a new ConfigBulkCopyView object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -289,6 +292,42 @@ func (o ConfigBulkCopyView) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigBulkCopyView) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "resources", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigBulkCopyView := _ConfigBulkCopyView{} + + err = json.Unmarshal(bytes, &varConfigBulkCopyView) + + if err != nil { + return err + } + + *o = ConfigBulkCopyView(varConfigBulkCopyView) + + return err +} + type NullableConfigBulkCopyView struct { value *ConfigBulkCopyView isSet bool diff --git a/dns_config/model_config_copy_auth_zone.go b/dns_config/model_config_copy_auth_zone.go index 7994869..1674547 100644 --- a/dns_config/model_config_copy_auth_zone.go +++ b/dns_config/model_config_copy_auth_zone.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigCopyAuthZone type satisfies the MappedNullable interface at compile time @@ -39,6 +40,8 @@ type ConfigCopyAuthZone struct { TargetView string `json:"target_view"` } +type _ConfigCopyAuthZone ConfigCopyAuthZone + // NewConfigCopyAuthZone instantiates a new ConfigCopyAuthZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -375,6 +378,41 @@ func (o ConfigCopyAuthZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigCopyAuthZone) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigCopyAuthZone := _ConfigCopyAuthZone{} + + err = json.Unmarshal(bytes, &varConfigCopyAuthZone) + + if err != nil { + return err + } + + *o = ConfigCopyAuthZone(varConfigCopyAuthZone) + + return err +} + type NullableConfigCopyAuthZone struct { value *ConfigCopyAuthZone isSet bool diff --git a/dns_config/model_config_copy_forward_zone.go b/dns_config/model_config_copy_forward_zone.go index 98b8fb0..e1268bd 100644 --- a/dns_config/model_config_copy_forward_zone.go +++ b/dns_config/model_config_copy_forward_zone.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigCopyForwardZone type satisfies the MappedNullable interface at compile time @@ -39,6 +40,8 @@ type ConfigCopyForwardZone struct { TargetView string `json:"target_view"` } +type _ConfigCopyForwardZone ConfigCopyForwardZone + // NewConfigCopyForwardZone instantiates a new ConfigCopyForwardZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -375,6 +378,41 @@ func (o ConfigCopyForwardZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigCopyForwardZone) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigCopyForwardZone := _ConfigCopyForwardZone{} + + err = json.Unmarshal(bytes, &varConfigCopyForwardZone) + + if err != nil { + return err + } + + *o = ConfigCopyForwardZone(varConfigCopyForwardZone) + + return err +} + type NullableConfigCopyForwardZone struct { value *ConfigCopyForwardZone isSet bool diff --git a/dns_config/model_config_delegation_server.go b/dns_config/model_config_delegation_server.go index 32171bb..af29421 100644 --- a/dns_config/model_config_delegation_server.go +++ b/dns_config/model_config_delegation_server.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigDelegationServer type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type ConfigDelegationServer struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigDelegationServer ConfigDelegationServer + // NewConfigDelegationServer instantiates a new ConfigDelegationServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -153,6 +156,41 @@ func (o ConfigDelegationServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigDelegationServer) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigDelegationServer := _ConfigDelegationServer{} + + err = json.Unmarshal(bytes, &varConfigDelegationServer) + + if err != nil { + return err + } + + *o = ConfigDelegationServer(varConfigDelegationServer) + + return err +} + type NullableConfigDelegationServer struct { value *ConfigDelegationServer isSet bool diff --git a/dns_config/model_config_ecs_zone.go b/dns_config/model_config_ecs_zone.go index ea54ad5..42b90c0 100644 --- a/dns_config/model_config_ecs_zone.go +++ b/dns_config/model_config_ecs_zone.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigECSZone type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type ConfigECSZone struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigECSZone ConfigECSZone + // NewConfigECSZone instantiates a new ConfigECSZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o ConfigECSZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigECSZone) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigECSZone := _ConfigECSZone{} + + err = json.Unmarshal(bytes, &varConfigECSZone) + + if err != nil { + return err + } + + *o = ConfigECSZone(varConfigECSZone) + + return err +} + type NullableConfigECSZone struct { value *ConfigECSZone isSet bool diff --git a/dns_config/model_config_external_primary.go b/dns_config/model_config_external_primary.go index a57a1c8..1e4addb 100644 --- a/dns_config/model_config_external_primary.go +++ b/dns_config/model_config_external_primary.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigExternalPrimary type satisfies the MappedNullable interface at compile time @@ -34,6 +35,8 @@ type ConfigExternalPrimary struct { Type string `json:"type"` } +type _ConfigExternalPrimary ConfigExternalPrimary + // NewConfigExternalPrimary instantiates a new ConfigExternalPrimary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -300,6 +303,41 @@ func (o ConfigExternalPrimary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigExternalPrimary) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigExternalPrimary := _ConfigExternalPrimary{} + + err = json.Unmarshal(bytes, &varConfigExternalPrimary) + + if err != nil { + return err + } + + *o = ConfigExternalPrimary(varConfigExternalPrimary) + + return err +} + type NullableConfigExternalPrimary struct { value *ConfigExternalPrimary isSet bool diff --git a/dns_config/model_config_external_secondary.go b/dns_config/model_config_external_secondary.go index df6480e..e4bfe9d 100644 --- a/dns_config/model_config_external_secondary.go +++ b/dns_config/model_config_external_secondary.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigExternalSecondary type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type ConfigExternalSecondary struct { TsigKey *ConfigTSIGKey `json:"tsig_key,omitempty"` } +type _ConfigExternalSecondary ConfigExternalSecondary + // NewConfigExternalSecondary instantiates a new ConfigExternalSecondary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -254,6 +257,42 @@ func (o ConfigExternalSecondary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigExternalSecondary) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigExternalSecondary := _ConfigExternalSecondary{} + + err = json.Unmarshal(bytes, &varConfigExternalSecondary) + + if err != nil { + return err + } + + *o = ConfigExternalSecondary(varConfigExternalSecondary) + + return err +} + type NullableConfigExternalSecondary struct { value *ConfigExternalSecondary isSet bool diff --git a/dns_config/model_config_forward_nsg.go b/dns_config/model_config_forward_nsg.go index 6c75052..a3c8661 100644 --- a/dns_config/model_config_forward_nsg.go +++ b/dns_config/model_config_forward_nsg.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigForwardNSG type satisfies the MappedNullable interface at compile time @@ -39,6 +40,8 @@ type ConfigForwardNSG struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigForwardNSG ConfigForwardNSG + // NewConfigForwardNSG instantiates a new ConfigForwardNSG object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -375,6 +378,41 @@ func (o ConfigForwardNSG) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigForwardNSG) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigForwardNSG := _ConfigForwardNSG{} + + err = json.Unmarshal(bytes, &varConfigForwardNSG) + + if err != nil { + return err + } + + *o = ConfigForwardNSG(varConfigForwardNSG) + + return err +} + type NullableConfigForwardNSG struct { value *ConfigForwardNSG isSet bool diff --git a/dns_config/model_config_forwarder.go b/dns_config/model_config_forwarder.go index 44684ac..187e1b0 100644 --- a/dns_config/model_config_forwarder.go +++ b/dns_config/model_config_forwarder.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigForwarder type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type ConfigForwarder struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigForwarder ConfigForwarder + // NewConfigForwarder instantiates a new ConfigForwarder object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o ConfigForwarder) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigForwarder) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigForwarder := _ConfigForwarder{} + + err = json.Unmarshal(bytes, &varConfigForwarder) + + if err != nil { + return err + } + + *o = ConfigForwarder(varConfigForwarder) + + return err +} + type NullableConfigForwarder struct { value *ConfigForwarder isSet bool diff --git a/dns_config/model_config_global.go b/dns_config/model_config_global.go index 76ca4ff..91b7e1c 100644 --- a/dns_config/model_config_global.go +++ b/dns_config/model_config_global.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigGlobal type satisfies the MappedNullable interface at compile time @@ -109,6 +110,8 @@ type ConfigGlobal struct { ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } +type _ConfigGlobal ConfigGlobal + // NewConfigGlobal instantiates a new ConfigGlobal object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1705,6 +1708,41 @@ func (o ConfigGlobal) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigGlobal) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigGlobal := _ConfigGlobal{} + + err = json.Unmarshal(bytes, &varConfigGlobal) + + if err != nil { + return err + } + + *o = ConfigGlobal(varConfigGlobal) + + return err +} + type NullableConfigGlobal struct { value *ConfigGlobal isSet bool diff --git a/dns_config/model_config_internal_secondary.go b/dns_config/model_config_internal_secondary.go index 0a83134..479d478 100644 --- a/dns_config/model_config_internal_secondary.go +++ b/dns_config/model_config_internal_secondary.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigInternalSecondary type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ type ConfigInternalSecondary struct { Host string `json:"host"` } +type _ConfigInternalSecondary ConfigInternalSecondary + // NewConfigInternalSecondary instantiates a new ConfigInternalSecondary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +82,41 @@ func (o ConfigInternalSecondary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigInternalSecondary) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "host", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigInternalSecondary := _ConfigInternalSecondary{} + + err = json.Unmarshal(bytes, &varConfigInternalSecondary) + + if err != nil { + return err + } + + *o = ConfigInternalSecondary(varConfigInternalSecondary) + + return err +} + type NullableConfigInternalSecondary struct { value *ConfigInternalSecondary isSet bool diff --git a/dns_config/model_config_kerberos_key.go b/dns_config/model_config_kerberos_key.go index a477694..8e15460 100644 --- a/dns_config/model_config_kerberos_key.go +++ b/dns_config/model_config_kerberos_key.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigKerberosKey type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type ConfigKerberosKey struct { Version *int64 `json:"version,omitempty"` } +type _ConfigKerberosKey ConfigKerberosKey + // NewConfigKerberosKey instantiates a new ConfigKerberosKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +267,41 @@ func (o ConfigKerberosKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigKerberosKey) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigKerberosKey := _ConfigKerberosKey{} + + err = json.Unmarshal(bytes, &varConfigKerberosKey) + + if err != nil { + return err + } + + *o = ConfigKerberosKey(varConfigKerberosKey) + + return err +} + type NullableConfigKerberosKey struct { value *ConfigKerberosKey isSet bool diff --git a/dns_config/model_config_lbdn.go b/dns_config/model_config_lbdn.go index a60ac09..b751994 100644 --- a/dns_config/model_config_lbdn.go +++ b/dns_config/model_config_lbdn.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigLBDN type satisfies the MappedNullable interface at compile time @@ -39,6 +40,8 @@ type ConfigLBDN struct { View string `json:"view"` } +type _ConfigLBDN ConfigLBDN + // NewConfigLBDN instantiates a new ConfigLBDN object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -401,6 +404,42 @@ func (o ConfigLBDN) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigLBDN) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigLBDN := _ConfigLBDN{} + + err = json.Unmarshal(bytes, &varConfigLBDN) + + if err != nil { + return err + } + + *o = ConfigLBDN(varConfigLBDN) + + return err +} + type NullableConfigLBDN struct { value *ConfigLBDN isSet bool diff --git a/dns_config/model_config_root_ns.go b/dns_config/model_config_root_ns.go index 3420c41..2280c0b 100644 --- a/dns_config/model_config_root_ns.go +++ b/dns_config/model_config_root_ns.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigRootNS type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type ConfigRootNS struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigRootNS ConfigRootNS + // NewConfigRootNS instantiates a new ConfigRootNS object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o ConfigRootNS) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigRootNS) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigRootNS := _ConfigRootNS{} + + err = json.Unmarshal(bytes, &varConfigRootNS) + + if err != nil { + return err + } + + *o = ConfigRootNS(varConfigRootNS) + + return err +} + type NullableConfigRootNS struct { value *ConfigRootNS isSet bool diff --git a/dns_config/model_config_server.go b/dns_config/model_config_server.go index d671625..7cd1c16 100644 --- a/dns_config/model_config_server.go +++ b/dns_config/model_config_server.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" "time" ) @@ -119,6 +120,8 @@ type ConfigServer struct { Views []ConfigDisplayView `json:"views,omitempty"` } +type _ConfigServer ConfigServer + // NewConfigServer instantiates a new ConfigServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1855,6 +1858,41 @@ func (o ConfigServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigServer) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigServer := _ConfigServer{} + + err = json.Unmarshal(bytes, &varConfigServer) + + if err != nil { + return err + } + + *o = ConfigServer(varConfigServer) + + return err +} + type NullableConfigServer struct { value *ConfigServer isSet bool diff --git a/dns_config/model_config_sort_list_item.go b/dns_config/model_config_sort_list_item.go index 2fca3ca..60151b0 100644 --- a/dns_config/model_config_sort_list_item.go +++ b/dns_config/model_config_sort_list_item.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigSortListItem type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type ConfigSortListItem struct { Source *string `json:"source,omitempty"` } +type _ConfigSortListItem ConfigSortListItem + // NewConfigSortListItem instantiates a new ConfigSortListItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -190,6 +193,41 @@ func (o ConfigSortListItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigSortListItem) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "element", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigSortListItem := _ConfigSortListItem{} + + err = json.Unmarshal(bytes, &varConfigSortListItem) + + if err != nil { + return err + } + + *o = ConfigSortListItem(varConfigSortListItem) + + return err +} + type NullableConfigSortListItem struct { value *ConfigSortListItem isSet bool diff --git a/dns_config/model_config_trust_anchor.go b/dns_config/model_config_trust_anchor.go index eb1d56b..320bd67 100644 --- a/dns_config/model_config_trust_anchor.go +++ b/dns_config/model_config_trust_anchor.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" ) // checks if the ConfigTrustAnchor type satisfies the MappedNullable interface at compile time @@ -30,6 +31,8 @@ type ConfigTrustAnchor struct { Zone string `json:"zone"` } +type _ConfigTrustAnchor ConfigTrustAnchor + // NewConfigTrustAnchor instantiates a new ConfigTrustAnchor object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -208,6 +211,43 @@ func (o ConfigTrustAnchor) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigTrustAnchor) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "algorithm", + "public_key", + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigTrustAnchor := _ConfigTrustAnchor{} + + err = json.Unmarshal(bytes, &varConfigTrustAnchor) + + if err != nil { + return err + } + + *o = ConfigTrustAnchor(varConfigTrustAnchor) + + return err +} + type NullableConfigTrustAnchor struct { value *ConfigTrustAnchor isSet bool diff --git a/dns_config/model_config_view.go b/dns_config/model_config_view.go index 5d21d3e..b3d5289 100644 --- a/dns_config/model_config_view.go +++ b/dns_config/model_config_view.go @@ -12,6 +12,7 @@ package dns_config import ( "encoding/json" + "fmt" "time" ) @@ -115,6 +116,8 @@ type ConfigView struct { ZoneAuthority *ConfigZoneAuthority `json:"zone_authority,omitempty"` } +type _ConfigView ConfigView + // NewConfigView instantiates a new ConfigView object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1816,6 +1819,41 @@ func (o ConfigView) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigView) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigView := _ConfigView{} + + err = json.Unmarshal(bytes, &varConfigView) + + if err != nil { + return err + } + + *o = ConfigView(varConfigView) + + return err +} + type NullableConfigView struct { value *ConfigView isSet bool diff --git a/dns_config/utils.go b/dns_config/utils.go index a23d0eb..092960a 100644 --- a/dns_config/utils.go +++ b/dns_config/utils.go @@ -1,7 +1,7 @@ /* DNS Configuration API -The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. +The DNS application is a BloxOne DDI service that provides cloud-based DNS configuration with on-prem host serving DNS protocol. It is part of the full-featured BloxOne DDI solution that enables customers the ability to deploy large numbers of protocol servers in the delivery of DNS and DHCP throughout their enterprise network. API version: v1 */ diff --git a/dns_data/.openapi-generator/VERSION b/dns_data/.openapi-generator/VERSION index 73a86b1..3769235 100644 --- a/dns_data/.openapi-generator/VERSION +++ b/dns_data/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/dns_data/README.md b/dns_data/README.md index c915354..b121beb 100644 --- a/dns_data/README.md +++ b/dns_data/README.md @@ -38,7 +38,7 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_data.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), dns_data.ContextServerIndex, 1) @@ -46,7 +46,7 @@ ctx := context.WithValue(context.Background(), dns_data.ContextServerIndex, 1) ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_data.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), dns_data.ContextServerVariables, map[string]string{ @@ -60,7 +60,7 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_data.ContextOperationServerIndices` and `dns_data.ContextOperationServerVariables` context maps. ```golang ctx := context.WithValue(context.Background(), dns_data.ContextOperationServerIndices, map[string]int{ @@ -118,8 +118,8 @@ Example ```golang auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_data.ContextAPIKeys, + map[string]dns_data.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_data/api_record.go b/dns_data/api_record.go index db18237..5eaee8e 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. @@ -124,6 +118,7 @@ type ApiRecordCreateRequest struct { ctx context.Context ApiService RecordAPI body *DataRecord + inherit *string } func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { @@ -131,6 +126,12 @@ func (r ApiRecordCreateRequest) Body(body DataRecord) ApiRecordCreateRequest { return r } +// This parameter is used for getting inheritance_sources. +func (r ApiRecordCreateRequest) Inherit(inherit string) ApiRecordCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiRecordCreateRequest) Execute() (*DataCreateRecordResponse, *http.Response, error) { return r.ApiService.RecordCreateExecute(r) } @@ -141,8 +142,8 @@ RecordCreate Create the DNS resource record. Use this method to create a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordCreateRequest */ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequest { return ApiRecordCreateRequest{ @@ -152,8 +153,7 @@ func (a *RecordAPIService) RecordCreate(ctx context.Context) ApiRecordCreateRequ } // Execute executes the request -// -// @return DataCreateRecordResponse +// @return DataCreateRecordResponse func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataCreateRecordResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -176,6 +176,9 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -193,6 +196,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 { @@ -236,7 +247,6 @@ func (a *RecordAPIService) RecordCreateExecute(r ApiRecordCreateRequest) (*DataC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -256,9 +266,9 @@ RecordDelete Move the DNS resource record to recycle bin. Use this method to move a DNS __Record__ object to the recycle bin. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordDeleteRequest */ func (a *RecordAPIService) RecordDelete(ctx context.Context, id string) ApiRecordDeleteRequest { return ApiRecordDeleteRequest{ @@ -355,39 +365,40 @@ type ApiRecordListRequest struct { orderBy *string tfilter *string torderBy *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordListRequest) Fields(fields string) ApiRecordListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRecordListRequest) Filter(filter string) ApiRecordListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRecordListRequest) Offset(offset int32) ApiRecordListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRecordListRequest) Limit(limit int32) ApiRecordListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRecordListRequest) PageToken(pageToken string) ApiRecordListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRecordListRequest) OrderBy(orderBy string) ApiRecordListRequest { r.orderBy = &orderBy return r @@ -405,6 +416,12 @@ func (r ApiRecordListRequest) TorderBy(torderBy string) ApiRecordListRequest { return r } +// This parameter is used for getting inheritance_sources. +func (r ApiRecordListRequest) Inherit(inherit string) ApiRecordListRequest { + r.inherit = &inherit + return r +} + func (r ApiRecordListRequest) Execute() (*DataListRecordResponse, *http.Response, error) { return r.ApiService.RecordListExecute(r) } @@ -415,8 +432,8 @@ RecordList Retrieve DNS resource records. Use this method to retrieve DNS __Record__ objects. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRecordListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRecordListRequest */ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest { return ApiRecordListRequest{ @@ -426,8 +443,7 @@ func (a *RecordAPIService) RecordList(ctx context.Context) ApiRecordListRequest } // Execute executes the request -// -// @return DataListRecordResponse +// @return DataListRecordResponse func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListRecordResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -471,6 +487,9 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR if r.torderBy != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_torder_by", r.torderBy, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -529,7 +548,6 @@ func (a *RecordAPIService) RecordListExecute(r ApiRecordListRequest) (*DataListR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -538,14 +556,21 @@ type ApiRecordReadRequest struct { ApiService RecordAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRecordReadRequest) Fields(fields string) ApiRecordReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. +func (r ApiRecordReadRequest) Inherit(inherit string) ApiRecordReadRequest { + r.inherit = &inherit + return r +} + func (r ApiRecordReadRequest) Execute() (*DataReadRecordResponse, *http.Response, error) { return r.ApiService.RecordReadExecute(r) } @@ -556,9 +581,9 @@ RecordRead Retrieve the DNS resource record. Use this method to retrieve a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordReadRequest */ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordReadRequest { return ApiRecordReadRequest{ @@ -569,8 +594,7 @@ func (a *RecordAPIService) RecordRead(ctx context.Context, id string) ApiRecordR } // Execute executes the request -// -// @return DataReadRecordResponse +// @return DataReadRecordResponse func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadRecordResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -594,6 +618,9 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -652,7 +679,6 @@ func (a *RecordAPIService) RecordReadExecute(r ApiRecordReadRequest) (*DataReadR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -678,9 +704,9 @@ RecordSOASerialIncrement Increment serial number for the SOA record. Use this method to increment the serial number for an SOA (Start of Authority) _Record_ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordSOASerialIncrementRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordSOASerialIncrementRequest */ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id string) ApiRecordSOASerialIncrementRequest { return ApiRecordSOASerialIncrementRequest{ @@ -691,8 +717,7 @@ func (a *RecordAPIService) RecordSOASerialIncrement(ctx context.Context, id stri } // Execute executes the request -// -// @return DataSOASerialIncrementResponse +// @return DataSOASerialIncrementResponse func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialIncrementRequest) (*DataSOASerialIncrementResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -776,7 +801,6 @@ func (a *RecordAPIService) RecordSOASerialIncrementExecute(r ApiRecordSOASerialI newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -785,6 +809,7 @@ type ApiRecordUpdateRequest struct { ApiService RecordAPI id string body *DataRecord + inherit *string } func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { @@ -792,6 +817,12 @@ func (r ApiRecordUpdateRequest) Body(body DataRecord) ApiRecordUpdateRequest { return r } +// This parameter is used for getting inheritance_sources. +func (r ApiRecordUpdateRequest) Inherit(inherit string) ApiRecordUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiRecordUpdateRequest) Execute() (*DataUpdateRecordResponse, *http.Response, error) { return r.ApiService.RecordUpdateExecute(r) } @@ -802,9 +833,9 @@ RecordUpdate Update the DNS resource record. Use this method to update a DNS __Record__ object. A __Record__ object represents a DNS resource record in an authoritative zone. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRecordUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRecordUpdateRequest */ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecordUpdateRequest { return ApiRecordUpdateRequest{ @@ -815,8 +846,7 @@ func (a *RecordAPIService) RecordUpdate(ctx context.Context, id string) ApiRecor } // Execute executes the request -// -// @return DataUpdateRecordResponse +// @return DataUpdateRecordResponse func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataUpdateRecordResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -840,6 +870,9 @@ func (a *RecordAPIService) RecordUpdateExecute(r ApiRecordUpdateRequest) (*DataU return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -857,6 +890,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 { @@ -900,6 +941,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/dns_data/client.go b/dns_data/client.go index 5c1c0ee..086bb57 100644 --- a/dns_data/client.go +++ b/dns_data/client.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package dns_data import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,7 +19,7 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DNS Data API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services RecordAPI RecordAPI @@ -29,7 +29,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.RecordAPI = (*RecordAPIService)(&c.Common) diff --git a/dns_data/docs/Inheritance2InheritedUInt32.md b/dns_data/docs/Inheritance2InheritedUInt32.md index 2420707..ebe5512 100644 --- a/dns_data/docs/Inheritance2InheritedUInt32.md +++ b/dns_data/docs/Inheritance2InheritedUInt32.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **int64** | The inherited value. | [optional] [readonly] ## Methods diff --git a/dns_data/docs/RecordAPI.md b/dns_data/docs/RecordAPI.md index ead5a1c..9a09e0e 100644 --- a/dns_data/docs/RecordAPI.md +++ b/dns_data/docs/RecordAPI.md @@ -15,7 +15,7 @@ Method | HTTP request | Description ## RecordCreate -> DataCreateRecordResponse RecordCreate(ctx).Body(body).Execute() +> DataCreateRecordResponse RecordCreate(ctx).Body(body).Inherit(inherit).Execute() Create the DNS resource record. @@ -35,10 +35,11 @@ import ( func main() { body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -60,6 +61,7 @@ Other parameters are passed through a pointer to a apiRecordCreateRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**DataRecord**](DataRecord.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. | ### Return type @@ -149,7 +151,7 @@ Name | Type | Description | Notes ## RecordList -> DataListRecordResponse RecordList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() +> DataListRecordResponse RecordList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() Retrieve DNS resource records. @@ -176,10 +178,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -208,6 +211,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **tfilter** | **string** | This parameter is used for filtering by tags. | **torderBy** | **string** | This parameter is used for sorting by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. | ### Return type @@ -229,7 +233,7 @@ Name | Type | Description | Notes ## RecordRead -> DataReadRecordResponse RecordRead(ctx, id).Fields(fields).Execute() +> DataReadRecordResponse RecordRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the DNS resource record. @@ -250,10 +254,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -280,6 +285,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. | ### Return type @@ -373,7 +379,7 @@ Name | Type | Description | Notes ## RecordUpdate -> DataUpdateRecordResponse RecordUpdate(ctx, id).Body(body).Execute() +> DataUpdateRecordResponse RecordUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the DNS resource record. @@ -394,10 +400,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -424,6 +431,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**DataRecord**](DataRecord.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. | ### Return type diff --git a/dns_data/model_data_record.go b/dns_data/model_data_record.go index 35e1911..3021f83 100644 --- a/dns_data/model_data_record.go +++ b/dns_data/model_data_record.go @@ -12,6 +12,7 @@ package dns_data import ( "encoding/json" + "fmt" "time" ) @@ -73,6 +74,8 @@ type DataRecord struct { Zone *string `json:"zone,omitempty"` } +type _DataRecord DataRecord + // NewDataRecord instantiates a new DataRecord object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1004,6 +1007,41 @@ func (o DataRecord) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DataRecord) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rdata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataRecord := _DataRecord{} + + err = json.Unmarshal(bytes, &varDataRecord) + + if err != nil { + return err + } + + *o = DataRecord(varDataRecord) + + return err +} + type NullableDataRecord struct { value *DataRecord isSet bool diff --git a/dns_data/utils.go b/dns_data/utils.go index d20341f..f7a1eb6 100644 --- a/dns_data/utils.go +++ b/dns_data/utils.go @@ -1,7 +1,7 @@ /* DNS Data API -The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DNS Data is a BloxOne DDI service providing primary authoritative zone support. DNS Data is authoritative for all DNS resource records and is acting as a primary DNS server. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ diff --git a/infra_mgmt/.openapi-generator/VERSION b/infra_mgmt/.openapi-generator/VERSION index 73a86b1..3769235 100644 --- a/infra_mgmt/.openapi-generator/VERSION +++ b/infra_mgmt/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/infra_mgmt/README.md b/infra_mgmt/README.md index 7a82978..5b073fb 100644 --- a/infra_mgmt/README.md +++ b/infra_mgmt/README.md @@ -85,7 +85,7 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `infra_mgmt.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerIndex, 1) @@ -93,7 +93,7 @@ ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerIndex, 1) ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `infra_mgmt.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerVariables, map[string]string{ @@ -107,7 +107,7 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `infra_mgmt.ContextOperationServerIndices` and `infra_mgmt.ContextOperationServerVariables` context maps. ```golang ctx := context.WithValue(context.Background(), infra_mgmt.ContextOperationServerIndices, map[string]int{ @@ -194,8 +194,8 @@ Example ```golang auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + infra_mgmt.ContextAPIKeys, + map[string]infra_mgmt.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/infra_mgmt/api_detail.go b/infra_mgmt/api_detail.go index cb3d549..105048f 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. @@ -63,37 +61,37 @@ type ApiDetailHostsListRequest struct { torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDetailHostsListRequest) Filter(filter string) ApiDetailHostsListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDetailHostsListRequest) OrderBy(orderBy string) ApiDetailHostsListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDetailHostsListRequest) Offset(offset int32) ApiDetailHostsListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDetailHostsListRequest) Limit(limit int32) ApiDetailHostsListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDetailHostsListRequest) PageToken(pageToken string) ApiDetailHostsListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDetailHostsListRequest) Fields(fields string) ApiDetailHostsListRequest { r.fields = &fields return r @@ -118,8 +116,8 @@ func (r ApiDetailHostsListRequest) Execute() (*InfraListDetailHostsResponse, *ht /* DetailHostsList List all the Hosts along with its associated Services (applications). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailHostsListRequest */ func (a *DetailAPIService) DetailHostsList(ctx context.Context) ApiDetailHostsListRequest { return ApiDetailHostsListRequest{ @@ -129,8 +127,7 @@ func (a *DetailAPIService) DetailHostsList(ctx context.Context) ApiDetailHostsLi } // Execute executes the request -// -// @return InfraListDetailHostsResponse +// @return InfraListDetailHostsResponse func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) (*InfraListDetailHostsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -232,7 +229,6 @@ func (a *DetailAPIService) DetailHostsListExecute(r ApiDetailHostsListRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -249,37 +245,37 @@ type ApiDetailServicesListRequest struct { torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDetailServicesListRequest) Filter(filter string) ApiDetailServicesListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDetailServicesListRequest) OrderBy(orderBy string) ApiDetailServicesListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDetailServicesListRequest) Offset(offset int32) ApiDetailServicesListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDetailServicesListRequest) Limit(limit int32) ApiDetailServicesListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDetailServicesListRequest) PageToken(pageToken string) ApiDetailServicesListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDetailServicesListRequest) Fields(fields string) ApiDetailServicesListRequest { r.fields = &fields return r @@ -304,8 +300,8 @@ func (r ApiDetailServicesListRequest) Execute() (*InfraListDetailServicesRespons /* DetailServicesList List all the Services (applications) along with its associated Hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDetailServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDetailServicesListRequest */ func (a *DetailAPIService) DetailServicesList(ctx context.Context) ApiDetailServicesListRequest { return ApiDetailServicesListRequest{ @@ -315,8 +311,7 @@ func (a *DetailAPIService) DetailServicesList(ctx context.Context) ApiDetailServ } // Execute executes the request -// -// @return InfraListDetailServicesResponse +// @return InfraListDetailServicesResponse func (a *DetailAPIService) DetailServicesListExecute(r ApiDetailServicesListRequest) (*InfraListDetailServicesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -418,6 +413,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..5fa7d27 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. @@ -186,8 +177,8 @@ Validation: - "ids" is required. - "tags" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsAssignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsAssignTagsRequest */ func (a *HostsAPIService) HostsAssignTags(ctx context.Context) ApiHostsAssignTagsRequest { return ApiHostsAssignTagsRequest{ @@ -197,8 +188,7 @@ func (a *HostsAPIService) HostsAssignTags(ctx context.Context) ApiHostsAssignTag } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -238,6 +228,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 +279,6 @@ func (a *HostsAPIService) HostsAssignTagsExecute(r ApiHostsAssignTagsRequest) (m newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -306,8 +303,8 @@ HostsCreate Create a Host resource. Validation: - "display_name" is required and should be unique. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsCreateRequest */ func (a *HostsAPIService) HostsCreate(ctx context.Context) ApiHostsCreateRequest { return ApiHostsCreateRequest{ @@ -317,8 +314,7 @@ func (a *HostsAPIService) HostsCreate(ctx context.Context) ApiHostsCreateRequest } // Execute executes the request -// -// @return InfraCreateHostResponse +// @return InfraCreateHostResponse func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCreateHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -358,6 +354,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 +405,6 @@ func (a *HostsAPIService) HostsCreateExecute(r ApiHostsCreateRequest) (*InfraCre newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -421,9 +424,9 @@ HostsDelete Delete a Host resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDeleteRequest */ func (a *HostsAPIService) HostsDelete(ctx context.Context, id string) ApiHostsDeleteRequest { return ApiHostsDeleteRequest{ @@ -530,9 +533,9 @@ HostsDisconnect Disconnect a Host by resource ID. The user can disconnect the host from the cloud (for example, if in case a host is compromised). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsDisconnectRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsDisconnectRequest */ func (a *HostsAPIService) HostsDisconnect(ctx context.Context, id string) ApiHostsDisconnectRequest { return ApiHostsDisconnectRequest{ @@ -543,8 +546,7 @@ func (a *HostsAPIService) HostsDisconnect(ctx context.Context, id string) ApiHos } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -628,7 +630,6 @@ func (a *HostsAPIService) HostsDisconnectExecute(r ApiHostsDisconnectRequest) (m newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -645,37 +646,37 @@ type ApiHostsListRequest struct { torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHostsListRequest) Filter(filter string) ApiHostsListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHostsListRequest) OrderBy(orderBy string) ApiHostsListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHostsListRequest) Offset(offset int32) ApiHostsListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHostsListRequest) Limit(limit int32) ApiHostsListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHostsListRequest) PageToken(pageToken string) ApiHostsListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHostsListRequest) Fields(fields string) ApiHostsListRequest { r.fields = &fields return r @@ -700,8 +701,8 @@ func (r ApiHostsListRequest) Execute() (*InfraListHostResponse, *http.Response, /* HostsList List all the Host resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsListRequest */ func (a *HostsAPIService) HostsList(ctx context.Context) ApiHostsListRequest { return ApiHostsListRequest{ @@ -711,8 +712,7 @@ func (a *HostsAPIService) HostsList(ctx context.Context) ApiHostsListRequest { } // Execute executes the request -// -// @return InfraListHostResponse +// @return InfraListHostResponse func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -814,7 +814,6 @@ func (a *HostsAPIService) HostsListExecute(r ApiHostsListRequest) (*InfraListHos newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -834,9 +833,9 @@ HostsRead Get a Host resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsReadRequest */ func (a *HostsAPIService) HostsRead(ctx context.Context, id string) ApiHostsReadRequest { return ApiHostsReadRequest{ @@ -847,8 +846,7 @@ func (a *HostsAPIService) HostsRead(ctx context.Context, id string) ApiHostsRead } // Execute executes the request -// -// @return InfraGetHostResponse +// @return InfraGetHostResponse func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -927,7 +925,6 @@ func (a *HostsAPIService) HostsReadExecute(r ApiHostsReadRequest) (*InfraGetHost newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -951,10 +948,10 @@ func (r ApiHostsReplaceRequest) Execute() (map[string]interface{}, *http.Respons /* HostsReplace Migrate a Host's configuration from one to another. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fromResourceId An application specific resource identity of a resource - @param toResourceId An application specific resource identity of a resource - @return ApiHostsReplaceRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fromResourceId An application specific resource identity of a resource + @param toResourceId An application specific resource identity of a resource + @return ApiHostsReplaceRequest */ func (a *HostsAPIService) HostsReplace(ctx context.Context, fromResourceId string, toResourceId string) ApiHostsReplaceRequest { return ApiHostsReplaceRequest{ @@ -966,8 +963,7 @@ func (a *HostsAPIService) HostsReplace(ctx context.Context, fromResourceId strin } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1052,7 +1048,6 @@ func (a *HostsAPIService) HostsReplaceExecute(r ApiHostsReplaceRequest) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1078,8 +1073,8 @@ Validation: - "ids" is required. - "keys" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHostsUnassignTagsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHostsUnassignTagsRequest */ func (a *HostsAPIService) HostsUnassignTags(ctx context.Context) ApiHostsUnassignTagsRequest { return ApiHostsUnassignTagsRequest{ @@ -1089,8 +1084,7 @@ func (a *HostsAPIService) HostsUnassignTags(ctx context.Context) ApiHostsUnassig } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1130,6 +1124,14 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest 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 { @@ -1173,7 +1175,6 @@ func (a *HostsAPIService) HostsUnassignTagsExecute(r ApiHostsUnassignTagsRequest newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1201,9 +1202,9 @@ Validation: - "display_name" is required and should be unique. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHostsUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHostsUpdateRequest */ func (a *HostsAPIService) HostsUpdate(ctx context.Context, id string) ApiHostsUpdateRequest { return ApiHostsUpdateRequest{ @@ -1214,8 +1215,7 @@ func (a *HostsAPIService) HostsUpdate(ctx context.Context, id string) ApiHostsUp } // Execute executes the request -// -// @return InfraUpdateHostResponse +// @return InfraUpdateHostResponse func (a *HostsAPIService) HostsUpdateExecute(r ApiHostsUpdateRequest) (*InfraUpdateHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut @@ -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..4bfd2de 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. @@ -141,8 +135,8 @@ ServicesApplications List applications (Service types) for a particular account. Used in order to retrieve available applications (Service types) for a particular account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesApplicationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesApplicationsRequest */ func (a *ServicesAPIService) ServicesApplications(ctx context.Context) ApiServicesApplicationsRequest { return ApiServicesApplicationsRequest{ @@ -152,8 +146,7 @@ func (a *ServicesAPIService) ServicesApplications(ctx context.Context) ApiServic } // Execute executes the request -// -// @return InfraApplicationsResponse +// @return InfraApplicationsResponse func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicationsRequest) (*InfraApplicationsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -234,7 +227,6 @@ func (a *ServicesAPIService) ServicesApplicationsExecute(r ApiServicesApplicatio newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -261,8 +253,8 @@ Validation: - "service_type" is required. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesCreateRequest */ func (a *ServicesAPIService) ServicesCreate(ctx context.Context) ApiServicesCreateRequest { return ApiServicesCreateRequest{ @@ -272,8 +264,7 @@ func (a *ServicesAPIService) ServicesCreate(ctx context.Context) ApiServicesCrea } // Execute executes the request -// -// @return InfraCreateServiceResponse +// @return InfraCreateServiceResponse func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) (*InfraCreateServiceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -313,6 +304,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 +355,6 @@ func (a *ServicesAPIService) ServicesCreateExecute(r ApiServicesCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -376,9 +374,9 @@ ServicesDelete Delete a Service resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesDeleteRequest */ func (a *ServicesAPIService) ServicesDelete(ctx context.Context, id string) ApiServicesDeleteRequest { return ApiServicesDeleteRequest{ @@ -477,37 +475,37 @@ type ApiServicesListRequest struct { torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServicesListRequest) Filter(filter string) ApiServicesListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServicesListRequest) OrderBy(orderBy string) ApiServicesListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServicesListRequest) Offset(offset int32) ApiServicesListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServicesListRequest) Limit(limit int32) ApiServicesListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServicesListRequest) PageToken(pageToken string) ApiServicesListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServicesListRequest) Fields(fields string) ApiServicesListRequest { r.fields = &fields return r @@ -532,8 +530,8 @@ func (r ApiServicesListRequest) Execute() (*InfraListServiceResponse, *http.Resp /* ServicesList List all the Service resources for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServicesListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServicesListRequest */ func (a *ServicesAPIService) ServicesList(ctx context.Context) ApiServicesListRequest { return ApiServicesListRequest{ @@ -543,8 +541,7 @@ func (a *ServicesAPIService) ServicesList(ctx context.Context) ApiServicesListRe } // Execute executes the request -// -// @return InfraListServiceResponse +// @return InfraListServiceResponse func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*InfraListServiceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -646,7 +643,6 @@ func (a *ServicesAPIService) ServicesListExecute(r ApiServicesListRequest) (*Inf newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -666,9 +662,9 @@ ServicesRead Read a Service resource. Validation: - "id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesReadRequest */ func (a *ServicesAPIService) ServicesRead(ctx context.Context, id string) ApiServicesReadRequest { return ApiServicesReadRequest{ @@ -679,8 +675,7 @@ func (a *ServicesAPIService) ServicesRead(ctx context.Context, id string) ApiSer } // Execute executes the request -// -// @return InfraGetServiceResponse +// @return InfraGetServiceResponse func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*InfraGetServiceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -759,7 +754,6 @@ func (a *ServicesAPIService) ServicesReadExecute(r ApiServicesReadRequest) (*Inf newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -788,9 +782,9 @@ Validation: - "service_type" is required. - "pool_id" is required. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServicesUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServicesUpdateRequest */ func (a *ServicesAPIService) ServicesUpdate(ctx context.Context, id string) ApiServicesUpdateRequest { return ApiServicesUpdateRequest{ @@ -801,8 +795,7 @@ func (a *ServicesAPIService) ServicesUpdate(ctx context.Context, id string) ApiS } // Execute executes the request -// -// @return InfraUpdateServiceResponse +// @return InfraUpdateServiceResponse func (a *ServicesAPIService) ServicesUpdateExecute(r ApiServicesUpdateRequest) (*InfraUpdateServiceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut @@ -843,6 +836,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 +887,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_mgmt/client.go b/infra_mgmt/client.go index 5f9de49..8b6562e 100644 --- a/infra_mgmt/client.go +++ b/infra_mgmt/client.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package infra_mgmt import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/infra/v1" @@ -19,11 +19,11 @@ var ServiceBasePath = "/api/infra/v1" // APIClient manages communication with the Infrastructure Management API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - DetailAPI DetailAPI - HostsAPI HostsAPI + DetailAPI DetailAPI + HostsAPI HostsAPI ServicesAPI ServicesAPI } @@ -31,7 +31,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.DetailAPI = (*DetailAPIService)(&c.Common) diff --git a/infra_mgmt/model_infra_host.go b/infra_mgmt/model_infra_host.go index 511d8d7..56a2d50 100644 --- a/infra_mgmt/model_infra_host.go +++ b/infra_mgmt/model_infra_host.go @@ -12,6 +12,7 @@ package infra_mgmt import ( "encoding/json" + "fmt" "time" ) @@ -69,6 +70,8 @@ type InfraHost struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _InfraHost InfraHost + // NewInfraHost instantiates a new InfraHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -930,6 +933,41 @@ func (o InfraHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *InfraHost) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "display_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInfraHost := _InfraHost{} + + err = json.Unmarshal(bytes, &varInfraHost) + + if err != nil { + return err + } + + *o = InfraHost(varInfraHost) + + return err +} + type NullableInfraHost struct { value *InfraHost isSet bool diff --git a/infra_mgmt/model_infra_service.go b/infra_mgmt/model_infra_service.go index 2ae3169..d3884a3 100644 --- a/infra_mgmt/model_infra_service.go +++ b/infra_mgmt/model_infra_service.go @@ -12,6 +12,7 @@ package infra_mgmt import ( "encoding/json" + "fmt" "time" ) @@ -46,6 +47,8 @@ type InfraService struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _InfraService InfraService + // NewInfraService instantiates a new InfraService object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -469,6 +472,43 @@ func (o InfraService) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *InfraService) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pool_id", + "service_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInfraService := _InfraService{} + + err = json.Unmarshal(bytes, &varInfraService) + + if err != nil { + return err + } + + *o = InfraService(varInfraService) + + return err +} + type NullableInfraService struct { value *InfraService isSet bool diff --git a/infra_mgmt/utils.go b/infra_mgmt/utils.go index 582297a..5c35153 100644 --- a/infra_mgmt/utils.go +++ b/infra_mgmt/utils.go @@ -1,7 +1,7 @@ /* Infrastructure Management API -The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- +The **Infrastructure Management API** provides a RESTful interface to manage Infrastructure Hosts and Services objects. The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field): | Service name | Service type | | ------ | ------ | | Access Authentication | authn | | Anycast | anycast | | Data Connector | cdc | | DHCP | dhcp | | DNS | dns | | DNS Forwarding Proxy | dfp | | NIOS Grid Connector | orpheus | | MS AD Sync | msad | | NTP | ntp | | BGP | bgp | | RIP | rip | | OSPF | ospf | --- ### Hosts API The Hosts API is used to manage the Infrastructure Host resources. These include various operations related to hosts such as viewing, creating, updating, replacing, disconnecting, and deleting Hosts. Management of Hosts is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Hosts tab. --- ### Services API The Services API is used to manage the Infrastructure Service resources (a.k.a. BloxOne applications). These include various operations related to hosts such as viewing, creating, updating, starting/stopping, configuring, and deleting Services. Management of Services is done from the Cloud Services Portal (CSP) by navigating to the Manage -> Infrastructure -> Services tab. --- ### Detail APIs The Detail APIs are read-only APIs used to list all the Infrastructure resources (Hosts and Services). Each resource record returned also contains information about its other associated resources and the status information for itself and the associated resource(s) (i.e., Host/Service status). --- API version: v1 */ diff --git a/infra_provision/.openapi-generator/VERSION b/infra_provision/.openapi-generator/VERSION index 73a86b1..3769235 100644 --- a/infra_provision/.openapi-generator/VERSION +++ b/infra_provision/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/infra_provision/README.md b/infra_provision/README.md index 725d160..1d3586d 100644 --- a/infra_provision/README.md +++ b/infra_provision/README.md @@ -36,7 +36,7 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `infra_provision.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), infra_provision.ContextServerIndex, 1) @@ -44,7 +44,7 @@ ctx := context.WithValue(context.Background(), infra_provision.ContextServerInde ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `infra_provision.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), infra_provision.ContextServerVariables, map[string]string{ @@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `infra_provision.ContextOperationServerIndices` and `infra_provision.ContextOperationServerVariables` context maps. ```golang ctx := context.WithValue(context.Background(), infra_provision.ContextOperationServerIndices, map[string]int{ @@ -127,8 +127,8 @@ Example ```golang auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + infra_provision.ContextAPIKeys, + map[string]infra_provision.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/infra_provision/api_ui_join_token.go b/infra_provision/api_ui_join_token.go index a84580c..c92d1b0 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. @@ -132,8 +126,8 @@ Validation: - "name" is required and should be unique. - "description" is optioanl. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenCreateRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenCreate(ctx context.Context) ApiUIJoinTokenCreateRequest { return ApiUIJoinTokenCreateRequest{ @@ -143,8 +137,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreate(ctx context.Context) ApiUIJoin } // Execute executes the request -// -// @return HostactivationCreateJoinTokenResponse +// @return HostactivationCreateJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateRequest) (*HostactivationCreateJoinTokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -184,6 +177,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 +228,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenCreateExecute(r ApiUIJoinTokenCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -244,9 +244,9 @@ func (r ApiUIJoinTokenDeleteRequest) Execute() (*http.Response, error) { /* UIJoinTokenDelete User can revoke the join token. Once revoked, it can not be used further. The join token record is preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenDeleteRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenDelete(ctx context.Context, id string) ApiUIJoinTokenDeleteRequest { return ApiUIJoinTokenDeleteRequest{ @@ -350,8 +350,8 @@ func (r ApiUIJoinTokenDeleteSetRequest) Execute() (*http.Response, error) { /* UIJoinTokenDeleteSet User can revoke a list of join tokens. Once revoked, join tokens can not be used further. The records are preserved forever. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenDeleteSetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenDeleteSetRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenDeleteSet(ctx context.Context) ApiUIJoinTokenDeleteSetRequest { return ApiUIJoinTokenDeleteSetRequest{ @@ -452,31 +452,31 @@ type ApiUIJoinTokenListRequest struct { torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiUIJoinTokenListRequest) Filter(filter string) ApiUIJoinTokenListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiUIJoinTokenListRequest) OrderBy(orderBy string) ApiUIJoinTokenListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiUIJoinTokenListRequest) Offset(offset int32) ApiUIJoinTokenListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiUIJoinTokenListRequest) Limit(limit int32) ApiUIJoinTokenListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiUIJoinTokenListRequest) PageToken(pageToken string) ApiUIJoinTokenListRequest { r.pageToken = &pageToken return r @@ -503,8 +503,8 @@ UIJoinTokenList User can list the join tokens for an account. Both active and revoked join tokens are listed by default. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUIJoinTokenListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUIJoinTokenListRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenList(ctx context.Context) ApiUIJoinTokenListRequest { return ApiUIJoinTokenListRequest{ @@ -514,8 +514,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenList(ctx context.Context) ApiUIJoinTo } // Execute executes the request -// -// @return HostactivationListJoinTokenResponse +// @return HostactivationListJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListRequest) (*HostactivationListJoinTokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -614,7 +613,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenListExecute(r ApiUIJoinTokenListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -625,7 +623,7 @@ type ApiUIJoinTokenReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiUIJoinTokenReadRequest) Fields(fields string) ApiUIJoinTokenReadRequest { r.fields = &fields return r @@ -638,9 +636,9 @@ func (r ApiUIJoinTokenReadRequest) Execute() (*HostactivationReadJoinTokenRespon /* UIJoinTokenRead User can get the join token providing its resource id in the parameter. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenReadRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenRead(ctx context.Context, id string) ApiUIJoinTokenReadRequest { return ApiUIJoinTokenReadRequest{ @@ -651,8 +649,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenRead(ctx context.Context, id string) } // Execute executes the request -// -// @return HostactivationReadJoinTokenResponse +// @return HostactivationReadJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadRequest) (*HostactivationReadJoinTokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -734,7 +731,6 @@ func (a *UIJoinTokenAPIService) UIJoinTokenReadExecute(r ApiUIJoinTokenReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -761,9 +757,9 @@ Validation: Following fields is needed. Provide what needs to be - "expires_at" - "tags" - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiUIJoinTokenUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiUIJoinTokenUpdateRequest */ func (a *UIJoinTokenAPIService) UIJoinTokenUpdate(ctx context.Context, id string) ApiUIJoinTokenUpdateRequest { return ApiUIJoinTokenUpdateRequest{ @@ -774,8 +770,7 @@ func (a *UIJoinTokenAPIService) UIJoinTokenUpdate(ctx context.Context, id string } // Execute executes the request -// -// @return HostactivationUpdateJoinTokenResponse +// @return HostactivationUpdateJoinTokenResponse func (a *UIJoinTokenAPIService) UIJoinTokenUpdateExecute(r ApiUIJoinTokenUpdateRequest) (*HostactivationUpdateJoinTokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -816,6 +811,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 +862,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..daea4ae 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. @@ -120,9 +115,9 @@ func (r ApiUICSRApproveRequest) Execute() (map[string]interface{}, *http.Respons /* UICSRApprove Marks the certificate signing request as approved. The host activation service will then continue with the signing process. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRApproveRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRApproveRequest */ func (a *UICSRAPIService) UICSRApprove(ctx context.Context, activationCode string) ApiUICSRApproveRequest { return ApiUICSRApproveRequest{ @@ -133,8 +128,7 @@ func (a *UICSRAPIService) UICSRApprove(ctx context.Context, activationCode strin } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -218,7 +212,6 @@ func (a *UICSRAPIService) UICSRApproveExecute(r ApiUICSRApproveRequest) (map[str newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -241,9 +234,9 @@ func (r ApiUICSRDenyRequest) Execute() (map[string]interface{}, *http.Response, /* UICSRDeny Marks the certificate signing request as denied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activationCode activation code is used by the clients to track the approval of the CSR - @return ApiUICSRDenyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param activationCode activation code is used by the clients to track the approval of the CSR + @return ApiUICSRDenyRequest */ func (a *UICSRAPIService) UICSRDeny(ctx context.Context, activationCode string) ApiUICSRDenyRequest { return ApiUICSRDenyRequest{ @@ -254,8 +247,7 @@ func (a *UICSRAPIService) UICSRDeny(ctx context.Context, activationCode string) } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -339,7 +331,6 @@ func (a *UICSRAPIService) UICSRDenyExecute(r ApiUICSRDenyRequest) (map[string]in newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -355,31 +346,31 @@ type ApiUICSRListRequest struct { torderBy *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiUICSRListRequest) Filter(filter string) ApiUICSRListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiUICSRListRequest) OrderBy(orderBy string) ApiUICSRListRequest { r.orderBy = &orderBy return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiUICSRListRequest) Offset(offset int32) ApiUICSRListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiUICSRListRequest) Limit(limit int32) ApiUICSRListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiUICSRListRequest) PageToken(pageToken string) ApiUICSRListRequest { r.pageToken = &pageToken return r @@ -404,8 +395,8 @@ func (r ApiUICSRListRequest) Execute() (*HostactivationListCSRsResponse, *http.R /* UICSRList User can list the certificate signing requests for an account. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUICSRListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUICSRListRequest */ func (a *UICSRAPIService) UICSRList(ctx context.Context) ApiUICSRListRequest { return ApiUICSRListRequest{ @@ -415,8 +406,7 @@ func (a *UICSRAPIService) UICSRList(ctx context.Context) ApiUICSRListRequest { } // Execute executes the request -// -// @return HostactivationListCSRsResponse +// @return HostactivationListCSRsResponse func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*HostactivationListCSRsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -515,7 +505,6 @@ func (a *UICSRAPIService) UICSRListExecute(r ApiUICSRListRequest) (*Hostactivati newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -543,9 +532,9 @@ Validation: - one of "cert_serial" or "ophid" should be provided - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - @return ApiUICSRRevokeRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certSerial x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + @return ApiUICSRRevokeRequest */ func (a *UICSRAPIService) UICSRRevoke(ctx context.Context, certSerial string) ApiUICSRRevokeRequest { return ApiUICSRRevokeRequest{ @@ -556,8 +545,7 @@ func (a *UICSRAPIService) UICSRRevoke(ctx context.Context, certSerial string) Ap } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -641,7 +629,6 @@ func (a *UICSRAPIService) UICSRRevokeExecute(r ApiUICSRRevokeRequest) (map[strin newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -669,9 +656,9 @@ Validation: - one of "cert_serial" or "ophid" should be provided - "revoke_reason" is optional - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - @return ApiUICSRRevoke2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ophid On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + @return ApiUICSRRevoke2Request */ func (a *UICSRAPIService) UICSRRevoke2(ctx context.Context, ophid string) ApiUICSRRevoke2Request { return ApiUICSRRevoke2Request{ @@ -682,8 +669,7 @@ func (a *UICSRAPIService) UICSRRevoke2(ctx context.Context, ophid string) ApiUIC } // Execute executes the request -// -// @return map[string]interface{} +// @return map[string]interface{} func (a *UICSRAPIService) UICSRRevoke2Execute(r ApiUICSRRevoke2Request) (map[string]interface{}, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -767,6 +753,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/infra_provision/client.go b/infra_provision/client.go index fe18f4d..fc02639 100644 --- a/infra_provision/client.go +++ b/infra_provision/client.go @@ -11,7 +11,7 @@ API version: v1 package infra_provision import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/host-activation/v1" @@ -19,10 +19,10 @@ var ServiceBasePath = "/host-activation/v1" // APIClient manages communication with the Host Activation Service API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - UICSRAPI UICSRAPI + UICSRAPI UICSRAPI UIJoinTokenAPI UIJoinTokenAPI } @@ -30,7 +30,7 @@ type APIClient struct { // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.UICSRAPI = (*UICSRAPIService)(&c.Common) diff --git a/infra_provision/docs/HostactivationJoinToken.md b/infra_provision/docs/HostactivationJoinToken.md index 1c95826..342b53e 100644 --- a/infra_provision/docs/HostactivationJoinToken.md +++ b/infra_provision/docs/HostactivationJoinToken.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **ExpiresAt** | Pointer to **time.Time** | | [optional] **Id** | Pointer to **string** | The resource identifier. | [optional] [readonly] **LastUsedAt** | Pointer to **time.Time** | | [optional] [readonly] -**Name** | Pointer to **string** | | [optional] +**Name** | **string** | | **Status** | Pointer to [**JoinTokenJoinTokenStatus**](JoinTokenJoinTokenStatus.md) | | [optional] [default to JOINTOKENJOINTOKENSTATUS_UNKNOWN] **Tags** | Pointer to **map[string]interface{}** | | [optional] **TokenId** | Pointer to **string** | first half of the token. | [optional] [readonly] @@ -19,7 +19,7 @@ Name | Type | Description | Notes ### NewHostactivationJoinToken -`func NewHostactivationJoinToken() *HostactivationJoinToken` +`func NewHostactivationJoinToken(name string, ) *HostactivationJoinToken` NewHostactivationJoinToken instantiates a new HostactivationJoinToken object This constructor will assign default values to properties that have it defined, @@ -178,11 +178,6 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. -### HasName - -`func (o *HostactivationJoinToken) HasName() bool` - -HasName returns a boolean if a field has been set. ### GetStatus diff --git a/infra_provision/docs/UIJoinTokenAPI.md b/infra_provision/docs/UIJoinTokenAPI.md index 6aa2ab4..54a6829 100644 --- a/infra_provision/docs/UIJoinTokenAPI.md +++ b/infra_provision/docs/UIJoinTokenAPI.md @@ -34,7 +34,7 @@ import ( ) func main() { - body := *openapiclient.NewHostactivationJoinToken() // HostactivationJoinToken | + body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -377,7 +377,7 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewHostactivationJoinToken() // HostactivationJoinToken | + body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/infra_provision/model_hostactivation_join_token.go b/infra_provision/model_hostactivation_join_token.go index 82892c7..c0533f7 100644 --- a/infra_provision/model_hostactivation_join_token.go +++ b/infra_provision/model_hostactivation_join_token.go @@ -12,6 +12,7 @@ package infra_provision import ( "encoding/json" + "fmt" "time" ) @@ -26,7 +27,7 @@ type HostactivationJoinToken struct { // The resource identifier. Id *string `json:"id,omitempty"` LastUsedAt *time.Time `json:"last_used_at,omitempty"` - Name *string `json:"name,omitempty"` + Name string `json:"name"` Status *JoinTokenJoinTokenStatus `json:"status,omitempty"` Tags map[string]interface{} `json:"tags,omitempty"` // first half of the token. @@ -34,12 +35,15 @@ type HostactivationJoinToken struct { UseCounter *int64 `json:"use_counter,omitempty"` } +type _HostactivationJoinToken HostactivationJoinToken + // NewHostactivationJoinToken instantiates a new HostactivationJoinToken object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewHostactivationJoinToken() *HostactivationJoinToken { +func NewHostactivationJoinToken(name string) *HostactivationJoinToken { this := HostactivationJoinToken{} + this.Name = name var status JoinTokenJoinTokenStatus = JOINTOKENJOINTOKENSTATUS_UNKNOWN this.Status = &status return &this @@ -215,36 +219,28 @@ func (o *HostactivationJoinToken) SetLastUsedAt(v time.Time) { o.LastUsedAt = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value func (o *HostactivationJoinToken) GetName() string { - if o == nil || IsNil(o.Name) { + if o == nil { var ret string return ret } - return *o.Name + + return o.Name } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *HostactivationJoinToken) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { + if o == nil { return nil, false } - return o.Name, true + return &o.Name, true } -// HasName returns a boolean if a field has been set. -func (o *HostactivationJoinToken) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName sets field value func (o *HostactivationJoinToken) SetName(v string) { - o.Name = &v + o.Name = v } // GetStatus returns the Status field value if set, zero value otherwise. @@ -400,9 +396,7 @@ func (o HostactivationJoinToken) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUsedAt) { toSerialize["last_used_at"] = o.LastUsedAt } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } + toSerialize["name"] = o.Name if !IsNil(o.Status) { toSerialize["status"] = o.Status } @@ -418,6 +412,41 @@ func (o HostactivationJoinToken) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *HostactivationJoinToken) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHostactivationJoinToken := _HostactivationJoinToken{} + + err = json.Unmarshal(bytes, &varHostactivationJoinToken) + + if err != nil { + return err + } + + *o = HostactivationJoinToken(varHostactivationJoinToken) + + return err +} + type NullableHostactivationJoinToken struct { value *HostactivationJoinToken isSet bool diff --git a/internal/configuration.go b/internal/configuration.go index 2a34dce..8afe080 100644 --- a/internal/configuration.go +++ b/internal/configuration.go @@ -20,16 +20,16 @@ func (c contextKey) String() string { var ( // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") - + // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") - + // ContextOperationServerIndices uses a server configuration from the index mapping. ContextOperationServerIndices = contextKey("serverOperationIndices") - + // ContextServerVariables overrides a server configuration variables. ContextServerVariables = contextKey("serverVariables") - + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. ContextOperationServerVariables = contextKey("serverOperationVariables") ) @@ -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,16 @@ func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } +func (c *Configuration) AddDefaultTags(m map[string]string) { + for k, v := range m { + c.DefaultTags[k] = v + } +} + +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 { @@ -105,7 +117,7 @@ func (sc ServerConfigurations) URL(index int, variables map[string]string) (stri } server := sc[index] url := server.URL - + // go through variables and replace placeholders for name, variable := range server.Variables { if value, ok := variables[name]; ok { @@ -189,20 +201,20 @@ func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint strin if !ok { sc = c.Servers } - + if ctx == nil { return sc.URL(0, nil) } - + index, err := getServerOperationIndex(ctx, endpoint) if err != nil { return "", err } - + variables, err := getServerOperationVariables(ctx, endpoint) if err != nil { return "", err } - + return sc.URL(index, variables) } diff --git a/internal/configuration_test.go b/internal/configuration_test.go new file mode 100644 index 0000000..d0a7fba --- /dev/null +++ b/internal/configuration_test.go @@ -0,0 +1,76 @@ +package internal + +import ( + "reflect" + "testing" +) + +func TestConfiguration_AddDefaultTags(t *testing.T) { + type fields struct { + DefaultTags map[string]string + } + type args struct { + m map[string]string + } + tests := []struct { + name string + fields fields + args args + expected map[string]string + }{ + { + name: "empty fields", + fields: fields{ + DefaultTags: map[string]string{}, + }, + args: args{ + m: map[string]string{}, + }, + expected: map[string]string{}, + }, { + name: "existing fields", + fields: fields{ + DefaultTags: map[string]string{ + "key1": "value1", + }, + }, + args: args{ + m: map[string]string{ + "key2": "value2", + }, + }, + expected: map[string]string{ + "key1": "value1", + "key2": "value2", + }, + }, + { + name: "overriding fields", + fields: fields{ + DefaultTags: map[string]string{ + "key1": "value1", + }, + }, + args: args{ + m: map[string]string{ + "key1": "value2", + }, + }, + expected: map[string]string{ + "key1": "value2", + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &Configuration{ + DefaultTags: tt.fields.DefaultTags, + } + c.AddDefaultTags(tt.args.m) + if !reflect.DeepEqual(c.GetDefaultTags(), tt.expected) { + t.Errorf("internal() want = %v, got = %v", tt.expected, c.GetDefaultTags()) + return + } + }) + } +} diff --git a/ipam/.openapi-generator/VERSION b/ipam/.openapi-generator/VERSION index 73a86b1..3769235 100644 --- a/ipam/.openapi-generator/VERSION +++ b/ipam/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/ipam/README.md b/ipam/README.md index 1bc0c10..eefe1c0 100644 --- a/ipam/README.md +++ b/ipam/README.md @@ -36,7 +36,7 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `ipam.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), ipam.ContextServerIndex, 1) @@ -44,7 +44,7 @@ ctx := context.WithValue(context.Background(), ipam.ContextServerIndex, 1) ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `ipam.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), ipam.ContextServerVariables, map[string]string{ @@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `ipam.ContextOperationServerIndices` and `ipam.ContextOperationServerVariables` context maps. ```golang ctx := context.WithValue(context.Background(), ipam.ContextOperationServerIndices, map[string]int{ @@ -362,8 +362,8 @@ Example ```golang auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + ipam.ContextAPIKeys, + map[string]ipam.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/ipam/api_address.go b/ipam/api_address.go index 6dd7836..273bbcf 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. @@ -125,8 +120,8 @@ AddressCreate Create the IP address. Use this method to create an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressCreateRequest */ func (a *AddressAPIService) AddressCreate(ctx context.Context) ApiAddressCreateRequest { return ApiAddressCreateRequest{ @@ -136,8 +131,7 @@ func (a *AddressAPIService) AddressCreate(ctx context.Context) ApiAddressCreateR } // Execute executes the request -// -// @return IpamsvcCreateAddressResponse +// @return IpamsvcCreateAddressResponse func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*IpamsvcCreateAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *AddressAPIService) AddressCreateExecute(r ApiAddressCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ AddressDelete Move the IP address to the recycle bin. Use this method to move an __Address__ object to the recycle bin. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressDeleteRequest */ func (a *AddressAPIService) AddressDelete(ctx context.Context, id string) ApiAddressDeleteRequest { return ApiAddressDeleteRequest{ @@ -343,37 +344,37 @@ type ApiAddressListRequest struct { tfilter *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAddressListRequest) Filter(filter string) ApiAddressListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAddressListRequest) OrderBy(orderBy string) ApiAddressListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressListRequest) Fields(fields string) ApiAddressListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAddressListRequest) Offset(offset int32) ApiAddressListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAddressListRequest) Limit(limit int32) ApiAddressListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAddressListRequest) PageToken(pageToken string) ApiAddressListRequest { r.pageToken = &pageToken return r @@ -411,8 +412,8 @@ AddressList Retrieve IP addresses. Use this method to retrieve __Address__ objects. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressListRequest */ func (a *AddressAPIService) AddressList(ctx context.Context) ApiAddressListRequest { return ApiAddressListRequest{ @@ -422,8 +423,7 @@ func (a *AddressAPIService) AddressList(ctx context.Context) ApiAddressListReque } // Execute executes the request -// -// @return IpamsvcListAddressResponse +// @return IpamsvcListAddressResponse func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*IpamsvcListAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -531,7 +531,6 @@ func (a *AddressAPIService) AddressListExecute(r ApiAddressListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -542,7 +541,7 @@ type ApiAddressReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressReadRequest) Fields(fields string) ApiAddressReadRequest { r.fields = &fields return r @@ -558,9 +557,9 @@ AddressRead Retrieve the IP address. Use this method to retrieve an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressReadRequest */ func (a *AddressAPIService) AddressRead(ctx context.Context, id string) ApiAddressReadRequest { return ApiAddressReadRequest{ @@ -571,8 +570,7 @@ func (a *AddressAPIService) AddressRead(ctx context.Context, id string) ApiAddre } // Execute executes the request -// -// @return IpamsvcReadAddressResponse +// @return IpamsvcReadAddressResponse func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*IpamsvcReadAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -654,7 +652,6 @@ func (a *AddressAPIService) AddressReadExecute(r ApiAddressReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -680,9 +677,9 @@ AddressUpdate Update the IP address. Use this method to update an __Address__ object. The __Address__ object represents any single IP address within a given IP space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressUpdateRequest */ func (a *AddressAPIService) AddressUpdate(ctx context.Context, id string) ApiAddressUpdateRequest { return ApiAddressUpdateRequest{ @@ -693,8 +690,7 @@ func (a *AddressAPIService) AddressUpdate(ctx context.Context, id string) ApiAdd } // Execute executes the request -// -// @return IpamsvcUpdateAddressResponse +// @return IpamsvcUpdateAddressResponse func (a *AddressAPIService) AddressUpdateExecute(r ApiAddressUpdateRequest) (*IpamsvcUpdateAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -735,6 +731,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 +782,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 b8f4988..e387b18 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. @@ -238,9 +226,9 @@ AddressBlockCopy Copy the address block. Use this method to copy an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCopyRequest */ func (a *AddressBlockAPIService) AddressBlockCopy(ctx context.Context, id string) ApiAddressBlockCopyRequest { return ApiAddressBlockCopyRequest{ @@ -251,8 +239,7 @@ func (a *AddressBlockAPIService) AddressBlockCopy(ctx context.Context, id string } // Execute executes the request -// -// @return IpamsvcCopyAddressBlockResponse +// @return IpamsvcCopyAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRequest) (*IpamsvcCopyAddressBlockResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -336,7 +323,6 @@ func (a *AddressBlockAPIService) AddressBlockCopyExecute(r ApiAddressBlockCopyRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -344,6 +330,7 @@ type ApiAddressBlockCreateRequest struct { ctx context.Context ApiService AddressBlockAPI body *IpamsvcAddressBlock + inherit *string } func (r ApiAddressBlockCreateRequest) Body(body IpamsvcAddressBlock) ApiAddressBlockCreateRequest { @@ -351,6 +338,12 @@ func (r ApiAddressBlockCreateRequest) Body(body IpamsvcAddressBlock) ApiAddressB return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAddressBlockCreateRequest) Inherit(inherit string) ApiAddressBlockCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiAddressBlockCreateRequest) Execute() (*IpamsvcCreateAddressBlockResponse, *http.Response, error) { return r.ApiService.AddressBlockCreateExecute(r) } @@ -361,8 +354,8 @@ AddressBlockCreate Create the address block. Use this method to create an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockCreateRequest */ func (a *AddressBlockAPIService) AddressBlockCreate(ctx context.Context) ApiAddressBlockCreateRequest { return ApiAddressBlockCreateRequest{ @@ -372,8 +365,7 @@ func (a *AddressBlockAPIService) AddressBlockCreate(ctx context.Context) ApiAddr } // Execute executes the request -// -// @return IpamsvcCreateAddressBlockResponse +// @return IpamsvcCreateAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCreateRequest) (*IpamsvcCreateAddressBlockResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -396,6 +388,9 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -413,6 +408,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 { @@ -456,7 +459,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateExecute(r ApiAddressBlockCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -504,9 +506,9 @@ AddressBlockCreateNextAvailableAB Create the Next Available Address Block object Use this method to create a Next Available __AddressBlock__ object. The Next Available Address Block is a generator that allocates one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableABRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableAB(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableABRequest { return ApiAddressBlockCreateNextAvailableABRequest{ @@ -517,8 +519,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableAB(ctx context.C } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableABResponse +// @return IpamsvcCreateNextAvailableABResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiAddressBlockCreateNextAvailableABRequest) (*IpamsvcCreateNextAvailableABResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -613,7 +614,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableABExecute(r ApiA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -647,9 +647,9 @@ AddressBlockCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableIPRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIP(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableIPRequest { return ApiAddressBlockCreateNextAvailableIPRequest{ @@ -660,8 +660,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIP(ctx context.C } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableIPResponse +// @return IpamsvcCreateNextAvailableIPResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiAddressBlockCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -752,7 +751,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableIPExecute(r ApiA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -807,9 +805,9 @@ AddressBlockCreateNextAvailableSubnet Create the Next Available Subnet object. Use this method to create a Next Available __Subnet__ object. The Next Available Subnet is a generator that allocates one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockCreateNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockCreateNextAvailableSubnetRequest */ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockCreateNextAvailableSubnetRequest { return ApiAddressBlockCreateNextAvailableSubnetRequest{ @@ -820,8 +818,7 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnet(ctx conte } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableSubnetResponse +// @return IpamsvcCreateNextAvailableSubnetResponse func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r ApiAddressBlockCreateNextAvailableSubnetRequest) (*IpamsvcCreateNextAvailableSubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -919,7 +916,6 @@ func (a *AddressBlockAPIService) AddressBlockCreateNextAvailableSubnetExecute(r newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -939,9 +935,9 @@ AddressBlockDelete Move the address block to the recycle bin. Use this method to move an __AddressBlock__ object to the recycle bin. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockDeleteRequest */ func (a *AddressBlockAPIService) AddressBlockDelete(ctx context.Context, id string) ApiAddressBlockDeleteRequest { return ApiAddressBlockDeleteRequest{ @@ -1038,39 +1034,40 @@ type ApiAddressBlockListRequest struct { orderBy *string torderBy *string tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressBlockListRequest) Fields(fields string) ApiAddressBlockListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiAddressBlockListRequest) Filter(filter string) ApiAddressBlockListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiAddressBlockListRequest) Offset(offset int32) ApiAddressBlockListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiAddressBlockListRequest) Limit(limit int32) ApiAddressBlockListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiAddressBlockListRequest) PageToken(pageToken string) ApiAddressBlockListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiAddressBlockListRequest) OrderBy(orderBy string) ApiAddressBlockListRequest { r.orderBy = &orderBy return r @@ -1088,6 +1085,12 @@ func (r ApiAddressBlockListRequest) Tfilter(tfilter string) ApiAddressBlockListR return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAddressBlockListRequest) Inherit(inherit string) ApiAddressBlockListRequest { + r.inherit = &inherit + return r +} + func (r ApiAddressBlockListRequest) Execute() (*IpamsvcListAddressBlockResponse, *http.Response, error) { return r.ApiService.AddressBlockListExecute(r) } @@ -1098,8 +1101,8 @@ AddressBlockList Retrieve the address blocks. Use this method to retrieve __AddressBlock__ objects. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAddressBlockListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddressBlockListRequest */ func (a *AddressBlockAPIService) AddressBlockList(ctx context.Context) ApiAddressBlockListRequest { return ApiAddressBlockListRequest{ @@ -1109,8 +1112,7 @@ func (a *AddressBlockAPIService) AddressBlockList(ctx context.Context) ApiAddres } // Execute executes the request -// -// @return IpamsvcListAddressBlockResponse +// @return IpamsvcListAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRequest) (*IpamsvcListAddressBlockResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1154,6 +1156,9 @@ func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRe if r.tfilter != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1212,7 +1217,6 @@ func (a *AddressBlockAPIService) AddressBlockListExecute(r ApiAddressBlockListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1260,9 +1264,9 @@ AddressBlockListNextAvailableAB List Next Available Address Block objects. Use this method to list Next Available __AddressBlock__ objects. The Next Available __AddressBlock__ is a generator that returns one or more _ipam/address_block_ resource from available address blocks when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableABRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableABRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableAB(ctx context.Context, id string) ApiAddressBlockListNextAvailableABRequest { return ApiAddressBlockListNextAvailableABRequest{ @@ -1273,8 +1277,7 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableAB(ctx context.Con } // Execute executes the request -// -// @return IpamsvcNextAvailableABResponse +// @return IpamsvcNextAvailableABResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAddressBlockListNextAvailableABRequest) (*IpamsvcNextAvailableABResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1365,7 +1368,6 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableABExecute(r ApiAdd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1399,9 +1401,9 @@ AddressBlockListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableIPRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIP(ctx context.Context, id string) ApiAddressBlockListNextAvailableIPRequest { return ApiAddressBlockListNextAvailableIPRequest{ @@ -1412,8 +1414,7 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIP(ctx context.Con } // Execute executes the request -// -// @return IpamsvcNextAvailableIPResponse +// @return IpamsvcNextAvailableIPResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAddressBlockListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1498,7 +1499,6 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableIPExecute(r ApiAdd newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1553,9 +1553,9 @@ AddressBlockListNextAvailableSubnet List Next Available Subnet objects. Use this method to list Next Available __Subnet__ objects. The Next Available Address Block is a generator that returns one or more _ipam/subnet_ resource from available subnets when the network address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockListNextAvailableSubnetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockListNextAvailableSubnetRequest */ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnet(ctx context.Context, id string) ApiAddressBlockListNextAvailableSubnetRequest { return ApiAddressBlockListNextAvailableSubnetRequest{ @@ -1566,8 +1566,7 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnet(ctx context } // Execute executes the request -// -// @return IpamsvcNextAvailableSubnetResponse +// @return IpamsvcNextAvailableSubnetResponse func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r ApiAddressBlockListNextAvailableSubnetRequest) (*IpamsvcNextAvailableSubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1661,7 +1660,6 @@ func (a *AddressBlockAPIService) AddressBlockListNextAvailableSubnetExecute(r Ap newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1670,14 +1668,21 @@ type ApiAddressBlockReadRequest struct { ApiService AddressBlockAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAddressBlockReadRequest) Fields(fields string) ApiAddressBlockReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAddressBlockReadRequest) Inherit(inherit string) ApiAddressBlockReadRequest { + r.inherit = &inherit + return r +} + func (r ApiAddressBlockReadRequest) Execute() (*IpamsvcReadAddressBlockResponse, *http.Response, error) { return r.ApiService.AddressBlockReadExecute(r) } @@ -1688,9 +1693,9 @@ AddressBlockRead Retrieve the address block. Use this method to retrieve an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockReadRequest */ func (a *AddressBlockAPIService) AddressBlockRead(ctx context.Context, id string) ApiAddressBlockReadRequest { return ApiAddressBlockReadRequest{ @@ -1701,8 +1706,7 @@ func (a *AddressBlockAPIService) AddressBlockRead(ctx context.Context, id string } // Execute executes the request -// -// @return IpamsvcReadAddressBlockResponse +// @return IpamsvcReadAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRequest) (*IpamsvcReadAddressBlockResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1726,6 +1730,9 @@ func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRe if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1784,7 +1791,6 @@ func (a *AddressBlockAPIService) AddressBlockReadExecute(r ApiAddressBlockReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1793,6 +1799,7 @@ type ApiAddressBlockUpdateRequest struct { ApiService AddressBlockAPI id string body *IpamsvcAddressBlock + inherit *string } func (r ApiAddressBlockUpdateRequest) Body(body IpamsvcAddressBlock) ApiAddressBlockUpdateRequest { @@ -1800,6 +1807,12 @@ func (r ApiAddressBlockUpdateRequest) Body(body IpamsvcAddressBlock) ApiAddressB return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiAddressBlockUpdateRequest) Inherit(inherit string) ApiAddressBlockUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiAddressBlockUpdateRequest) Execute() (*IpamsvcUpdateAddressBlockResponse, *http.Response, error) { return r.ApiService.AddressBlockUpdateExecute(r) } @@ -1810,9 +1823,9 @@ AddressBlockUpdate Update the address block. Use this method to update an __AddressBlock__ object. The __AddressBlock__ object allows a uniform representation of the address space segmentation, supporting functions such as administrative grouping, routing aggregation, delegation etc. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAddressBlockUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAddressBlockUpdateRequest */ func (a *AddressBlockAPIService) AddressBlockUpdate(ctx context.Context, id string) ApiAddressBlockUpdateRequest { return ApiAddressBlockUpdateRequest{ @@ -1823,8 +1836,7 @@ func (a *AddressBlockAPIService) AddressBlockUpdate(ctx context.Context, id stri } // Execute executes the request -// -// @return IpamsvcUpdateAddressBlockResponse +// @return IpamsvcUpdateAddressBlockResponse func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpdateRequest) (*IpamsvcUpdateAddressBlockResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -1848,6 +1860,9 @@ func (a *AddressBlockAPIService) AddressBlockUpdateExecute(r ApiAddressBlockUpda return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1865,6 +1880,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 { @@ -1908,6 +1931,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..740ddee 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. @@ -96,8 +93,8 @@ Use this method to update the subnet and range for Automated Scope Management. The __ASM__ object generates and returns the suggestions from the ASM suggestion engine and allows for updating the subnet and range. This method attempts to expand the scope by expanding a range or adding a new range and, if necessary, expanding the subnet. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmCreateRequest */ func (a *AsmAPIService) AsmCreate(ctx context.Context) ApiAsmCreateRequest { return ApiAsmCreateRequest{ @@ -107,8 +104,7 @@ func (a *AsmAPIService) AsmCreate(ctx context.Context) ApiAsmCreateRequest { } // Execute executes the request -// -// @return IpamsvcCreateASMResponse +// @return IpamsvcCreateASMResponse func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateASMResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -191,7 +187,6 @@ func (a *AsmAPIService) AsmCreateExecute(r ApiAsmCreateRequest) (*IpamsvcCreateA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -202,7 +197,7 @@ type ApiAsmListRequest struct { subnetId *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAsmListRequest) Fields(fields string) ApiAsmListRequest { r.fields = &fields return r @@ -223,8 +218,8 @@ AsmList Retrieve suggested updates for Automated Scope Management. Use this method to retrieve __ASM__ objects for Automated Scope Management. The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAsmListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAsmListRequest */ func (a *AsmAPIService) AsmList(ctx context.Context) ApiAsmListRequest { return ApiAsmListRequest{ @@ -234,8 +229,7 @@ func (a *AsmAPIService) AsmList(ctx context.Context) ApiAsmListRequest { } // Execute executes the request -// -// @return IpamsvcListASMResponse +// @return IpamsvcListASMResponse func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -319,7 +313,6 @@ func (a *AsmAPIService) AsmListExecute(r ApiAsmListRequest) (*IpamsvcListASMResp newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -330,7 +323,7 @@ type ApiAsmReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiAsmReadRequest) Fields(fields string) ApiAsmReadRequest { r.fields = &fields return r @@ -346,9 +339,9 @@ AsmRead Retrieve the suggested update for Automated Scope Management. Use this method to retrieve an __ASM__ object for Automated Scope Management. The __ASM__ object returns the suggested updates for the subnet from the ASM suggestion engine and allows for updating the subnet and range information. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiAsmReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiAsmReadRequest */ func (a *AsmAPIService) AsmRead(ctx context.Context, id string) ApiAsmReadRequest { return ApiAsmReadRequest{ @@ -359,8 +352,7 @@ func (a *AsmAPIService) AsmRead(ctx context.Context, id string) ApiAsmReadReques } // Execute executes the request -// -// @return IpamsvcReadASMResponse +// @return IpamsvcReadASMResponse func (a *AsmAPIService) AsmReadExecute(r ApiAsmReadRequest) (*IpamsvcReadASMResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -442,6 +434,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..fa4b240 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. @@ -102,37 +98,37 @@ type ApiDhcpHostListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDhcpHostListRequest) Fields(fields string) ApiDhcpHostListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDhcpHostListRequest) Filter(filter string) ApiDhcpHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDhcpHostListRequest) Offset(offset int32) ApiDhcpHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDhcpHostListRequest) Limit(limit int32) ApiDhcpHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDhcpHostListRequest) PageToken(pageToken string) ApiDhcpHostListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDhcpHostListRequest) OrderBy(orderBy string) ApiDhcpHostListRequest { r.orderBy = &orderBy return r @@ -160,8 +156,8 @@ DhcpHostList Retrieve DHCP hosts. Use this method to retrieve DHCP __Host__ objects. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDhcpHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDhcpHostListRequest */ func (a *DhcpHostAPIService) DhcpHostList(ctx context.Context) ApiDhcpHostListRequest { return ApiDhcpHostListRequest{ @@ -171,8 +167,7 @@ func (a *DhcpHostAPIService) DhcpHostList(ctx context.Context) ApiDhcpHostListRe } // Execute executes the request -// -// @return IpamsvcListHostResponse +// @return IpamsvcListHostResponse func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*IpamsvcListHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -274,7 +269,6 @@ func (a *DhcpHostAPIService) DhcpHostListExecute(r ApiDhcpHostListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -293,9 +287,9 @@ DhcpHostListAssociations Retrieve DHCP host associations. Use this method to retrieve __HostAssociation__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostListAssociationsRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostListAssociationsRequest */ func (a *DhcpHostAPIService) DhcpHostListAssociations(ctx context.Context, id string) ApiDhcpHostListAssociationsRequest { return ApiDhcpHostListAssociationsRequest{ @@ -306,8 +300,7 @@ func (a *DhcpHostAPIService) DhcpHostListAssociations(ctx context.Context, id st } // Execute executes the request -// -// @return IpamsvcHostAssociationsResponse +// @return IpamsvcHostAssociationsResponse func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAssociationsRequest) (*IpamsvcHostAssociationsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -386,7 +379,6 @@ func (a *DhcpHostAPIService) DhcpHostListAssociationsExecute(r ApiDhcpHostListAs newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -397,7 +389,7 @@ type ApiDhcpHostReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDhcpHostReadRequest) Fields(fields string) ApiDhcpHostReadRequest { r.fields = &fields return r @@ -413,9 +405,9 @@ DhcpHostRead Retrieve the DHCP host. Use this method to retrieve a DHCP Host object. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostReadRequest */ func (a *DhcpHostAPIService) DhcpHostRead(ctx context.Context, id string) ApiDhcpHostReadRequest { return ApiDhcpHostReadRequest{ @@ -426,8 +418,7 @@ func (a *DhcpHostAPIService) DhcpHostRead(ctx context.Context, id string) ApiDhc } // Execute executes the request -// -// @return IpamsvcReadHostResponse +// @return IpamsvcReadHostResponse func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*IpamsvcReadHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -509,7 +500,6 @@ func (a *DhcpHostAPIService) DhcpHostReadExecute(r ApiDhcpHostReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -535,9 +525,9 @@ DhcpHostUpdate Update the DHCP hosts. Use this method to update a DHCP __Host__ object. A DHCP __Host__ object associates a __DHCPConfigProfile__ object with an on-prem host. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDhcpHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDhcpHostUpdateRequest */ func (a *DhcpHostAPIService) DhcpHostUpdate(ctx context.Context, id string) ApiDhcpHostUpdateRequest { return ApiDhcpHostUpdateRequest{ @@ -548,8 +538,7 @@ func (a *DhcpHostAPIService) DhcpHostUpdate(ctx context.Context, id string) ApiD } // Execute executes the request -// -// @return IpamsvcUpdateHostResponse +// @return IpamsvcUpdateHostResponse func (a *DhcpHostAPIService) DhcpHostUpdateExecute(r ApiDhcpHostUpdateRequest) (*IpamsvcUpdateHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -590,6 +579,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 +630,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..69d6082 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. @@ -67,37 +65,37 @@ type ApiDnsUsageListRequest struct { orderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDnsUsageListRequest) Fields(fields string) ApiDnsUsageListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiDnsUsageListRequest) Filter(filter string) ApiDnsUsageListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiDnsUsageListRequest) Offset(offset int32) ApiDnsUsageListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiDnsUsageListRequest) Limit(limit int32) ApiDnsUsageListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiDnsUsageListRequest) PageToken(pageToken string) ApiDnsUsageListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiDnsUsageListRequest) OrderBy(orderBy string) ApiDnsUsageListRequest { r.orderBy = &orderBy return r @@ -112,8 +110,8 @@ DnsUsageList Retrieve DNS usage for multiple objects. Use this method to retrieve __DNSUsage__ objects. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDnsUsageListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDnsUsageListRequest */ func (a *DnsUsageAPIService) DnsUsageList(ctx context.Context) ApiDnsUsageListRequest { return ApiDnsUsageListRequest{ @@ -123,8 +121,7 @@ func (a *DnsUsageAPIService) DnsUsageList(ctx context.Context) ApiDnsUsageListRe } // Execute executes the request -// -// @return IpamsvcListDNSUsageResponse +// @return IpamsvcListDNSUsageResponse func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*IpamsvcListDNSUsageResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -220,7 +217,6 @@ func (a *DnsUsageAPIService) DnsUsageListExecute(r ApiDnsUsageListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -231,7 +227,7 @@ type ApiDnsUsageReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiDnsUsageReadRequest) Fields(fields string) ApiDnsUsageReadRequest { r.fields = &fields return r @@ -246,9 +242,9 @@ DnsUsageRead Retrieve the DNS usage. Use this method to retrieve a __DNSUsage__ object. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiDnsUsageReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiDnsUsageReadRequest */ func (a *DnsUsageAPIService) DnsUsageRead(ctx context.Context, id string) ApiDnsUsageReadRequest { return ApiDnsUsageReadRequest{ @@ -259,8 +255,7 @@ func (a *DnsUsageAPIService) DnsUsageRead(ctx context.Context, id string) ApiDns } // Execute executes the request -// -// @return IpamsvcReadDNSUsageResponse +// @return IpamsvcReadDNSUsageResponse func (a *DnsUsageAPIService) DnsUsageReadExecute(r ApiDnsUsageReadRequest) (*IpamsvcReadDNSUsageResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -342,6 +337,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..4d8760f 100644 --- a/ipam/api_filter.go +++ b/ipam/api_filter.go @@ -21,7 +21,6 @@ import ( ) type FilterAPI interface { - /* FilterList Retrieve DHCP filters. @@ -53,37 +52,37 @@ type ApiFilterListRequest struct { tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFilterListRequest) Fields(fields string) ApiFilterListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiFilterListRequest) Filter(filter string) ApiFilterListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiFilterListRequest) Offset(offset int32) ApiFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiFilterListRequest) Limit(limit int32) ApiFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiFilterListRequest) PageToken(pageToken string) ApiFilterListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiFilterListRequest) OrderBy(orderBy string) ApiFilterListRequest { r.orderBy = &orderBy return r @@ -110,8 +109,8 @@ FilterList Retrieve DHCP filters. Use this method to retrieve DHCP __Filter__ objects of all types. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFilterListRequest */ func (a *FilterAPIService) FilterList(ctx context.Context) ApiFilterListRequest { return ApiFilterListRequest{ @@ -121,8 +120,7 @@ func (a *FilterAPIService) FilterList(ctx context.Context) ApiFilterListRequest } // Execute executes the request -// -// @return IpamsvcListFilterResponse +// @return IpamsvcListFilterResponse func (a *FilterAPIService) FilterListExecute(r ApiFilterListRequest) (*IpamsvcListFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -224,6 +222,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 72319f8..75f85da 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. @@ -108,6 +103,7 @@ type ApiFixedAddressCreateRequest struct { ctx context.Context ApiService FixedAddressAPI body *IpamsvcFixedAddress + inherit *string } func (r ApiFixedAddressCreateRequest) Body(body IpamsvcFixedAddress) ApiFixedAddressCreateRequest { @@ -115,6 +111,12 @@ func (r ApiFixedAddressCreateRequest) Body(body IpamsvcFixedAddress) ApiFixedAdd return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiFixedAddressCreateRequest) Inherit(inherit string) ApiFixedAddressCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiFixedAddressCreateRequest) Execute() (*IpamsvcCreateFixedAddressResponse, *http.Response, error) { return r.ApiService.FixedAddressCreateExecute(r) } @@ -125,8 +127,8 @@ FixedAddressCreate Create the fixed address. Use this method to create a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressCreateRequest */ func (a *FixedAddressAPIService) FixedAddressCreate(ctx context.Context) ApiFixedAddressCreateRequest { return ApiFixedAddressCreateRequest{ @@ -136,8 +138,7 @@ func (a *FixedAddressAPIService) FixedAddressCreate(ctx context.Context) ApiFixe } // Execute executes the request -// -// @return IpamsvcCreateFixedAddressResponse +// @return IpamsvcCreateFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCreateRequest) (*IpamsvcCreateFixedAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -160,6 +161,9 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -177,6 +181,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 { @@ -220,7 +232,6 @@ func (a *FixedAddressAPIService) FixedAddressCreateExecute(r ApiFixedAddressCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +251,9 @@ FixedAddressDelete Move the fixed address to the recycle bin. Use this method to move a __FixedAddress__ object to the recycle bin. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressDeleteRequest */ func (a *FixedAddressAPIService) FixedAddressDelete(ctx context.Context, id string) ApiFixedAddressDeleteRequest { return ApiFixedAddressDeleteRequest{ @@ -339,39 +350,40 @@ type ApiFixedAddressListRequest struct { pageToken *string torderBy *string tfilter *string + inherit *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiFixedAddressListRequest) Filter(filter string) ApiFixedAddressListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiFixedAddressListRequest) OrderBy(orderBy string) ApiFixedAddressListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFixedAddressListRequest) Fields(fields string) ApiFixedAddressListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiFixedAddressListRequest) Offset(offset int32) ApiFixedAddressListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiFixedAddressListRequest) Limit(limit int32) ApiFixedAddressListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiFixedAddressListRequest) PageToken(pageToken string) ApiFixedAddressListRequest { r.pageToken = &pageToken return r @@ -389,6 +401,12 @@ func (r ApiFixedAddressListRequest) Tfilter(tfilter string) ApiFixedAddressListR return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiFixedAddressListRequest) Inherit(inherit string) ApiFixedAddressListRequest { + r.inherit = &inherit + return r +} + func (r ApiFixedAddressListRequest) Execute() (*IpamsvcListFixedAddressResponse, *http.Response, error) { return r.ApiService.FixedAddressListExecute(r) } @@ -399,8 +417,8 @@ FixedAddressList Retrieve fixed addresses. Use this method to retrieve __FixedAddress__ objects. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFixedAddressListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiFixedAddressListRequest */ func (a *FixedAddressAPIService) FixedAddressList(ctx context.Context) ApiFixedAddressListRequest { return ApiFixedAddressListRequest{ @@ -410,8 +428,7 @@ func (a *FixedAddressAPIService) FixedAddressList(ctx context.Context) ApiFixedA } // Execute executes the request -// -// @return IpamsvcListFixedAddressResponse +// @return IpamsvcListFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRequest) (*IpamsvcListFixedAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -455,6 +472,9 @@ func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRe if r.tfilter != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -513,7 +533,6 @@ func (a *FixedAddressAPIService) FixedAddressListExecute(r ApiFixedAddressListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -522,14 +541,21 @@ type ApiFixedAddressReadRequest struct { ApiService FixedAddressAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiFixedAddressReadRequest) Fields(fields string) ApiFixedAddressReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiFixedAddressReadRequest) Inherit(inherit string) ApiFixedAddressReadRequest { + r.inherit = &inherit + return r +} + func (r ApiFixedAddressReadRequest) Execute() (*IpamsvcReadFixedAddressResponse, *http.Response, error) { return r.ApiService.FixedAddressReadExecute(r) } @@ -540,9 +566,9 @@ FixedAddressRead Retrieve the fixed address. Use this method to retrieve a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressReadRequest */ func (a *FixedAddressAPIService) FixedAddressRead(ctx context.Context, id string) ApiFixedAddressReadRequest { return ApiFixedAddressReadRequest{ @@ -553,8 +579,7 @@ func (a *FixedAddressAPIService) FixedAddressRead(ctx context.Context, id string } // Execute executes the request -// -// @return IpamsvcReadFixedAddressResponse +// @return IpamsvcReadFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRequest) (*IpamsvcReadFixedAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -578,6 +603,9 @@ func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRe if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -636,7 +664,6 @@ func (a *FixedAddressAPIService) FixedAddressReadExecute(r ApiFixedAddressReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -645,6 +672,7 @@ type ApiFixedAddressUpdateRequest struct { ApiService FixedAddressAPI id string body *IpamsvcFixedAddress + inherit *string } func (r ApiFixedAddressUpdateRequest) Body(body IpamsvcFixedAddress) ApiFixedAddressUpdateRequest { @@ -652,6 +680,12 @@ func (r ApiFixedAddressUpdateRequest) Body(body IpamsvcFixedAddress) ApiFixedAdd return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiFixedAddressUpdateRequest) Inherit(inherit string) ApiFixedAddressUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiFixedAddressUpdateRequest) Execute() (*IpamsvcUpdateFixedAddressResponse, *http.Response, error) { return r.ApiService.FixedAddressUpdateExecute(r) } @@ -662,9 +696,9 @@ FixedAddressUpdate Update the fixed address. Use this method to update a __FixedAddress__ object. The __FixedAddress__ object reserves an address for a specific client. It must have a _match_type_ and a valid corresponding _match_value_ so that it can match that client. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiFixedAddressUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiFixedAddressUpdateRequest */ func (a *FixedAddressAPIService) FixedAddressUpdate(ctx context.Context, id string) ApiFixedAddressUpdateRequest { return ApiFixedAddressUpdateRequest{ @@ -675,8 +709,7 @@ func (a *FixedAddressAPIService) FixedAddressUpdate(ctx context.Context, id stri } // Execute executes the request -// -// @return IpamsvcUpdateFixedAddressResponse +// @return IpamsvcUpdateFixedAddressResponse func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpdateRequest) (*IpamsvcUpdateFixedAddressResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -700,6 +733,9 @@ func (a *FixedAddressAPIService) FixedAddressUpdateExecute(r ApiFixedAddressUpda return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -717,6 +753,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 { @@ -760,6 +804,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..4a07171 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. @@ -95,7 +91,7 @@ type ApiGlobalReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalReadRequest) Fields(fields string) ApiGlobalReadRequest { r.fields = &fields return r @@ -111,8 +107,8 @@ GlobalRead Retrieve the global configuration. Use this method to retrieve the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalReadRequest */ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest { return ApiGlobalReadRequest{ @@ -122,8 +118,7 @@ func (a *GlobalAPIService) GlobalRead(ctx context.Context) ApiGlobalReadRequest } // Execute executes the request -// -// @return IpamsvcReadGlobalResponse +// @return IpamsvcReadGlobalResponse func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcReadGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -204,7 +199,6 @@ func (a *GlobalAPIService) GlobalReadExecute(r ApiGlobalReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -215,7 +209,7 @@ type ApiGlobalRead2Request struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiGlobalRead2Request) Fields(fields string) ApiGlobalRead2Request { r.fields = &fields return r @@ -231,9 +225,9 @@ GlobalRead2 Retrieve the global configuration. Use this method to retrieve the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalRead2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalRead2Request */ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobalRead2Request { return ApiGlobalRead2Request{ @@ -244,8 +238,7 @@ func (a *GlobalAPIService) GlobalRead2(ctx context.Context, id string) ApiGlobal } // Execute executes the request -// -// @return IpamsvcReadGlobalResponse +// @return IpamsvcReadGlobalResponse func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*IpamsvcReadGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -327,7 +320,6 @@ func (a *GlobalAPIService) GlobalRead2Execute(r ApiGlobalRead2Request) (*Ipamsvc newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -352,8 +344,8 @@ GlobalUpdate Update the global configuration. Use this method to update the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGlobalUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalUpdateRequest */ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequest { return ApiGlobalUpdateRequest{ @@ -363,8 +355,7 @@ func (a *GlobalAPIService) GlobalUpdate(ctx context.Context) ApiGlobalUpdateRequ } // Execute executes the request -// -// @return IpamsvcUpdateGlobalResponse +// @return IpamsvcUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*IpamsvcUpdateGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -447,7 +438,6 @@ func (a *GlobalAPIService) GlobalUpdateExecute(r ApiGlobalUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -473,9 +463,9 @@ GlobalUpdate2 Update the global configuration. Use this method to update the __Global__ configuration object. The service operates on single __Global__ (_dhcp/global_) object that represents parent configuration settings for inheritance. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiGlobalUpdate2Request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiGlobalUpdate2Request */ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlobalUpdate2Request { return ApiGlobalUpdate2Request{ @@ -486,8 +476,7 @@ func (a *GlobalAPIService) GlobalUpdate2(ctx context.Context, id string) ApiGlob } // Execute executes the request -// -// @return IpamsvcUpdateGlobalResponse +// @return IpamsvcUpdateGlobalResponse func (a *GlobalAPIService) GlobalUpdate2Execute(r ApiGlobalUpdate2Request) (*IpamsvcUpdateGlobalResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -571,6 +560,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..0514eb7 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. @@ -125,8 +120,8 @@ HaGroupCreate Create the HA group. Use this method to create an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupCreateRequest */ func (a *HaGroupAPIService) HaGroupCreate(ctx context.Context) ApiHaGroupCreateRequest { return ApiHaGroupCreateRequest{ @@ -136,8 +131,7 @@ func (a *HaGroupAPIService) HaGroupCreate(ctx context.Context) ApiHaGroupCreateR } // Execute executes the request -// -// @return IpamsvcCreateHAGroupResponse +// @return IpamsvcCreateHAGroupResponse func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*IpamsvcCreateHAGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *HaGroupAPIService) HaGroupCreateExecute(r ApiHaGroupCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ HaGroupDelete Delete the HA group. Use this method to delete an __HAGroup__ object. The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupDeleteRequest */ func (a *HaGroupAPIService) HaGroupDelete(ctx context.Context, id string) ApiHaGroupDeleteRequest { return ApiHaGroupDeleteRequest{ @@ -342,37 +343,37 @@ type ApiHaGroupListRequest struct { collectStats *bool } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHaGroupListRequest) Filter(filter string) ApiHaGroupListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHaGroupListRequest) OrderBy(orderBy string) ApiHaGroupListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHaGroupListRequest) Fields(fields string) ApiHaGroupListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHaGroupListRequest) Offset(offset int32) ApiHaGroupListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHaGroupListRequest) Limit(limit int32) ApiHaGroupListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHaGroupListRequest) PageToken(pageToken string) ApiHaGroupListRequest { r.pageToken = &pageToken return r @@ -406,8 +407,8 @@ HaGroupList Retrieve HA groups. Use this method to retrieve __HAGroup__ objects. The __HAGroup__ (_dhcp/ha_group_) object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHaGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHaGroupListRequest */ func (a *HaGroupAPIService) HaGroupList(ctx context.Context) ApiHaGroupListRequest { return ApiHaGroupListRequest{ @@ -417,8 +418,7 @@ func (a *HaGroupAPIService) HaGroupList(ctx context.Context) ApiHaGroupListReque } // Execute executes the request -// -// @return IpamsvcListHAGroupResponse +// @return IpamsvcListHAGroupResponse func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*IpamsvcListHAGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -523,7 +523,6 @@ func (a *HaGroupAPIService) HaGroupListExecute(r ApiHaGroupListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -535,7 +534,7 @@ type ApiHaGroupReadRequest struct { collectStats *bool } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHaGroupReadRequest) Fields(fields string) ApiHaGroupReadRequest { r.fields = &fields return r @@ -557,9 +556,9 @@ HaGroupRead Retrieve the HA group. Use this method to retrieve an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupReadRequest */ func (a *HaGroupAPIService) HaGroupRead(ctx context.Context, id string) ApiHaGroupReadRequest { return ApiHaGroupReadRequest{ @@ -570,8 +569,7 @@ func (a *HaGroupAPIService) HaGroupRead(ctx context.Context, id string) ApiHaGro } // Execute executes the request -// -// @return IpamsvcReadHAGroupResponse +// @return IpamsvcReadHAGroupResponse func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*IpamsvcReadHAGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -656,7 +654,6 @@ func (a *HaGroupAPIService) HaGroupReadExecute(r ApiHaGroupReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -682,9 +679,9 @@ HaGroupUpdate Update the HA group. Use this method to update an __HAGroup__ object. The __HAGroup__ object represents on-prem hosts that can serve the same leases for HA. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHaGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHaGroupUpdateRequest */ func (a *HaGroupAPIService) HaGroupUpdate(ctx context.Context, id string) ApiHaGroupUpdateRequest { return ApiHaGroupUpdateRequest{ @@ -695,8 +692,7 @@ func (a *HaGroupAPIService) HaGroupUpdate(ctx context.Context, id string) ApiHaG } // Execute executes the request -// -// @return IpamsvcUpdateHAGroupResponse +// @return IpamsvcUpdateHAGroupResponse func (a *HaGroupAPIService) HaGroupUpdateExecute(r ApiHaGroupUpdateRequest) (*IpamsvcUpdateHAGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -780,6 +776,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..0603a14 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. @@ -125,8 +120,8 @@ HardwareFilterCreate Create the hardware filter. Use this method to create a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterCreateRequest */ func (a *HardwareFilterAPIService) HardwareFilterCreate(ctx context.Context) ApiHardwareFilterCreateRequest { return ApiHardwareFilterCreateRequest{ @@ -136,8 +131,7 @@ func (a *HardwareFilterAPIService) HardwareFilterCreate(ctx context.Context) Api } // Execute executes the request -// -// @return IpamsvcCreateHardwareFilterResponse +// @return IpamsvcCreateHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilterCreateRequest) (*IpamsvcCreateHardwareFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *HardwareFilterAPIService) HardwareFilterCreateExecute(r ApiHardwareFilt newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ HardwareFilterDelete Move the hardware filter to the recycle bin. Use this method to move a __HardwareFilter__ object to the recycle bin. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterDeleteRequest */ func (a *HardwareFilterAPIService) HardwareFilterDelete(ctx context.Context, id string) ApiHardwareFilterDeleteRequest { return ApiHardwareFilterDeleteRequest{ @@ -341,37 +342,37 @@ type ApiHardwareFilterListRequest struct { tfilter *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiHardwareFilterListRequest) Filter(filter string) ApiHardwareFilterListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiHardwareFilterListRequest) OrderBy(orderBy string) ApiHardwareFilterListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHardwareFilterListRequest) Fields(fields string) ApiHardwareFilterListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiHardwareFilterListRequest) Offset(offset int32) ApiHardwareFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiHardwareFilterListRequest) Limit(limit int32) ApiHardwareFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiHardwareFilterListRequest) PageToken(pageToken string) ApiHardwareFilterListRequest { r.pageToken = &pageToken return r @@ -399,8 +400,8 @@ HardwareFilterList Retrieve hardware filters. Use this method to retrieve __HardwareFilter__ objects. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHardwareFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHardwareFilterListRequest */ func (a *HardwareFilterAPIService) HardwareFilterList(ctx context.Context) ApiHardwareFilterListRequest { return ApiHardwareFilterListRequest{ @@ -410,8 +411,7 @@ func (a *HardwareFilterAPIService) HardwareFilterList(ctx context.Context) ApiHa } // Execute executes the request -// -// @return IpamsvcListHardwareFilterResponse +// @return IpamsvcListHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilterListRequest) (*IpamsvcListHardwareFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *HardwareFilterAPIService) HardwareFilterListExecute(r ApiHardwareFilter newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiHardwareFilterReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiHardwareFilterReadRequest) Fields(fields string) ApiHardwareFilterReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ HardwareFilterRead Retrieve the hardware filter. Use this method to retrieve a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterReadRequest */ func (a *HardwareFilterAPIService) HardwareFilterRead(ctx context.Context, id string) ApiHardwareFilterReadRequest { return ApiHardwareFilterReadRequest{ @@ -553,8 +552,7 @@ func (a *HardwareFilterAPIService) HardwareFilterRead(ctx context.Context, id st } // Execute executes the request -// -// @return IpamsvcReadHardwareFilterResponse +// @return IpamsvcReadHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilterReadRequest) (*IpamsvcReadHardwareFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *HardwareFilterAPIService) HardwareFilterReadExecute(r ApiHardwareFilter newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ HardwareFilterUpdate Update the hardware filter. Use this method to update a __HardwareFilter__ object. The __HardwareFilter__ object applies options to clients with matching hardware addresses. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiHardwareFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiHardwareFilterUpdateRequest */ func (a *HardwareFilterAPIService) HardwareFilterUpdate(ctx context.Context, id string) ApiHardwareFilterUpdateRequest { return ApiHardwareFilterUpdateRequest{ @@ -675,8 +672,7 @@ func (a *HardwareFilterAPIService) HardwareFilterUpdate(ctx context.Context, id } // Execute executes the request -// -// @return IpamsvcUpdateHardwareFilterResponse +// @return IpamsvcUpdateHardwareFilterResponse func (a *HardwareFilterAPIService) HardwareFilterUpdateExecute(r ApiHardwareFilterUpdateRequest) (*IpamsvcUpdateHardwareFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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 04b54b1..5347d4c 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. @@ -166,8 +159,8 @@ The __Subnet__ object represents a set of addresses from which addresses are ass The _copy_objects_ specifies the list of objects (_ipam/address_block_ and _ipam/subnet_ only) in the _ipam/ip_space_ object to copy. The _target_ specifies the _ipam/ip_space_ object to which the objects must be copied. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceBulkCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceBulkCopyRequest */ func (a *IpSpaceAPIService) IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkCopyRequest { return ApiIpSpaceBulkCopyRequest{ @@ -177,8 +170,7 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopy(ctx context.Context) ApiIpSpaceBulkC } // Execute executes the request -// -// @return IpamsvcBulkCopyIPSpaceResponse +// @return IpamsvcBulkCopyIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) (*IpamsvcBulkCopyIPSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -261,7 +253,6 @@ func (a *IpSpaceAPIService) IpSpaceBulkCopyExecute(r ApiIpSpaceBulkCopyRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -287,9 +278,9 @@ IpSpaceCopy Copy the IP space. Use this method to copy an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceCopyRequest */ func (a *IpSpaceAPIService) IpSpaceCopy(ctx context.Context, id string) ApiIpSpaceCopyRequest { return ApiIpSpaceCopyRequest{ @@ -300,8 +291,7 @@ func (a *IpSpaceAPIService) IpSpaceCopy(ctx context.Context, id string) ApiIpSpa } // Execute executes the request -// -// @return IpamsvcCopyIPSpaceResponse +// @return IpamsvcCopyIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*IpamsvcCopyIPSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -385,7 +375,6 @@ func (a *IpSpaceAPIService) IpSpaceCopyExecute(r ApiIpSpaceCopyRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -393,6 +382,7 @@ type ApiIpSpaceCreateRequest struct { ctx context.Context ApiService IpSpaceAPI body *IpamsvcIPSpace + inherit *string } func (r ApiIpSpaceCreateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceCreateRequest { @@ -400,6 +390,12 @@ func (r ApiIpSpaceCreateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceCreateReque return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiIpSpaceCreateRequest) Inherit(inherit string) ApiIpSpaceCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiIpSpaceCreateRequest) Execute() (*IpamsvcCreateIPSpaceResponse, *http.Response, error) { return r.ApiService.IpSpaceCreateExecute(r) } @@ -410,8 +406,8 @@ IpSpaceCreate Create the IP space. Use this method to create an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceCreateRequest */ func (a *IpSpaceAPIService) IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateRequest { return ApiIpSpaceCreateRequest{ @@ -421,8 +417,7 @@ func (a *IpSpaceAPIService) IpSpaceCreate(ctx context.Context) ApiIpSpaceCreateR } // Execute executes the request -// -// @return IpamsvcCreateIPSpaceResponse +// @return IpamsvcCreateIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*IpamsvcCreateIPSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -445,6 +440,9 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -462,6 +460,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 { @@ -505,7 +511,6 @@ func (a *IpSpaceAPIService) IpSpaceCreateExecute(r ApiIpSpaceCreateRequest) (*Ip newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -525,9 +530,9 @@ IpSpaceDelete Move the IP space to the recycle bin. Use this method to move an __IPSpace__ object to the recycle bin. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceDeleteRequest */ func (a *IpSpaceAPIService) IpSpaceDelete(ctx context.Context, id string) ApiIpSpaceDeleteRequest { return ApiIpSpaceDeleteRequest{ @@ -624,39 +629,40 @@ type ApiIpSpaceListRequest struct { orderBy *string torderBy *string tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpSpaceListRequest) Fields(fields string) ApiIpSpaceListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiIpSpaceListRequest) Filter(filter string) ApiIpSpaceListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiIpSpaceListRequest) Offset(offset int32) ApiIpSpaceListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiIpSpaceListRequest) Limit(limit int32) ApiIpSpaceListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiIpSpaceListRequest) PageToken(pageToken string) ApiIpSpaceListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpSpaceListRequest) OrderBy(orderBy string) ApiIpSpaceListRequest { r.orderBy = &orderBy return r @@ -674,6 +680,12 @@ func (r ApiIpSpaceListRequest) Tfilter(tfilter string) ApiIpSpaceListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiIpSpaceListRequest) Inherit(inherit string) ApiIpSpaceListRequest { + r.inherit = &inherit + return r +} + func (r ApiIpSpaceListRequest) Execute() (*IpamsvcListIPSpaceResponse, *http.Response, error) { return r.ApiService.IpSpaceListExecute(r) } @@ -684,8 +696,8 @@ IpSpaceList Retrieve IP spaces. Use this method to retrieve __IPSpace__ objects. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpSpaceListRequest */ func (a *IpSpaceAPIService) IpSpaceList(ctx context.Context) ApiIpSpaceListRequest { return ApiIpSpaceListRequest{ @@ -695,8 +707,7 @@ func (a *IpSpaceAPIService) IpSpaceList(ctx context.Context) ApiIpSpaceListReque } // Execute executes the request -// -// @return IpamsvcListIPSpaceResponse +// @return IpamsvcListIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*IpamsvcListIPSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -740,6 +751,9 @@ func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*Ipamsv if r.tfilter != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -798,7 +812,6 @@ func (a *IpSpaceAPIService) IpSpaceListExecute(r ApiIpSpaceListRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -807,14 +820,21 @@ type ApiIpSpaceReadRequest struct { ApiService IpSpaceAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpSpaceReadRequest) Fields(fields string) ApiIpSpaceReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiIpSpaceReadRequest) Inherit(inherit string) ApiIpSpaceReadRequest { + r.inherit = &inherit + return r +} + func (r ApiIpSpaceReadRequest) Execute() (*IpamsvcReadIPSpaceResponse, *http.Response, error) { return r.ApiService.IpSpaceReadExecute(r) } @@ -825,9 +845,9 @@ IpSpaceRead Retrieve the IP space. Use this method to retrieve an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceReadRequest */ func (a *IpSpaceAPIService) IpSpaceRead(ctx context.Context, id string) ApiIpSpaceReadRequest { return ApiIpSpaceReadRequest{ @@ -838,8 +858,7 @@ func (a *IpSpaceAPIService) IpSpaceRead(ctx context.Context, id string) ApiIpSpa } // Execute executes the request -// -// @return IpamsvcReadIPSpaceResponse +// @return IpamsvcReadIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*IpamsvcReadIPSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -863,6 +882,9 @@ func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*Ipamsv if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -921,7 +943,6 @@ func (a *IpSpaceAPIService) IpSpaceReadExecute(r ApiIpSpaceReadRequest) (*Ipamsv newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -930,6 +951,7 @@ type ApiIpSpaceUpdateRequest struct { ApiService IpSpaceAPI id string body *IpamsvcIPSpace + inherit *string } func (r ApiIpSpaceUpdateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceUpdateRequest { @@ -937,6 +959,12 @@ func (r ApiIpSpaceUpdateRequest) Body(body IpamsvcIPSpace) ApiIpSpaceUpdateReque return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiIpSpaceUpdateRequest) Inherit(inherit string) ApiIpSpaceUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiIpSpaceUpdateRequest) Execute() (*IpamsvcUpdateIPSpaceResponse, *http.Response, error) { return r.ApiService.IpSpaceUpdateExecute(r) } @@ -947,9 +975,9 @@ IpSpaceUpdate Update the IP space. Use this method to update an __IPSpace__ object. The __IPSpace__ object represents an entire address space. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpSpaceUpdateRequest */ func (a *IpSpaceAPIService) IpSpaceUpdate(ctx context.Context, id string) ApiIpSpaceUpdateRequest { return ApiIpSpaceUpdateRequest{ @@ -960,8 +988,7 @@ func (a *IpSpaceAPIService) IpSpaceUpdate(ctx context.Context, id string) ApiIpS } // Execute executes the request -// -// @return IpamsvcUpdateIPSpaceResponse +// @return IpamsvcUpdateIPSpaceResponse func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*IpamsvcUpdateIPSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -985,6 +1012,9 @@ func (a *IpSpaceAPIService) IpSpaceUpdateExecute(r ApiIpSpaceUpdateRequest) (*Ip return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1002,6 +1032,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 { @@ -1045,6 +1083,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..6a4f3e9 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. @@ -125,8 +120,8 @@ IpamHostCreate Create the IPAM host. Use this method to create an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostCreateRequest */ func (a *IpamHostAPIService) IpamHostCreate(ctx context.Context) ApiIpamHostCreateRequest { return ApiIpamHostCreateRequest{ @@ -136,8 +131,7 @@ func (a *IpamHostAPIService) IpamHostCreate(ctx context.Context) ApiIpamHostCrea } // Execute executes the request -// -// @return IpamsvcCreateIpamHostResponse +// @return IpamsvcCreateIpamHostResponse func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) (*IpamsvcCreateIpamHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *IpamHostAPIService) IpamHostCreateExecute(r ApiIpamHostCreateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ IpamHostDelete Move the IPAM host to the recycle bin. Use this method to move an __IpamHost__ object to the recycle bin. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostDeleteRequest */ func (a *IpamHostAPIService) IpamHostDelete(ctx context.Context, id string) ApiIpamHostDeleteRequest { return ApiIpamHostDeleteRequest{ @@ -341,37 +342,37 @@ type ApiIpamHostListRequest struct { tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpamHostListRequest) Fields(fields string) ApiIpamHostListRequest { r.fields = &fields return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpamHostListRequest) OrderBy(orderBy string) ApiIpamHostListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiIpamHostListRequest) Filter(filter string) ApiIpamHostListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiIpamHostListRequest) Offset(offset int32) ApiIpamHostListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiIpamHostListRequest) Limit(limit int32) ApiIpamHostListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiIpamHostListRequest) PageToken(pageToken string) ApiIpamHostListRequest { r.pageToken = &pageToken return r @@ -399,8 +400,8 @@ IpamHostList Retrieve the IPAM hosts. Use this method to retrieve __IpamHost__ objects. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiIpamHostListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiIpamHostListRequest */ func (a *IpamHostAPIService) IpamHostList(ctx context.Context) ApiIpamHostListRequest { return ApiIpamHostListRequest{ @@ -410,8 +411,7 @@ func (a *IpamHostAPIService) IpamHostList(ctx context.Context) ApiIpamHostListRe } // Execute executes the request -// -// @return IpamsvcListIpamHostResponse +// @return IpamsvcListIpamHostResponse func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*IpamsvcListIpamHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *IpamHostAPIService) IpamHostListExecute(r ApiIpamHostListRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -525,13 +524,13 @@ type ApiIpamHostReadRequest struct { fields *string } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiIpamHostReadRequest) OrderBy(orderBy string) ApiIpamHostReadRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiIpamHostReadRequest) Fields(fields string) ApiIpamHostReadRequest { r.fields = &fields return r @@ -547,9 +546,9 @@ IpamHostRead Retrieve the IPAM host. Use this method to retrieve an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostReadRequest */ func (a *IpamHostAPIService) IpamHostRead(ctx context.Context, id string) ApiIpamHostReadRequest { return ApiIpamHostReadRequest{ @@ -560,8 +559,7 @@ func (a *IpamHostAPIService) IpamHostRead(ctx context.Context, id string) ApiIpa } // Execute executes the request -// -// @return IpamsvcReadIpamHostResponse +// @return IpamsvcReadIpamHostResponse func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*IpamsvcReadIpamHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -646,7 +644,6 @@ func (a *IpamHostAPIService) IpamHostReadExecute(r ApiIpamHostReadRequest) (*Ipa newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -672,9 +669,9 @@ IpamHostUpdate Update the IPAM host. Use this method to update an __IpamHost__ object. The __IpamHost__ object (_ipam/host_) represents any network connected equipment that is assigned one or more IP Addresses. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiIpamHostUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiIpamHostUpdateRequest */ func (a *IpamHostAPIService) IpamHostUpdate(ctx context.Context, id string) ApiIpamHostUpdateRequest { return ApiIpamHostUpdateRequest{ @@ -685,8 +682,7 @@ func (a *IpamHostAPIService) IpamHostUpdate(ctx context.Context, id string) ApiI } // Execute executes the request -// -// @return IpamsvcUpdateIpamHostResponse +// @return IpamsvcUpdateIpamHostResponse func (a *IpamHostAPIService) IpamHostUpdateExecute(r ApiIpamHostUpdateRequest) (*IpamsvcUpdateIpamHostResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -727,6 +723,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 +774,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..7fb1119 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). @@ -62,8 +61,8 @@ LeasesCommandCreate Perform actions like clearing DHCP lease(s). Use this method to create a __LeasesCommand__ object. The __LeasesCommand__ object (_dhcp/leases_command_) is used for performing an action like clearing DHCP lease(s). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLeasesCommandCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLeasesCommandCreateRequest */ func (a *LeasesCommandAPIService) LeasesCommandCreate(ctx context.Context) ApiLeasesCommandCreateRequest { return ApiLeasesCommandCreateRequest{ @@ -73,8 +72,7 @@ func (a *LeasesCommandAPIService) LeasesCommandCreate(ctx context.Context) ApiLe } // Execute executes the request -// -// @return IpamsvcCreateLeasesCommandResponse +// @return IpamsvcCreateLeasesCommandResponse func (a *LeasesCommandAPIService) LeasesCommandCreateExecute(r ApiLeasesCommandCreateRequest) (*IpamsvcCreateLeasesCommandResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -157,6 +155,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..6f55d12 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. @@ -125,8 +120,8 @@ OptionCodeCreate Create the DHCP option code. Use this method to create an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeCreateRequest */ func (a *OptionCodeAPIService) OptionCodeCreate(ctx context.Context) ApiOptionCodeCreateRequest { return ApiOptionCodeCreateRequest{ @@ -136,8 +131,7 @@ func (a *OptionCodeAPIService) OptionCodeCreate(ctx context.Context) ApiOptionCo } // Execute executes the request -// -// @return IpamsvcCreateOptionCodeResponse +// @return IpamsvcCreateOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequest) (*IpamsvcCreateOptionCodeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -220,7 +214,6 @@ func (a *OptionCodeAPIService) OptionCodeCreateExecute(r ApiOptionCodeCreateRequ newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +233,9 @@ OptionCodeDelete Delete the DHCP option code. Use this method to delete an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeDeleteRequest */ func (a *OptionCodeAPIService) OptionCodeDelete(ctx context.Context, id string) ApiOptionCodeDeleteRequest { return ApiOptionCodeDeleteRequest{ @@ -339,37 +332,37 @@ type ApiOptionCodeListRequest struct { orderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionCodeListRequest) Fields(fields string) ApiOptionCodeListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionCodeListRequest) Filter(filter string) ApiOptionCodeListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionCodeListRequest) Offset(offset int32) ApiOptionCodeListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionCodeListRequest) Limit(limit int32) ApiOptionCodeListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionCodeListRequest) PageToken(pageToken string) ApiOptionCodeListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionCodeListRequest) OrderBy(orderBy string) ApiOptionCodeListRequest { r.orderBy = &orderBy return r @@ -385,8 +378,8 @@ OptionCodeList Retrieve DHCP option codes. Use this method to retrieve __OptionCode__ objects. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionCodeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionCodeListRequest */ func (a *OptionCodeAPIService) OptionCodeList(ctx context.Context) ApiOptionCodeListRequest { return ApiOptionCodeListRequest{ @@ -396,8 +389,7 @@ func (a *OptionCodeAPIService) OptionCodeList(ctx context.Context) ApiOptionCode } // Execute executes the request -// -// @return IpamsvcListOptionCodeResponse +// @return IpamsvcListOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) (*IpamsvcListOptionCodeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -493,7 +485,6 @@ func (a *OptionCodeAPIService) OptionCodeListExecute(r ApiOptionCodeListRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -504,7 +495,7 @@ type ApiOptionCodeReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionCodeReadRequest) Fields(fields string) ApiOptionCodeReadRequest { r.fields = &fields return r @@ -520,9 +511,9 @@ OptionCodeRead Retrieve the DHCP option code. Use this method to retrieve an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeReadRequest */ func (a *OptionCodeAPIService) OptionCodeRead(ctx context.Context, id string) ApiOptionCodeReadRequest { return ApiOptionCodeReadRequest{ @@ -533,8 +524,7 @@ func (a *OptionCodeAPIService) OptionCodeRead(ctx context.Context, id string) Ap } // Execute executes the request -// -// @return IpamsvcReadOptionCodeResponse +// @return IpamsvcReadOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) (*IpamsvcReadOptionCodeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -616,7 +606,6 @@ func (a *OptionCodeAPIService) OptionCodeReadExecute(r ApiOptionCodeReadRequest) newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -642,9 +631,9 @@ OptionCodeUpdate Update the DHCP option code. Use this method to update an __OptionCode__ object. The __OptionCode__ object defines a DHCP option code. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionCodeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionCodeUpdateRequest */ func (a *OptionCodeAPIService) OptionCodeUpdate(ctx context.Context, id string) ApiOptionCodeUpdateRequest { return ApiOptionCodeUpdateRequest{ @@ -655,8 +644,7 @@ func (a *OptionCodeAPIService) OptionCodeUpdate(ctx context.Context, id string) } // Execute executes the request -// -// @return IpamsvcUpdateOptionCodeResponse +// @return IpamsvcUpdateOptionCodeResponse func (a *OptionCodeAPIService) OptionCodeUpdateExecute(r ApiOptionCodeUpdateRequest) (*IpamsvcUpdateOptionCodeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -740,6 +728,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..e78d8fb 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. @@ -125,8 +120,8 @@ OptionFilterCreate Create the DHCP option filter. Use this method to create an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterCreateRequest */ func (a *OptionFilterAPIService) OptionFilterCreate(ctx context.Context) ApiOptionFilterCreateRequest { return ApiOptionFilterCreateRequest{ @@ -136,8 +131,7 @@ func (a *OptionFilterAPIService) OptionFilterCreate(ctx context.Context) ApiOpti } // Execute executes the request -// -// @return IpamsvcCreateOptionFilterResponse +// @return IpamsvcCreateOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCreateRequest) (*IpamsvcCreateOptionFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *OptionFilterAPIService) OptionFilterCreateExecute(r ApiOptionFilterCrea newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ OptionFilterDelete Move the DHCP option filter to the recycle bin. Use this method to move an __OptionFilter__ object to the recycle bin. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterDeleteRequest */ func (a *OptionFilterAPIService) OptionFilterDelete(ctx context.Context, id string) ApiOptionFilterDeleteRequest { return ApiOptionFilterDeleteRequest{ @@ -341,37 +342,37 @@ type ApiOptionFilterListRequest struct { tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionFilterListRequest) Fields(fields string) ApiOptionFilterListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionFilterListRequest) Filter(filter string) ApiOptionFilterListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionFilterListRequest) Offset(offset int32) ApiOptionFilterListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionFilterListRequest) Limit(limit int32) ApiOptionFilterListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionFilterListRequest) PageToken(pageToken string) ApiOptionFilterListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionFilterListRequest) OrderBy(orderBy string) ApiOptionFilterListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ OptionFilterList Retrieve DHCP option filters. Use this method to retrieve __OptionFilter__ objects. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionFilterListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionFilterListRequest */ func (a *OptionFilterAPIService) OptionFilterList(ctx context.Context) ApiOptionFilterListRequest { return ApiOptionFilterListRequest{ @@ -410,8 +411,7 @@ func (a *OptionFilterAPIService) OptionFilterList(ctx context.Context) ApiOption } // Execute executes the request -// -// @return IpamsvcListOptionFilterResponse +// @return IpamsvcListOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRequest) (*IpamsvcListOptionFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *OptionFilterAPIService) OptionFilterListExecute(r ApiOptionFilterListRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiOptionFilterReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionFilterReadRequest) Fields(fields string) ApiOptionFilterReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ OptionFilterRead Retrieve the DHCP option filter. Use this method to retrieve an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterReadRequest */ func (a *OptionFilterAPIService) OptionFilterRead(ctx context.Context, id string) ApiOptionFilterReadRequest { return ApiOptionFilterReadRequest{ @@ -553,8 +552,7 @@ func (a *OptionFilterAPIService) OptionFilterRead(ctx context.Context, id string } // Execute executes the request -// -// @return IpamsvcReadOptionFilterResponse +// @return IpamsvcReadOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRequest) (*IpamsvcReadOptionFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *OptionFilterAPIService) OptionFilterReadExecute(r ApiOptionFilterReadRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ OptionFilterUpdate Update the DHCP option filter. Use this method to update an __OptionFilter__ object. The __OptionFilter__ object applies options to DHCP clients with matching options. It must be configured in the _filters_ list of a scope to be effective. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionFilterUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionFilterUpdateRequest */ func (a *OptionFilterAPIService) OptionFilterUpdate(ctx context.Context, id string) ApiOptionFilterUpdateRequest { return ApiOptionFilterUpdateRequest{ @@ -675,8 +672,7 @@ func (a *OptionFilterAPIService) OptionFilterUpdate(ctx context.Context, id stri } // Execute executes the request -// -// @return IpamsvcUpdateOptionFilterResponse +// @return IpamsvcUpdateOptionFilterResponse func (a *OptionFilterAPIService) OptionFilterUpdateExecute(r ApiOptionFilterUpdateRequest) (*IpamsvcUpdateOptionFilterResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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..58c865c 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. @@ -125,8 +120,8 @@ OptionGroupCreate Create the DHCP option group. Use this method to create an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupCreateRequest */ func (a *OptionGroupAPIService) OptionGroupCreate(ctx context.Context) ApiOptionGroupCreateRequest { return ApiOptionGroupCreateRequest{ @@ -136,8 +131,7 @@ func (a *OptionGroupAPIService) OptionGroupCreate(ctx context.Context) ApiOption } // Execute executes the request -// -// @return IpamsvcCreateOptionGroupResponse +// @return IpamsvcCreateOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateRequest) (*IpamsvcCreateOptionGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *OptionGroupAPIService) OptionGroupCreateExecute(r ApiOptionGroupCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ OptionGroupDelete Move the DHCP option group to the recycle bin. Use this method to move an __OptionGroup__ object to the recycle bin. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupDeleteRequest */ func (a *OptionGroupAPIService) OptionGroupDelete(ctx context.Context, id string) ApiOptionGroupDeleteRequest { return ApiOptionGroupDeleteRequest{ @@ -341,37 +342,37 @@ type ApiOptionGroupListRequest struct { tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionGroupListRequest) Fields(fields string) ApiOptionGroupListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionGroupListRequest) Filter(filter string) ApiOptionGroupListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionGroupListRequest) Offset(offset int32) ApiOptionGroupListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionGroupListRequest) Limit(limit int32) ApiOptionGroupListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionGroupListRequest) PageToken(pageToken string) ApiOptionGroupListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionGroupListRequest) OrderBy(orderBy string) ApiOptionGroupListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ OptionGroupList Retrieve DHCP option groups. Use this method to retrieve __OptionGroup__ objects. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionGroupListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionGroupListRequest */ func (a *OptionGroupAPIService) OptionGroupList(ctx context.Context) ApiOptionGroupListRequest { return ApiOptionGroupListRequest{ @@ -410,8 +411,7 @@ func (a *OptionGroupAPIService) OptionGroupList(ctx context.Context) ApiOptionGr } // Execute executes the request -// -// @return IpamsvcListOptionGroupResponse +// @return IpamsvcListOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListRequest) (*IpamsvcListOptionGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *OptionGroupAPIService) OptionGroupListExecute(r ApiOptionGroupListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiOptionGroupReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionGroupReadRequest) Fields(fields string) ApiOptionGroupReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ OptionGroupRead Retrieve the DHCP option group. Use this method to retrieve an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupReadRequest */ func (a *OptionGroupAPIService) OptionGroupRead(ctx context.Context, id string) ApiOptionGroupReadRequest { return ApiOptionGroupReadRequest{ @@ -553,8 +552,7 @@ func (a *OptionGroupAPIService) OptionGroupRead(ctx context.Context, id string) } // Execute executes the request -// -// @return IpamsvcReadOptionGroupResponse +// @return IpamsvcReadOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadRequest) (*IpamsvcReadOptionGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *OptionGroupAPIService) OptionGroupReadExecute(r ApiOptionGroupReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ OptionGroupUpdate Update the DHCP option group. Use this method to update an __OptionGroup__ object. The __OptionGroup__ object is a named collection of options. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionGroupUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionGroupUpdateRequest */ func (a *OptionGroupAPIService) OptionGroupUpdate(ctx context.Context, id string) ApiOptionGroupUpdateRequest { return ApiOptionGroupUpdateRequest{ @@ -675,8 +672,7 @@ func (a *OptionGroupAPIService) OptionGroupUpdate(ctx context.Context, id string } // Execute executes the request -// -// @return IpamsvcUpdateOptionGroupResponse +// @return IpamsvcUpdateOptionGroupResponse func (a *OptionGroupAPIService) OptionGroupUpdateExecute(r ApiOptionGroupUpdateRequest) (*IpamsvcUpdateOptionGroupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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..96c5d90 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. @@ -125,8 +120,8 @@ OptionSpaceCreate Create the DHCP option space. Use this method to create an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceCreateRequest */ func (a *OptionSpaceAPIService) OptionSpaceCreate(ctx context.Context) ApiOptionSpaceCreateRequest { return ApiOptionSpaceCreateRequest{ @@ -136,8 +131,7 @@ func (a *OptionSpaceAPIService) OptionSpaceCreate(ctx context.Context) ApiOption } // Execute executes the request -// -// @return IpamsvcCreateOptionSpaceResponse +// @return IpamsvcCreateOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateRequest) (*IpamsvcCreateOptionSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *OptionSpaceAPIService) OptionSpaceCreateExecute(r ApiOptionSpaceCreateR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ OptionSpaceDelete Move the DHCP option space to the recycle bin. Use this method to move an __OptionSpace__ object to the recycle bin. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceDeleteRequest */ func (a *OptionSpaceAPIService) OptionSpaceDelete(ctx context.Context, id string) ApiOptionSpaceDeleteRequest { return ApiOptionSpaceDeleteRequest{ @@ -341,37 +342,37 @@ type ApiOptionSpaceListRequest struct { tfilter *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionSpaceListRequest) Fields(fields string) ApiOptionSpaceListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiOptionSpaceListRequest) Filter(filter string) ApiOptionSpaceListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiOptionSpaceListRequest) Offset(offset int32) ApiOptionSpaceListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiOptionSpaceListRequest) Limit(limit int32) ApiOptionSpaceListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiOptionSpaceListRequest) PageToken(pageToken string) ApiOptionSpaceListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiOptionSpaceListRequest) OrderBy(orderBy string) ApiOptionSpaceListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ OptionSpaceList Retrieve DHCP option spaces. Use this method to retrieve __OptionSpace__ objects. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOptionSpaceListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOptionSpaceListRequest */ func (a *OptionSpaceAPIService) OptionSpaceList(ctx context.Context) ApiOptionSpaceListRequest { return ApiOptionSpaceListRequest{ @@ -410,8 +411,7 @@ func (a *OptionSpaceAPIService) OptionSpaceList(ctx context.Context) ApiOptionSp } // Execute executes the request -// -// @return IpamsvcListOptionSpaceResponse +// @return IpamsvcListOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListRequest) (*IpamsvcListOptionSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *OptionSpaceAPIService) OptionSpaceListExecute(r ApiOptionSpaceListReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiOptionSpaceReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiOptionSpaceReadRequest) Fields(fields string) ApiOptionSpaceReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ OptionSpaceRead Retrieve the DHCP option space. Use this method to retrieve an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceReadRequest */ func (a *OptionSpaceAPIService) OptionSpaceRead(ctx context.Context, id string) ApiOptionSpaceReadRequest { return ApiOptionSpaceReadRequest{ @@ -553,8 +552,7 @@ func (a *OptionSpaceAPIService) OptionSpaceRead(ctx context.Context, id string) } // Execute executes the request -// -// @return IpamsvcReadOptionSpaceResponse +// @return IpamsvcReadOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadRequest) (*IpamsvcReadOptionSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *OptionSpaceAPIService) OptionSpaceReadExecute(r ApiOptionSpaceReadReque newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ OptionSpaceUpdate Update the DHCP option space. Use this method to update an __OptionSpace__ object. The __OptionSpace__ object represents a set of DHCP option codes. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiOptionSpaceUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiOptionSpaceUpdateRequest */ func (a *OptionSpaceAPIService) OptionSpaceUpdate(ctx context.Context, id string) ApiOptionSpaceUpdateRequest { return ApiOptionSpaceUpdateRequest{ @@ -675,8 +672,7 @@ func (a *OptionSpaceAPIService) OptionSpaceUpdate(ctx context.Context, id string } // Execute executes the request -// -// @return IpamsvcUpdateOptionSpaceResponse +// @return IpamsvcUpdateOptionSpaceResponse func (a *OptionSpaceAPIService) OptionSpaceUpdateExecute(r ApiOptionSpaceUpdateRequest) (*IpamsvcUpdateOptionSpaceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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 11faf19..4f54ce9 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. @@ -140,6 +133,7 @@ type ApiRangeCreateRequest struct { ctx context.Context ApiService RangeAPI body *IpamsvcRange + inherit *string } func (r ApiRangeCreateRequest) Body(body IpamsvcRange) ApiRangeCreateRequest { @@ -147,6 +141,12 @@ func (r ApiRangeCreateRequest) Body(body IpamsvcRange) ApiRangeCreateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiRangeCreateRequest) Inherit(inherit string) ApiRangeCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiRangeCreateRequest) Execute() (*IpamsvcCreateRangeResponse, *http.Response, error) { return r.ApiService.RangeCreateExecute(r) } @@ -157,8 +157,8 @@ RangeCreate Create the range. Use this method to create a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeCreateRequest */ func (a *RangeAPIService) RangeCreate(ctx context.Context) ApiRangeCreateRequest { return ApiRangeCreateRequest{ @@ -168,8 +168,7 @@ func (a *RangeAPIService) RangeCreate(ctx context.Context) ApiRangeCreateRequest } // Execute executes the request -// -// @return IpamsvcCreateRangeResponse +// @return IpamsvcCreateRangeResponse func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcCreateRangeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -192,6 +191,9 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -209,6 +211,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 { @@ -252,7 +262,6 @@ func (a *RangeAPIService) RangeCreateExecute(r ApiRangeCreateRequest) (*IpamsvcC newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -286,9 +295,9 @@ RangeCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeCreateNextAvailableIPRequest */ func (a *RangeAPIService) RangeCreateNextAvailableIP(ctx context.Context, id string) ApiRangeCreateNextAvailableIPRequest { return ApiRangeCreateNextAvailableIPRequest{ @@ -299,8 +308,7 @@ func (a *RangeAPIService) RangeCreateNextAvailableIP(ctx context.Context, id str } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableIPResponse +// @return IpamsvcCreateNextAvailableIPResponse func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -391,7 +399,6 @@ func (a *RangeAPIService) RangeCreateNextAvailableIPExecute(r ApiRangeCreateNext newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -411,9 +418,9 @@ RangeDelete Move the range to the recycle bin. Use this method to move a __Range__ object to the recycle bin. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeDeleteRequest */ func (a *RangeAPIService) RangeDelete(ctx context.Context, id string) ApiRangeDeleteRequest { return ApiRangeDeleteRequest{ @@ -510,39 +517,40 @@ type ApiRangeListRequest struct { pageToken *string torderBy *string tfilter *string + inherit *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiRangeListRequest) Filter(filter string) ApiRangeListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiRangeListRequest) OrderBy(orderBy string) ApiRangeListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRangeListRequest) Fields(fields string) ApiRangeListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiRangeListRequest) Offset(offset int32) ApiRangeListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiRangeListRequest) Limit(limit int32) ApiRangeListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiRangeListRequest) PageToken(pageToken string) ApiRangeListRequest { r.pageToken = &pageToken return r @@ -560,6 +568,12 @@ func (r ApiRangeListRequest) Tfilter(tfilter string) ApiRangeListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiRangeListRequest) Inherit(inherit string) ApiRangeListRequest { + r.inherit = &inherit + return r +} + func (r ApiRangeListRequest) Execute() (*IpamsvcListRangeResponse, *http.Response, error) { return r.ApiService.RangeListExecute(r) } @@ -570,8 +584,8 @@ RangeList Retrieve ranges. Use this method to retrieve __Range__ objects. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRangeListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRangeListRequest */ func (a *RangeAPIService) RangeList(ctx context.Context) ApiRangeListRequest { return ApiRangeListRequest{ @@ -581,8 +595,7 @@ func (a *RangeAPIService) RangeList(ctx context.Context) ApiRangeListRequest { } // Execute executes the request -// -// @return IpamsvcListRangeResponse +// @return IpamsvcListRangeResponse func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListRangeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -626,6 +639,9 @@ func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListR if r.tfilter != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -684,7 +700,6 @@ func (a *RangeAPIService) RangeListExecute(r ApiRangeListRequest) (*IpamsvcListR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -718,9 +733,9 @@ RangeListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeListNextAvailableIPRequest */ func (a *RangeAPIService) RangeListNextAvailableIP(ctx context.Context, id string) ApiRangeListNextAvailableIPRequest { return ApiRangeListNextAvailableIPRequest{ @@ -731,8 +746,7 @@ func (a *RangeAPIService) RangeListNextAvailableIP(ctx context.Context, id strin } // Execute executes the request -// -// @return IpamsvcNextAvailableIPResponse +// @return IpamsvcNextAvailableIPResponse func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -817,7 +831,6 @@ func (a *RangeAPIService) RangeListNextAvailableIPExecute(r ApiRangeListNextAvai newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -826,14 +839,21 @@ type ApiRangeReadRequest struct { ApiService RangeAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiRangeReadRequest) Fields(fields string) ApiRangeReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiRangeReadRequest) Inherit(inherit string) ApiRangeReadRequest { + r.inherit = &inherit + return r +} + func (r ApiRangeReadRequest) Execute() (*IpamsvcReadRangeResponse, *http.Response, error) { return r.ApiService.RangeReadExecute(r) } @@ -844,9 +864,9 @@ RangeRead Retrieve the range. Use this method to retrieve a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeReadRequest */ func (a *RangeAPIService) RangeRead(ctx context.Context, id string) ApiRangeReadRequest { return ApiRangeReadRequest{ @@ -857,8 +877,7 @@ func (a *RangeAPIService) RangeRead(ctx context.Context, id string) ApiRangeRead } // Execute executes the request -// -// @return IpamsvcReadRangeResponse +// @return IpamsvcReadRangeResponse func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadRangeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -882,6 +901,9 @@ func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadR if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -940,7 +962,6 @@ func (a *RangeAPIService) RangeReadExecute(r ApiRangeReadRequest) (*IpamsvcReadR newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -949,6 +970,7 @@ type ApiRangeUpdateRequest struct { ApiService RangeAPI id string body *IpamsvcRange + inherit *string } func (r ApiRangeUpdateRequest) Body(body IpamsvcRange) ApiRangeUpdateRequest { @@ -956,6 +978,12 @@ func (r ApiRangeUpdateRequest) Body(body IpamsvcRange) ApiRangeUpdateRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiRangeUpdateRequest) Inherit(inherit string) ApiRangeUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiRangeUpdateRequest) Execute() (*IpamsvcUpdateRangeResponse, *http.Response, error) { return r.ApiService.RangeUpdateExecute(r) } @@ -966,9 +994,9 @@ RangeUpdate Update the range. Use this method to update a __Range__ object. A __Range__ object represents a set of contiguous IP addresses in the same IP space with no gap, expressed as a (start, end) pair within a given subnet that are grouped together for administrative purpose and protocol management. The start and end values are not required to align with CIDR boundaries. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiRangeUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiRangeUpdateRequest */ func (a *RangeAPIService) RangeUpdate(ctx context.Context, id string) ApiRangeUpdateRequest { return ApiRangeUpdateRequest{ @@ -979,8 +1007,7 @@ func (a *RangeAPIService) RangeUpdate(ctx context.Context, id string) ApiRangeUp } // Execute executes the request -// -// @return IpamsvcUpdateRangeResponse +// @return IpamsvcUpdateRangeResponse func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcUpdateRangeResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -1004,6 +1031,9 @@ func (a *RangeAPIService) RangeUpdateExecute(r ApiRangeUpdateRequest) (*IpamsvcU return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1021,6 +1051,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 { @@ -1064,6 +1102,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 da8f43f..de04913 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. @@ -108,6 +103,7 @@ type ApiServerCreateRequest struct { ctx context.Context ApiService ServerAPI body *IpamsvcServer + inherit *string } func (r ApiServerCreateRequest) Body(body IpamsvcServer) ApiServerCreateRequest { @@ -115,6 +111,12 @@ func (r ApiServerCreateRequest) Body(body IpamsvcServer) ApiServerCreateRequest return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerCreateRequest) Inherit(inherit string) ApiServerCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiServerCreateRequest) Execute() (*IpamsvcCreateServerResponse, *http.Response, error) { return r.ApiService.ServerCreateExecute(r) } @@ -125,8 +127,8 @@ ServerCreate Create the DHCP configuration profile. Use this method to create a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerCreateRequest */ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequest { return ApiServerCreateRequest{ @@ -136,8 +138,7 @@ func (a *ServerAPIService) ServerCreate(ctx context.Context) ApiServerCreateRequ } // Execute executes the request -// -// @return IpamsvcCreateServerResponse +// @return IpamsvcCreateServerResponse func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*IpamsvcCreateServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -160,6 +161,9 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -177,6 +181,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 { @@ -220,7 +232,6 @@ func (a *ServerAPIService) ServerCreateExecute(r ApiServerCreateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +251,9 @@ ServerDelete Move the DHCP configuration profile to the recycle bin. Use this method to move a __Server__ object to the recycle bin. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerDeleteRequest */ func (a *ServerAPIService) ServerDelete(ctx context.Context, id string) ApiServerDeleteRequest { return ApiServerDeleteRequest{ @@ -339,39 +350,40 @@ type ApiServerListRequest struct { pageToken *string torderBy *string tfilter *string + inherit *string } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiServerListRequest) Filter(filter string) ApiServerListRequest { r.filter = &filter return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiServerListRequest) OrderBy(orderBy string) ApiServerListRequest { r.orderBy = &orderBy return r } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerListRequest) Fields(fields string) ApiServerListRequest { r.fields = &fields return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiServerListRequest) Offset(offset int32) ApiServerListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiServerListRequest) Limit(limit int32) ApiServerListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiServerListRequest) PageToken(pageToken string) ApiServerListRequest { r.pageToken = &pageToken return r @@ -389,6 +401,12 @@ func (r ApiServerListRequest) Tfilter(tfilter string) ApiServerListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerListRequest) Inherit(inherit string) ApiServerListRequest { + r.inherit = &inherit + return r +} + func (r ApiServerListRequest) Execute() (*IpamsvcListServerResponse, *http.Response, error) { return r.ApiService.ServerListExecute(r) } @@ -399,8 +417,8 @@ ServerList Retrieve DHCP configuration profiles. Use this method to retrieve __Server__ objects. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiServerListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiServerListRequest */ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest { return ApiServerListRequest{ @@ -410,8 +428,7 @@ func (a *ServerAPIService) ServerList(ctx context.Context) ApiServerListRequest } // Execute executes the request -// -// @return IpamsvcListServerResponse +// @return IpamsvcListServerResponse func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcListServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -455,6 +472,9 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcLi if r.tfilter != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -513,7 +533,6 @@ func (a *ServerAPIService) ServerListExecute(r ApiServerListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -522,14 +541,21 @@ type ApiServerReadRequest struct { ApiService ServerAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiServerReadRequest) Fields(fields string) ApiServerReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerReadRequest) Inherit(inherit string) ApiServerReadRequest { + r.inherit = &inherit + return r +} + func (r ApiServerReadRequest) Execute() (*IpamsvcReadServerResponse, *http.Response, error) { return r.ApiService.ServerReadExecute(r) } @@ -540,9 +566,9 @@ ServerRead Retrieve the DHCP configuration profile. Use this method to retrieve a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerReadRequest */ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerReadRequest { return ApiServerReadRequest{ @@ -553,8 +579,7 @@ func (a *ServerAPIService) ServerRead(ctx context.Context, id string) ApiServerR } // Execute executes the request -// -// @return IpamsvcReadServerResponse +// @return IpamsvcReadServerResponse func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcReadServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -578,6 +603,9 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcRe if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -636,7 +664,6 @@ func (a *ServerAPIService) ServerReadExecute(r ApiServerReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -645,6 +672,7 @@ type ApiServerUpdateRequest struct { ApiService ServerAPI id string body *IpamsvcServer + inherit *string } func (r ApiServerUpdateRequest) Body(body IpamsvcServer) ApiServerUpdateRequest { @@ -652,6 +680,12 @@ func (r ApiServerUpdateRequest) Body(body IpamsvcServer) ApiServerUpdateRequest return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiServerUpdateRequest) Inherit(inherit string) ApiServerUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiServerUpdateRequest) Execute() (*IpamsvcUpdateServerResponse, *http.Response, error) { return r.ApiService.ServerUpdateExecute(r) } @@ -662,9 +696,9 @@ ServerUpdate Update the DHCP configuration profile. Use this method to update a __Server__ object. A __Server__ (DHCP Config Profile) is a named configuration profile that can be shared for specified list of hosts. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiServerUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiServerUpdateRequest */ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServerUpdateRequest { return ApiServerUpdateRequest{ @@ -675,8 +709,7 @@ func (a *ServerAPIService) ServerUpdate(ctx context.Context, id string) ApiServe } // Execute executes the request -// -// @return IpamsvcUpdateServerResponse +// @return IpamsvcUpdateServerResponse func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*IpamsvcUpdateServerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -700,6 +733,9 @@ func (a *ServerAPIService) ServerUpdateExecute(r ApiServerUpdateRequest) (*Ipams return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -717,6 +753,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 { @@ -760,6 +804,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 9f331f1..72df262 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. @@ -174,9 +166,9 @@ SubnetCopy Copy the subnet. Use this method to copy a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCopyRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCopyRequest */ func (a *SubnetAPIService) SubnetCopy(ctx context.Context, id string) ApiSubnetCopyRequest { return ApiSubnetCopyRequest{ @@ -187,8 +179,7 @@ func (a *SubnetAPIService) SubnetCopy(ctx context.Context, id string) ApiSubnetC } // Execute executes the request -// -// @return IpamsvcCopySubnetResponse +// @return IpamsvcCopySubnetResponse func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCopySubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -272,7 +263,6 @@ func (a *SubnetAPIService) SubnetCopyExecute(r ApiSubnetCopyRequest) (*IpamsvcCo newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -280,6 +270,7 @@ type ApiSubnetCreateRequest struct { ctx context.Context ApiService SubnetAPI body *IpamsvcSubnet + inherit *string } func (r ApiSubnetCreateRequest) Body(body IpamsvcSubnet) ApiSubnetCreateRequest { @@ -287,6 +278,12 @@ func (r ApiSubnetCreateRequest) Body(body IpamsvcSubnet) ApiSubnetCreateRequest return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiSubnetCreateRequest) Inherit(inherit string) ApiSubnetCreateRequest { + r.inherit = &inherit + return r +} + func (r ApiSubnetCreateRequest) Execute() (*IpamsvcCreateSubnetResponse, *http.Response, error) { return r.ApiService.SubnetCreateExecute(r) } @@ -297,8 +294,8 @@ SubnetCreate Create the subnet. Use this method to create a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetCreateRequest */ func (a *SubnetAPIService) SubnetCreate(ctx context.Context) ApiSubnetCreateRequest { return ApiSubnetCreateRequest{ @@ -308,8 +305,7 @@ func (a *SubnetAPIService) SubnetCreate(ctx context.Context) ApiSubnetCreateRequ } // Execute executes the request -// -// @return IpamsvcCreateSubnetResponse +// @return IpamsvcCreateSubnetResponse func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*IpamsvcCreateSubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -332,6 +328,9 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -349,6 +348,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 { @@ -392,7 +399,6 @@ func (a *SubnetAPIService) SubnetCreateExecute(r ApiSubnetCreateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -426,9 +432,9 @@ SubnetCreateNextAvailableIP Allocate the next available IP address. Use this method to allocate the next available IP address. This allocates one or more __Address__ (_ipam/address_) resource from available addresses, when the IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetCreateNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetCreateNextAvailableIPRequest */ func (a *SubnetAPIService) SubnetCreateNextAvailableIP(ctx context.Context, id string) ApiSubnetCreateNextAvailableIPRequest { return ApiSubnetCreateNextAvailableIPRequest{ @@ -439,8 +445,7 @@ func (a *SubnetAPIService) SubnetCreateNextAvailableIP(ctx context.Context, id s } // Execute executes the request -// -// @return IpamsvcCreateNextAvailableIPResponse +// @return IpamsvcCreateNextAvailableIPResponse func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateNextAvailableIPRequest) (*IpamsvcCreateNextAvailableIPResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -531,7 +536,6 @@ func (a *SubnetAPIService) SubnetCreateNextAvailableIPExecute(r ApiSubnetCreateN newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -551,9 +555,9 @@ SubnetDelete Move the subnet to the recycle bin. Use this method to move a __Subnet__ object to the recycle bin. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetDeleteRequest */ func (a *SubnetAPIService) SubnetDelete(ctx context.Context, id string) ApiSubnetDeleteRequest { return ApiSubnetDeleteRequest{ @@ -650,39 +654,40 @@ type ApiSubnetListRequest struct { orderBy *string torderBy *string tfilter *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiSubnetListRequest) Fields(fields string) ApiSubnetListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiSubnetListRequest) Filter(filter string) ApiSubnetListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiSubnetListRequest) Offset(offset int32) ApiSubnetListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiSubnetListRequest) Limit(limit int32) ApiSubnetListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiSubnetListRequest) PageToken(pageToken string) ApiSubnetListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiSubnetListRequest) OrderBy(orderBy string) ApiSubnetListRequest { r.orderBy = &orderBy return r @@ -700,6 +705,12 @@ func (r ApiSubnetListRequest) Tfilter(tfilter string) ApiSubnetListRequest { return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiSubnetListRequest) Inherit(inherit string) ApiSubnetListRequest { + r.inherit = &inherit + return r +} + func (r ApiSubnetListRequest) Execute() (*IpamsvcListSubnetResponse, *http.Response, error) { return r.ApiService.SubnetListExecute(r) } @@ -710,8 +721,8 @@ SubnetList Retrieve subnets. Use this method to retrieve __Subnet__ objects. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSubnetListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSubnetListRequest */ func (a *SubnetAPIService) SubnetList(ctx context.Context) ApiSubnetListRequest { return ApiSubnetListRequest{ @@ -721,8 +732,7 @@ func (a *SubnetAPIService) SubnetList(ctx context.Context) ApiSubnetListRequest } // Execute executes the request -// -// @return IpamsvcListSubnetResponse +// @return IpamsvcListSubnetResponse func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcListSubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -766,6 +776,9 @@ func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcLi if r.tfilter != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_tfilter", r.tfilter, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -824,7 +837,6 @@ func (a *SubnetAPIService) SubnetListExecute(r ApiSubnetListRequest) (*IpamsvcLi newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -858,9 +870,9 @@ SubnetListNextAvailableIP Retrieve the next available IP address. Use this method to retrieve the next available IP address. This returns one or more __Address__ (_ipam/address_) resource from available addresses, when IP address is not known prior to allocation. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetListNextAvailableIPRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetListNextAvailableIPRequest */ func (a *SubnetAPIService) SubnetListNextAvailableIP(ctx context.Context, id string) ApiSubnetListNextAvailableIPRequest { return ApiSubnetListNextAvailableIPRequest{ @@ -871,8 +883,7 @@ func (a *SubnetAPIService) SubnetListNextAvailableIP(ctx context.Context, id str } // Execute executes the request -// -// @return IpamsvcNextAvailableIPResponse +// @return IpamsvcNextAvailableIPResponse func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextAvailableIPRequest) (*IpamsvcNextAvailableIPResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -957,7 +968,6 @@ func (a *SubnetAPIService) SubnetListNextAvailableIPExecute(r ApiSubnetListNextA newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -966,14 +976,21 @@ type ApiSubnetReadRequest struct { ApiService SubnetAPI id string fields *string + inherit *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiSubnetReadRequest) Fields(fields string) ApiSubnetReadRequest { r.fields = &fields return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiSubnetReadRequest) Inherit(inherit string) ApiSubnetReadRequest { + r.inherit = &inherit + return r +} + func (r ApiSubnetReadRequest) Execute() (*IpamsvcReadSubnetResponse, *http.Response, error) { return r.ApiService.SubnetReadExecute(r) } @@ -984,9 +1001,9 @@ SubnetRead Retrieve the subnet. Use this method to retrieve a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetReadRequest */ func (a *SubnetAPIService) SubnetRead(ctx context.Context, id string) ApiSubnetReadRequest { return ApiSubnetReadRequest{ @@ -997,8 +1014,7 @@ func (a *SubnetAPIService) SubnetRead(ctx context.Context, id string) ApiSubnetR } // Execute executes the request -// -// @return IpamsvcReadSubnetResponse +// @return IpamsvcReadSubnetResponse func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcReadSubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1022,6 +1038,9 @@ func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcRe if r.fields != nil { internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_fields", r.fields, "") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1080,7 +1099,6 @@ func (a *SubnetAPIService) SubnetReadExecute(r ApiSubnetReadRequest) (*IpamsvcRe newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -1089,6 +1107,7 @@ type ApiSubnetUpdateRequest struct { ApiService SubnetAPI id string body *IpamsvcSubnet + inherit *string } func (r ApiSubnetUpdateRequest) Body(body IpamsvcSubnet) ApiSubnetUpdateRequest { @@ -1096,6 +1115,12 @@ func (r ApiSubnetUpdateRequest) Body(body IpamsvcSubnet) ApiSubnetUpdateRequest return r } +// This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none +func (r ApiSubnetUpdateRequest) Inherit(inherit string) ApiSubnetUpdateRequest { + r.inherit = &inherit + return r +} + func (r ApiSubnetUpdateRequest) Execute() (*IpamsvcUpdateSubnetResponse, *http.Response, error) { return r.ApiService.SubnetUpdateExecute(r) } @@ -1106,9 +1131,9 @@ SubnetUpdate Update the subnet. Use this method to update a __Subnet__ object. The __Subnet__ object represents a set of addresses from which addresses are assigned to network equipment interfaces. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiSubnetUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiSubnetUpdateRequest */ func (a *SubnetAPIService) SubnetUpdate(ctx context.Context, id string) ApiSubnetUpdateRequest { return ApiSubnetUpdateRequest{ @@ -1119,8 +1144,7 @@ func (a *SubnetAPIService) SubnetUpdate(ctx context.Context, id string) ApiSubne } // Execute executes the request -// -// @return IpamsvcUpdateSubnetResponse +// @return IpamsvcUpdateSubnetResponse func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*IpamsvcUpdateSubnetResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -1144,6 +1168,9 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") } + if r.inherit != nil { + internal.ParameterAddToHeaderOrQuery(localVarQueryParams, "_inherit", r.inherit, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1161,6 +1188,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 { @@ -1204,6 +1239,5 @@ func (a *SubnetAPIService) SubnetUpdateExecute(r ApiSubnetUpdateRequest) (*Ipams newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/ipam/client.go b/ipam/client.go index 8650416..ab22f7e 100644 --- a/ipam/client.go +++ b/ipam/client.go @@ -11,7 +11,7 @@ API version: v1 package ipam import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,36 +19,36 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the IP Address Management API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services - AddressAPI AddressAPI - AddressBlockAPI AddressBlockAPI - AsmAPI AsmAPI - DhcpHostAPI DhcpHostAPI - DnsUsageAPI DnsUsageAPI - FilterAPI FilterAPI - FixedAddressAPI FixedAddressAPI - GlobalAPI GlobalAPI - HaGroupAPI HaGroupAPI + AddressAPI AddressAPI + AddressBlockAPI AddressBlockAPI + AsmAPI AsmAPI + DhcpHostAPI DhcpHostAPI + DnsUsageAPI DnsUsageAPI + FilterAPI FilterAPI + FixedAddressAPI FixedAddressAPI + GlobalAPI GlobalAPI + HaGroupAPI HaGroupAPI HardwareFilterAPI HardwareFilterAPI - IpSpaceAPI IpSpaceAPI - IpamHostAPI IpamHostAPI - LeasesCommandAPI LeasesCommandAPI - OptionCodeAPI OptionCodeAPI - OptionFilterAPI OptionFilterAPI - OptionGroupAPI OptionGroupAPI - OptionSpaceAPI OptionSpaceAPI - RangeAPI RangeAPI - ServerAPI ServerAPI - SubnetAPI SubnetAPI + IpSpaceAPI IpSpaceAPI + IpamHostAPI IpamHostAPI + LeasesCommandAPI LeasesCommandAPI + OptionCodeAPI OptionCodeAPI + OptionFilterAPI OptionFilterAPI + OptionGroupAPI OptionGroupAPI + OptionSpaceAPI OptionSpaceAPI + RangeAPI RangeAPI + ServerAPI ServerAPI + SubnetAPI SubnetAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.AddressAPI = (*AddressAPIService)(&c.Common) diff --git a/ipam/docs/AddressBlockAPI.md b/ipam/docs/AddressBlockAPI.md index e7d8f4c..1eae92e 100644 --- a/ipam/docs/AddressBlockAPI.md +++ b/ipam/docs/AddressBlockAPI.md @@ -93,7 +93,7 @@ Name | Type | Description | Notes ## AddressBlockCreate -> IpamsvcCreateAddressBlockResponse AddressBlockCreate(ctx).Body(body).Execute() +> IpamsvcCreateAddressBlockResponse AddressBlockCreate(ctx).Body(body).Inherit(inherit).Execute() Create the address block. @@ -113,10 +113,11 @@ import ( func main() { body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -138,6 +139,7 @@ Other parameters are passed through a pointer to a apiAddressBlockCreateRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcAddressBlock**](IpamsvcAddressBlock.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -459,7 +461,7 @@ Name | Type | Description | Notes ## AddressBlockList -> IpamsvcListAddressBlockResponse AddressBlockList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() +> IpamsvcListAddressBlockResponse AddressBlockList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() Retrieve the address blocks. @@ -486,10 +488,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + resp, r, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -518,6 +521,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **torderBy** | **string** | This parameter is used for sorting by tags. | **tfilter** | **string** | This parameter is used for filtering by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -771,7 +775,7 @@ Name | Type | Description | Notes ## AddressBlockRead -> IpamsvcReadAddressBlockResponse AddressBlockRead(ctx, id).Fields(fields).Execute() +> IpamsvcReadAddressBlockResponse AddressBlockRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the address block. @@ -792,10 +796,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -822,6 +827,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -843,7 +849,7 @@ Name | Type | Description | Notes ## AddressBlockUpdate -> IpamsvcUpdateAddressBlockResponse AddressBlockUpdate(ctx, id).Body(body).Execute() +> IpamsvcUpdateAddressBlockResponse AddressBlockUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the address block. @@ -864,10 +870,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -894,6 +901,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcAddressBlock**](IpamsvcAddressBlock.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/ipam/docs/FixedAddressAPI.md b/ipam/docs/FixedAddressAPI.md index f4225ee..f69e942 100644 --- a/ipam/docs/FixedAddressAPI.md +++ b/ipam/docs/FixedAddressAPI.md @@ -14,7 +14,7 @@ Method | HTTP request | Description ## FixedAddressCreate -> IpamsvcCreateFixedAddressResponse FixedAddressCreate(ctx).Body(body).Execute() +> IpamsvcCreateFixedAddressResponse FixedAddressCreate(ctx).Body(body).Inherit(inherit).Execute() Create the fixed address. @@ -34,10 +34,11 @@ import ( func main() { body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -59,6 +60,7 @@ Other parameters are passed through a pointer to a apiFixedAddressCreateRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcFixedAddress**](IpamsvcFixedAddress.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -148,7 +150,7 @@ Name | Type | Description | Notes ## FixedAddressList -> IpamsvcListFixedAddressResponse FixedAddressList(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() +> IpamsvcListFixedAddressResponse FixedAddressList(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() Retrieve fixed addresses. @@ -175,10 +177,11 @@ func main() { pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + resp, r, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -207,6 +210,7 @@ Name | Type | Description | Notes **pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | **torderBy** | **string** | This parameter is used for sorting by tags. | **tfilter** | **string** | This parameter is used for filtering by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -228,7 +232,7 @@ Name | Type | Description | Notes ## FixedAddressRead -> IpamsvcReadFixedAddressResponse FixedAddressRead(ctx, id).Fields(fields).Execute() +> IpamsvcReadFixedAddressResponse FixedAddressRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the fixed address. @@ -249,10 +253,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -279,6 +284,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -300,7 +306,7 @@ Name | Type | Description | Notes ## FixedAddressUpdate -> IpamsvcUpdateFixedAddressResponse FixedAddressUpdate(ctx, id).Body(body).Execute() +> IpamsvcUpdateFixedAddressResponse FixedAddressUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the fixed address. @@ -321,10 +327,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -351,6 +358,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcFixedAddress**](IpamsvcFixedAddress.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/ipam/docs/InheritanceInheritedBool.md b/ipam/docs/InheritanceInheritedBool.md index cce2628..0bb5c46 100644 --- a/ipam/docs/InheritanceInheritedBool.md +++ b/ipam/docs/InheritanceInheritedBool.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **bool** | The inherited value. | [optional] [readonly] ## Methods diff --git a/ipam/docs/InheritanceInheritedFloat.md b/ipam/docs/InheritanceInheritedFloat.md index 94a4de8..167a86c 100644 --- a/ipam/docs/InheritanceInheritedFloat.md +++ b/ipam/docs/InheritanceInheritedFloat.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **float32** | The inherited value. | [optional] [readonly] ## Methods diff --git a/ipam/docs/InheritanceInheritedIdentifier.md b/ipam/docs/InheritanceInheritedIdentifier.md index 481a6c7..da0818b 100644 --- a/ipam/docs/InheritanceInheritedIdentifier.md +++ b/ipam/docs/InheritanceInheritedIdentifier.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **string** | The resource identifier. | [optional] ## Methods diff --git a/ipam/docs/InheritanceInheritedString.md b/ipam/docs/InheritanceInheritedString.md index 9a05060..3b3efa2 100644 --- a/ipam/docs/InheritanceInheritedString.md +++ b/ipam/docs/InheritanceInheritedString.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **string** | The inherited value. | [optional] [readonly] ## Methods diff --git a/ipam/docs/InheritanceInheritedUInt32.md b/ipam/docs/InheritanceInheritedUInt32.md index fa22ae0..ec41b0b 100644 --- a/ipam/docs/InheritanceInheritedUInt32.md +++ b/ipam/docs/InheritanceInheritedUInt32.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting for a field. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **int64** | The inherited value. | [optional] [readonly] ## Methods diff --git a/ipam/docs/InheritedDHCPConfigFilterList.md b/ipam/docs/InheritedDHCPConfigFilterList.md index 2621d17..2c29536 100644 --- a/ipam/docs/InheritedDHCPConfigFilterList.md +++ b/ipam/docs/InheritedDHCPConfigFilterList.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to **[]string** | The resource identifier. | [optional] ## Methods diff --git a/ipam/docs/InheritedDHCPConfigIgnoreItemList.md b/ipam/docs/InheritedDHCPConfigIgnoreItemList.md index cc07f12..15b3b7f 100644 --- a/ipam/docs/InheritedDHCPConfigIgnoreItemList.md +++ b/ipam/docs/InheritedDHCPConfigIgnoreItemList.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**[]IpamsvcIgnoreItem**](IpamsvcIgnoreItem.md) | The inherited value. | [optional] [readonly] ## Methods diff --git a/ipam/docs/IpSpaceAPI.md b/ipam/docs/IpSpaceAPI.md index c2f5b8d..4c0a896 100644 --- a/ipam/docs/IpSpaceAPI.md +++ b/ipam/docs/IpSpaceAPI.md @@ -154,7 +154,7 @@ Name | Type | Description | Notes ## IpSpaceCreate -> IpamsvcCreateIPSpaceResponse IpSpaceCreate(ctx).Body(body).Execute() +> IpamsvcCreateIPSpaceResponse IpSpaceCreate(ctx).Body(body).Inherit(inherit).Execute() Create the IP space. @@ -174,10 +174,11 @@ import ( func main() { body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -199,6 +200,7 @@ Other parameters are passed through a pointer to a apiIpSpaceCreateRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcIPSpace**](IpamsvcIPSpace.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -288,7 +290,7 @@ Name | Type | Description | Notes ## IpSpaceList -> IpamsvcListIPSpaceResponse IpSpaceList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() +> IpamsvcListIPSpaceResponse IpSpaceList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() Retrieve IP spaces. @@ -315,10 +317,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + resp, r, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -347,6 +350,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **torderBy** | **string** | This parameter is used for sorting by tags. | **tfilter** | **string** | This parameter is used for filtering by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -368,7 +372,7 @@ Name | Type | Description | Notes ## IpSpaceRead -> IpamsvcReadIPSpaceResponse IpSpaceRead(ctx, id).Fields(fields).Execute() +> IpamsvcReadIPSpaceResponse IpSpaceRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the IP space. @@ -389,10 +393,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -419,6 +424,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -440,7 +446,7 @@ Name | Type | Description | Notes ## IpSpaceUpdate -> IpamsvcUpdateIPSpaceResponse IpSpaceUpdate(ctx, id).Body(body).Execute() +> IpamsvcUpdateIPSpaceResponse IpSpaceUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the IP space. @@ -461,10 +467,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -491,6 +498,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcIPSpace**](IpamsvcIPSpace.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/ipam/docs/IpamsvcInheritedAsmEnableBlock.md b/ipam/docs/IpamsvcInheritedAsmEnableBlock.md index e7657df..8dc7a12 100644 --- a/ipam/docs/IpamsvcInheritedAsmEnableBlock.md +++ b/ipam/docs/IpamsvcInheritedAsmEnableBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcAsmEnableBlock**](IpamsvcAsmEnableBlock.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcInheritedAsmGrowthBlock.md b/ipam/docs/IpamsvcInheritedAsmGrowthBlock.md index 0c63171..b3ff12b 100644 --- a/ipam/docs/IpamsvcInheritedAsmGrowthBlock.md +++ b/ipam/docs/IpamsvcInheritedAsmGrowthBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcAsmGrowthBlock**](IpamsvcAsmGrowthBlock.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcInheritedDDNSBlock.md b/ipam/docs/IpamsvcInheritedDDNSBlock.md index a184de2..695d7ec 100644 --- a/ipam/docs/IpamsvcInheritedDDNSBlock.md +++ b/ipam/docs/IpamsvcInheritedDDNSBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcDDNSBlock**](IpamsvcDDNSBlock.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcInheritedDDNSHostnameBlock.md b/ipam/docs/IpamsvcInheritedDDNSHostnameBlock.md index 6febbf6..91c1e59 100644 --- a/ipam/docs/IpamsvcInheritedDDNSHostnameBlock.md +++ b/ipam/docs/IpamsvcInheritedDDNSHostnameBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcDDNSHostnameBlock**](IpamsvcDDNSHostnameBlock.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcInheritedDDNSUpdateBlock.md b/ipam/docs/IpamsvcInheritedDDNSUpdateBlock.md index da1cfe7..4a0e2e5 100644 --- a/ipam/docs/IpamsvcInheritedDDNSUpdateBlock.md +++ b/ipam/docs/IpamsvcInheritedDDNSUpdateBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcDDNSUpdateBlock**](IpamsvcDDNSUpdateBlock.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcInheritedDHCPOption.md b/ipam/docs/IpamsvcInheritedDHCPOption.md index 71ef256..076bbda 100644 --- a/ipam/docs/IpamsvcInheritedDHCPOption.md +++ b/ipam/docs/IpamsvcInheritedDHCPOption.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _block_: Don't use the inherited value. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcInheritedDHCPOptionItem**](IpamsvcInheritedDHCPOptionItem.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcInheritedHostnameRewriteBlock.md b/ipam/docs/IpamsvcInheritedHostnameRewriteBlock.md index 52a53c1..e64253d 100644 --- a/ipam/docs/IpamsvcInheritedHostnameRewriteBlock.md +++ b/ipam/docs/IpamsvcInheritedHostnameRewriteBlock.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Action** | Pointer to **string** | The inheritance setting. Valid values are: * _inherit_: Use the inherited value. * _override_: Use the value set in the object. Defaults to _inherit_. | [optional] **DisplayName** | Pointer to **string** | The human-readable display name for the object referred to by _source_. | [optional] [readonly] -**Source** | Pointer to **string** | The resource identifier. | [optional] +**Source** | Pointer to **string** | The resource identifier. | [optional] [readonly] **Value** | Pointer to [**IpamsvcHostnameRewriteBlock**](IpamsvcHostnameRewriteBlock.md) | | [optional] ## Methods diff --git a/ipam/docs/IpamsvcRange.md b/ipam/docs/IpamsvcRange.md index fa286aa..ffedfc4 100644 --- a/ipam/docs/IpamsvcRange.md +++ b/ipam/docs/IpamsvcRange.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | The name of the range. May contain 1 to 256 characters. Can include UTF-8. | [optional] **Parent** | Pointer to **string** | The resource identifier. | [optional] **Protocol** | Pointer to **string** | The type of protocol (_ip4_ or _ip6_). | [optional] [readonly] -**Space** | **string** | The resource identifier. | +**Space** | Pointer to **string** | The resource identifier. | [optional] **Start** | **string** | The start IP address of the range. | **Tags** | Pointer to **map[string]interface{}** | The tags for the range in JSON format. | [optional] **Threshold** | Pointer to [**IpamsvcUtilizationThreshold**](IpamsvcUtilizationThreshold.md) | | [optional] @@ -31,7 +31,7 @@ Name | Type | Description | Notes ### NewIpamsvcRange -`func NewIpamsvcRange(end string, space string, start string, ) *IpamsvcRange` +`func NewIpamsvcRange(end string, start string, ) *IpamsvcRange` NewIpamsvcRange instantiates a new IpamsvcRange object This constructor will assign default values to properties that have it defined, @@ -435,6 +435,11 @@ and a boolean to check if the value has been set. SetSpace sets Space field to given value. +### HasSpace + +`func (o *IpamsvcRange) HasSpace() bool` + +HasSpace returns a boolean if a field has been set. ### GetStart diff --git a/ipam/docs/RangeAPI.md b/ipam/docs/RangeAPI.md index e64e81e..087beb9 100644 --- a/ipam/docs/RangeAPI.md +++ b/ipam/docs/RangeAPI.md @@ -16,7 +16,7 @@ Method | HTTP request | Description ## RangeCreate -> IpamsvcCreateRangeResponse RangeCreate(ctx).Body(body).Execute() +> IpamsvcCreateRangeResponse RangeCreate(ctx).Body(body).Inherit(inherit).Execute() Create the range. @@ -36,10 +36,11 @@ import ( func main() { body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -61,6 +62,7 @@ Other parameters are passed through a pointer to a apiRangeCreateRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcRange**](IpamsvcRange.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -224,7 +226,7 @@ Name | Type | Description | Notes ## RangeList -> IpamsvcListRangeResponse RangeList(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() +> IpamsvcListRangeResponse RangeList(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() Retrieve ranges. @@ -251,10 +253,11 @@ func main() { pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + resp, r, err := apiClient.RangeAPI.RangeList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -283,6 +286,7 @@ Name | Type | Description | Notes **pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | **torderBy** | **string** | This parameter is used for sorting by tags. | **tfilter** | **string** | This parameter is used for filtering by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -378,7 +382,7 @@ Name | Type | Description | Notes ## RangeRead -> IpamsvcReadRangeResponse RangeRead(ctx, id).Fields(fields).Execute() +> IpamsvcReadRangeResponse RangeRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the range. @@ -399,10 +403,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -429,6 +434,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -450,7 +456,7 @@ Name | Type | Description | Notes ## RangeUpdate -> IpamsvcUpdateRangeResponse RangeUpdate(ctx, id).Body(body).Execute() +> IpamsvcUpdateRangeResponse RangeUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the range. @@ -471,10 +477,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -501,6 +508,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcRange**](IpamsvcRange.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/ipam/docs/ServerAPI.md b/ipam/docs/ServerAPI.md index 98433ee..ffb3780 100644 --- a/ipam/docs/ServerAPI.md +++ b/ipam/docs/ServerAPI.md @@ -14,7 +14,7 @@ Method | HTTP request | Description ## ServerCreate -> IpamsvcCreateServerResponse ServerCreate(ctx).Body(body).Execute() +> IpamsvcCreateServerResponse ServerCreate(ctx).Body(body).Inherit(inherit).Execute() Create the DHCP configuration profile. @@ -34,10 +34,11 @@ import ( func main() { body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -59,6 +60,7 @@ Other parameters are passed through a pointer to a apiServerCreateRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcServer**](IpamsvcServer.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -148,7 +150,7 @@ Name | Type | Description | Notes ## ServerList -> IpamsvcListServerResponse ServerList(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() +> IpamsvcListServerResponse ServerList(ctx).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() Retrieve DHCP configuration profiles. @@ -175,10 +177,11 @@ func main() { pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -207,6 +210,7 @@ Name | Type | Description | Notes **pageToken** | **string** | The service-defined string used to identify a page of resources. A null value indicates the first page. | **torderBy** | **string** | This parameter is used for sorting by tags. | **tfilter** | **string** | This parameter is used for filtering by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -228,7 +232,7 @@ Name | Type | Description | Notes ## ServerRead -> IpamsvcReadServerResponse ServerRead(ctx, id).Fields(fields).Execute() +> IpamsvcReadServerResponse ServerRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the DHCP configuration profile. @@ -249,10 +253,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -279,6 +284,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -300,7 +306,7 @@ Name | Type | Description | Notes ## ServerUpdate -> IpamsvcUpdateServerResponse ServerUpdate(ctx, id).Body(body).Execute() +> IpamsvcUpdateServerResponse ServerUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the DHCP configuration profile. @@ -321,10 +327,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -351,6 +358,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcServer**](IpamsvcServer.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/ipam/docs/SubnetAPI.md b/ipam/docs/SubnetAPI.md index 9c41d0c..fa6ad18 100644 --- a/ipam/docs/SubnetAPI.md +++ b/ipam/docs/SubnetAPI.md @@ -89,7 +89,7 @@ Name | Type | Description | Notes ## SubnetCreate -> IpamsvcCreateSubnetResponse SubnetCreate(ctx).Body(body).Execute() +> IpamsvcCreateSubnetResponse SubnetCreate(ctx).Body(body).Inherit(inherit).Execute() Create the subnet. @@ -109,10 +109,11 @@ import ( func main() { body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(body).Execute() + resp, r, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -134,6 +135,7 @@ Other parameters are passed through a pointer to a apiSubnetCreateRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcSubnet**](IpamsvcSubnet.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -297,7 +299,7 @@ Name | Type | Description | Notes ## SubnetList -> IpamsvcListSubnetResponse SubnetList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() +> IpamsvcListSubnetResponse SubnetList(ctx).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() Retrieve subnets. @@ -324,10 +326,11 @@ func main() { orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + resp, r, err := apiClient.SubnetAPI.SubnetList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -356,6 +359,7 @@ Name | Type | Description | Notes **orderBy** | **string** | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. | **torderBy** | **string** | This parameter is used for sorting by tags. | **tfilter** | **string** | This parameter is used for filtering by tags. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -451,7 +455,7 @@ Name | Type | Description | Notes ## SubnetRead -> IpamsvcReadSubnetResponse SubnetRead(ctx, id).Fields(fields).Execute() +> IpamsvcReadSubnetResponse SubnetRead(ctx, id).Fields(fields).Inherit(inherit).Execute() Retrieve the subnet. @@ -472,10 +476,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Fields(fields).Execute() + resp, r, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -502,6 +507,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fields** | **string** | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type @@ -523,7 +529,7 @@ Name | Type | Description | Notes ## SubnetUpdate -> IpamsvcUpdateSubnetResponse SubnetUpdate(ctx, id).Body(body).Execute() +> IpamsvcUpdateSubnetResponse SubnetUpdate(ctx, id).Body(body).Inherit(inherit).Execute() Update the subnet. @@ -544,10 +550,11 @@ import ( func main() { id := "id_example" // string | An application specific resource identity of a resource body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Body(body).Execute() + resp, r, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -574,6 +581,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**IpamsvcSubnet**](IpamsvcSubnet.md) | | + **inherit** | **string** | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none | ### Return type diff --git a/ipam/model_ipamsvc_access_filter.go b/ipam/model_ipamsvc_access_filter.go index d185ec6..5910f29 100644 --- a/ipam/model_ipamsvc_access_filter.go +++ b/ipam/model_ipamsvc_access_filter.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcAccessFilter type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type IpamsvcAccessFilter struct { OptionFilterId *string `json:"option_filter_id,omitempty"` } +type _IpamsvcAccessFilter IpamsvcAccessFilter + // NewIpamsvcAccessFilter instantiates a new IpamsvcAccessFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -153,6 +156,41 @@ func (o IpamsvcAccessFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcAccessFilter) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcAccessFilter := _IpamsvcAccessFilter{} + + err = json.Unmarshal(bytes, &varIpamsvcAccessFilter) + + if err != nil { + return err + } + + *o = IpamsvcAccessFilter(varIpamsvcAccessFilter) + + return err +} + type NullableIpamsvcAccessFilter struct { value *IpamsvcAccessFilter isSet bool diff --git a/ipam/model_ipamsvc_address.go b/ipam/model_ipamsvc_address.go index 83c73e1..1b27297 100644 --- a/ipam/model_ipamsvc_address.go +++ b/ipam/model_ipamsvc_address.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -61,6 +62,8 @@ type IpamsvcAddress struct { Usage []string `json:"usage,omitempty"` } +type _IpamsvcAddress IpamsvcAddress + // NewIpamsvcAddress instantiates a new IpamsvcAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -782,6 +785,41 @@ func (o IpamsvcAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcAddress) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcAddress := _IpamsvcAddress{} + + err = json.Unmarshal(bytes, &varIpamsvcAddress) + + if err != nil { + return err + } + + *o = IpamsvcAddress(varIpamsvcAddress) + + return err +} + type NullableIpamsvcAddress struct { value *IpamsvcAddress isSet bool diff --git a/ipam/model_ipamsvc_asm.go b/ipam/model_ipamsvc_asm.go index 252a668..1116d62 100644 --- a/ipam/model_ipamsvc_asm.go +++ b/ipam/model_ipamsvc_asm.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcASM type satisfies the MappedNullable interface at compile time @@ -69,6 +70,8 @@ type IpamsvcASM struct { Utilization *int64 `json:"utilization,omitempty"` } +type _IpamsvcASM IpamsvcASM + // NewIpamsvcASM instantiates a new IpamsvcASM object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -930,6 +933,41 @@ func (o IpamsvcASM) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcASM) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "subnet_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcASM := _IpamsvcASM{} + + err = json.Unmarshal(bytes, &varIpamsvcASM) + + if err != nil { + return err + } + + *o = IpamsvcASM(varIpamsvcASM) + + return err +} + type NullableIpamsvcASM struct { value *IpamsvcASM isSet bool diff --git a/ipam/model_ipamsvc_bulk_copy_ip_space.go b/ipam/model_ipamsvc_bulk_copy_ip_space.go index bf4a0ea..e1d81eb 100644 --- a/ipam/model_ipamsvc_bulk_copy_ip_space.go +++ b/ipam/model_ipamsvc_bulk_copy_ip_space.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcBulkCopyIPSpace type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type IpamsvcBulkCopyIPSpace struct { Target string `json:"target"` } +type _IpamsvcBulkCopyIPSpace IpamsvcBulkCopyIPSpace + // NewIpamsvcBulkCopyIPSpace instantiates a new IpamsvcBulkCopyIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -218,6 +221,42 @@ func (o IpamsvcBulkCopyIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcBulkCopyIPSpace) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "copy_objects", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcBulkCopyIPSpace := _IpamsvcBulkCopyIPSpace{} + + err = json.Unmarshal(bytes, &varIpamsvcBulkCopyIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcBulkCopyIPSpace(varIpamsvcBulkCopyIPSpace) + + return err +} + type NullableIpamsvcBulkCopyIPSpace struct { value *IpamsvcBulkCopyIPSpace isSet bool diff --git a/ipam/model_ipamsvc_copy_address_block.go b/ipam/model_ipamsvc_copy_address_block.go index ac70f2d..0287a95 100644 --- a/ipam/model_ipamsvc_copy_address_block.go +++ b/ipam/model_ipamsvc_copy_address_block.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcCopyAddressBlock type satisfies the MappedNullable interface at compile time @@ -35,6 +36,8 @@ type IpamsvcCopyAddressBlock struct { Space string `json:"space"` } +type _IpamsvcCopyAddressBlock IpamsvcCopyAddressBlock + // NewIpamsvcCopyAddressBlock instantiates a new IpamsvcCopyAddressBlock object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -301,6 +304,41 @@ func (o IpamsvcCopyAddressBlock) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopyAddressBlock) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "space", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopyAddressBlock := _IpamsvcCopyAddressBlock{} + + err = json.Unmarshal(bytes, &varIpamsvcCopyAddressBlock) + + if err != nil { + return err + } + + *o = IpamsvcCopyAddressBlock(varIpamsvcCopyAddressBlock) + + return err +} + type NullableIpamsvcCopyAddressBlock struct { value *IpamsvcCopyAddressBlock isSet bool diff --git a/ipam/model_ipamsvc_copy_ip_space.go b/ipam/model_ipamsvc_copy_ip_space.go index 7fe0e96..00add0a 100644 --- a/ipam/model_ipamsvc_copy_ip_space.go +++ b/ipam/model_ipamsvc_copy_ip_space.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcCopyIPSpace type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type IpamsvcCopyIPSpace struct { SkipOnError *bool `json:"skip_on_error,omitempty"` } +type _IpamsvcCopyIPSpace IpamsvcCopyIPSpace + // NewIpamsvcCopyIPSpace instantiates a new IpamsvcCopyIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -227,6 +230,41 @@ func (o IpamsvcCopyIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopyIPSpace) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopyIPSpace := _IpamsvcCopyIPSpace{} + + err = json.Unmarshal(bytes, &varIpamsvcCopyIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcCopyIPSpace(varIpamsvcCopyIPSpace) + + return err +} + type NullableIpamsvcCopyIPSpace struct { value *IpamsvcCopyIPSpace isSet bool diff --git a/ipam/model_ipamsvc_copy_subnet.go b/ipam/model_ipamsvc_copy_subnet.go index 43c101b..e01620d 100644 --- a/ipam/model_ipamsvc_copy_subnet.go +++ b/ipam/model_ipamsvc_copy_subnet.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcCopySubnet type satisfies the MappedNullable interface at compile time @@ -35,6 +36,8 @@ type IpamsvcCopySubnet struct { Space string `json:"space"` } +type _IpamsvcCopySubnet IpamsvcCopySubnet + // NewIpamsvcCopySubnet instantiates a new IpamsvcCopySubnet object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -301,6 +304,41 @@ func (o IpamsvcCopySubnet) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopySubnet) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "space", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopySubnet := _IpamsvcCopySubnet{} + + err = json.Unmarshal(bytes, &varIpamsvcCopySubnet) + + if err != nil { + return err + } + + *o = IpamsvcCopySubnet(varIpamsvcCopySubnet) + + return err +} + type NullableIpamsvcCopySubnet struct { value *IpamsvcCopySubnet isSet bool diff --git a/ipam/model_ipamsvc_ddns_zone.go b/ipam/model_ipamsvc_ddns_zone.go index c076f5d..dc3031e 100644 --- a/ipam/model_ipamsvc_ddns_zone.go +++ b/ipam/model_ipamsvc_ddns_zone.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcDDNSZone type satisfies the MappedNullable interface at compile time @@ -36,6 +37,8 @@ type IpamsvcDDNSZone struct { Zone string `json:"zone"` } +type _IpamsvcDDNSZone IpamsvcDDNSZone + // NewIpamsvcDDNSZone instantiates a new IpamsvcDDNSZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -337,6 +340,41 @@ func (o IpamsvcDDNSZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcDDNSZone) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcDDNSZone := _IpamsvcDDNSZone{} + + err = json.Unmarshal(bytes, &varIpamsvcDDNSZone) + + if err != nil { + return err + } + + *o = IpamsvcDDNSZone(varIpamsvcDDNSZone) + + return err +} + type NullableIpamsvcDDNSZone struct { value *IpamsvcDDNSZone isSet bool diff --git a/ipam/model_ipamsvc_dhcp_utilization_threshold.go b/ipam/model_ipamsvc_dhcp_utilization_threshold.go index a897e08..a93164c 100644 --- a/ipam/model_ipamsvc_dhcp_utilization_threshold.go +++ b/ipam/model_ipamsvc_dhcp_utilization_threshold.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcDHCPUtilizationThreshold type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type IpamsvcDHCPUtilizationThreshold struct { Low int64 `json:"low"` } +type _IpamsvcDHCPUtilizationThreshold IpamsvcDHCPUtilizationThreshold + // NewIpamsvcDHCPUtilizationThreshold instantiates a new IpamsvcDHCPUtilizationThreshold object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +138,43 @@ func (o IpamsvcDHCPUtilizationThreshold) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *IpamsvcDHCPUtilizationThreshold) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "high", + "low", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcDHCPUtilizationThreshold := _IpamsvcDHCPUtilizationThreshold{} + + err = json.Unmarshal(bytes, &varIpamsvcDHCPUtilizationThreshold) + + if err != nil { + return err + } + + *o = IpamsvcDHCPUtilizationThreshold(varIpamsvcDHCPUtilizationThreshold) + + return err +} + type NullableIpamsvcDHCPUtilizationThreshold struct { value *IpamsvcDHCPUtilizationThreshold isSet bool diff --git a/ipam/model_ipamsvc_exclusion_range.go b/ipam/model_ipamsvc_exclusion_range.go index 5f01e73..f516825 100644 --- a/ipam/model_ipamsvc_exclusion_range.go +++ b/ipam/model_ipamsvc_exclusion_range.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcExclusionRange type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type IpamsvcExclusionRange struct { Start string `json:"start"` } +type _IpamsvcExclusionRange IpamsvcExclusionRange + // NewIpamsvcExclusionRange instantiates a new IpamsvcExclusionRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o IpamsvcExclusionRange) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcExclusionRange) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "end", + "start", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcExclusionRange := _IpamsvcExclusionRange{} + + err = json.Unmarshal(bytes, &varIpamsvcExclusionRange) + + if err != nil { + return err + } + + *o = IpamsvcExclusionRange(varIpamsvcExclusionRange) + + return err +} + type NullableIpamsvcExclusionRange struct { value *IpamsvcExclusionRange isSet bool diff --git a/ipam/model_ipamsvc_fixed_address.go b/ipam/model_ipamsvc_fixed_address.go index f03d532..f8a9818 100644 --- a/ipam/model_ipamsvc_fixed_address.go +++ b/ipam/model_ipamsvc_fixed_address.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -61,6 +62,8 @@ type IpamsvcFixedAddress struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcFixedAddress IpamsvcFixedAddress + // NewIpamsvcFixedAddress instantiates a new IpamsvcFixedAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -764,6 +767,43 @@ func (o IpamsvcFixedAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcFixedAddress) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "match_type", + "match_value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcFixedAddress := _IpamsvcFixedAddress{} + + err = json.Unmarshal(bytes, &varIpamsvcFixedAddress) + + if err != nil { + return err + } + + *o = IpamsvcFixedAddress(varIpamsvcFixedAddress) + + return err +} + type NullableIpamsvcFixedAddress struct { value *IpamsvcFixedAddress isSet bool diff --git a/ipam/model_ipamsvc_ha_group.go b/ipam/model_ipamsvc_ha_group.go index a6c11e5..00e202f 100644 --- a/ipam/model_ipamsvc_ha_group.go +++ b/ipam/model_ipamsvc_ha_group.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -44,6 +45,8 @@ type IpamsvcHAGroup struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcHAGroup IpamsvcHAGroup + // NewIpamsvcHAGroup instantiates a new IpamsvcHAGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -441,6 +444,42 @@ func (o IpamsvcHAGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHAGroup) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "hosts", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHAGroup := _IpamsvcHAGroup{} + + err = json.Unmarshal(bytes, &varIpamsvcHAGroup) + + if err != nil { + return err + } + + *o = IpamsvcHAGroup(varIpamsvcHAGroup) + + return err +} + type NullableIpamsvcHAGroup struct { value *IpamsvcHAGroup isSet bool diff --git a/ipam/model_ipamsvc_ha_group_host.go b/ipam/model_ipamsvc_ha_group_host.go index 82d24a1..b2c9ba8 100644 --- a/ipam/model_ipamsvc_ha_group_host.go +++ b/ipam/model_ipamsvc_ha_group_host.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcHAGroupHost type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type IpamsvcHAGroupHost struct { State *string `json:"state,omitempty"` } +type _IpamsvcHAGroupHost IpamsvcHAGroupHost + // NewIpamsvcHAGroupHost instantiates a new IpamsvcHAGroupHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +267,41 @@ func (o IpamsvcHAGroupHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHAGroupHost) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "host", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHAGroupHost := _IpamsvcHAGroupHost{} + + err = json.Unmarshal(bytes, &varIpamsvcHAGroupHost) + + if err != nil { + return err + } + + *o = IpamsvcHAGroupHost(varIpamsvcHAGroupHost) + + return err +} + type NullableIpamsvcHAGroupHost struct { value *IpamsvcHAGroupHost isSet bool diff --git a/ipam/model_ipamsvc_hardware_filter.go b/ipam/model_ipamsvc_hardware_filter.go index 357c0b9..997256f 100644 --- a/ipam/model_ipamsvc_hardware_filter.go +++ b/ipam/model_ipamsvc_hardware_filter.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -50,6 +51,8 @@ type IpamsvcHardwareFilter struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcHardwareFilter IpamsvcHardwareFilter + // NewIpamsvcHardwareFilter instantiates a new IpamsvcHardwareFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -561,6 +564,41 @@ func (o IpamsvcHardwareFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHardwareFilter) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHardwareFilter := _IpamsvcHardwareFilter{} + + err = json.Unmarshal(bytes, &varIpamsvcHardwareFilter) + + if err != nil { + return err + } + + *o = IpamsvcHardwareFilter(varIpamsvcHardwareFilter) + + return err +} + type NullableIpamsvcHardwareFilter struct { value *IpamsvcHardwareFilter isSet bool diff --git a/ipam/model_ipamsvc_host_name.go b/ipam/model_ipamsvc_host_name.go index e728d63..277a7a2 100644 --- a/ipam/model_ipamsvc_host_name.go +++ b/ipam/model_ipamsvc_host_name.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcHostName type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type IpamsvcHostName struct { Zone string `json:"zone"` } +type _IpamsvcHostName IpamsvcHostName + // NewIpamsvcHostName instantiates a new IpamsvcHostName object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -181,6 +184,42 @@ func (o IpamsvcHostName) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHostName) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHostName := _IpamsvcHostName{} + + err = json.Unmarshal(bytes, &varIpamsvcHostName) + + if err != nil { + return err + } + + *o = IpamsvcHostName(varIpamsvcHostName) + + return err +} + type NullableIpamsvcHostName struct { value *IpamsvcHostName isSet bool diff --git a/ipam/model_ipamsvc_ignore_item.go b/ipam/model_ipamsvc_ignore_item.go index 8ee7184..82895e7 100644 --- a/ipam/model_ipamsvc_ignore_item.go +++ b/ipam/model_ipamsvc_ignore_item.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcIgnoreItem type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type IpamsvcIgnoreItem struct { Value string `json:"value"` } +type _IpamsvcIgnoreItem IpamsvcIgnoreItem + // NewIpamsvcIgnoreItem instantiates a new IpamsvcIgnoreItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +110,42 @@ func (o IpamsvcIgnoreItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIgnoreItem) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIgnoreItem := _IpamsvcIgnoreItem{} + + err = json.Unmarshal(bytes, &varIpamsvcIgnoreItem) + + if err != nil { + return err + } + + *o = IpamsvcIgnoreItem(varIpamsvcIgnoreItem) + + return err +} + type NullableIpamsvcIgnoreItem struct { value *IpamsvcIgnoreItem isSet bool diff --git a/ipam/model_ipamsvc_ip_space.go b/ipam/model_ipamsvc_ip_space.go index ff974a4..d46627d 100644 --- a/ipam/model_ipamsvc_ip_space.go +++ b/ipam/model_ipamsvc_ip_space.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -78,6 +79,8 @@ type IpamsvcIPSpace struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcIPSpace IpamsvcIPSpace + // NewIpamsvcIPSpace instantiates a new IpamsvcIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1224,6 +1227,41 @@ func (o IpamsvcIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIPSpace) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIPSpace := _IpamsvcIPSpace{} + + err = json.Unmarshal(bytes, &varIpamsvcIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcIPSpace(varIpamsvcIPSpace) + + return err +} + type NullableIpamsvcIPSpace struct { value *IpamsvcIPSpace isSet bool diff --git a/ipam/model_ipamsvc_ipam_host.go b/ipam/model_ipamsvc_ipam_host.go index f8463e1..9847e7a 100644 --- a/ipam/model_ipamsvc_ipam_host.go +++ b/ipam/model_ipamsvc_ipam_host.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -40,6 +41,8 @@ type IpamsvcIpamHost struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcIpamHost IpamsvcIpamHost + // NewIpamsvcIpamHost instantiates a new IpamsvcIpamHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -376,6 +379,41 @@ func (o IpamsvcIpamHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIpamHost) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIpamHost := _IpamsvcIpamHost{} + + err = json.Unmarshal(bytes, &varIpamsvcIpamHost) + + if err != nil { + return err + } + + *o = IpamsvcIpamHost(varIpamsvcIpamHost) + + return err +} + type NullableIpamsvcIpamHost struct { value *IpamsvcIpamHost isSet bool diff --git a/ipam/model_ipamsvc_kerberos_key.go b/ipam/model_ipamsvc_kerberos_key.go index 86cb3a8..91f9fdc 100644 --- a/ipam/model_ipamsvc_kerberos_key.go +++ b/ipam/model_ipamsvc_kerberos_key.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcKerberosKey type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type IpamsvcKerberosKey struct { Version *int64 `json:"version,omitempty"` } +type _IpamsvcKerberosKey IpamsvcKerberosKey + // NewIpamsvcKerberosKey instantiates a new IpamsvcKerberosKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +267,41 @@ func (o IpamsvcKerberosKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcKerberosKey) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcKerberosKey := _IpamsvcKerberosKey{} + + err = json.Unmarshal(bytes, &varIpamsvcKerberosKey) + + if err != nil { + return err + } + + *o = IpamsvcKerberosKey(varIpamsvcKerberosKey) + + return err +} + type NullableIpamsvcKerberosKey struct { value *IpamsvcKerberosKey isSet bool diff --git a/ipam/model_ipamsvc_leases_command.go b/ipam/model_ipamsvc_leases_command.go index b0209ea..7c73a0e 100644 --- a/ipam/model_ipamsvc_leases_command.go +++ b/ipam/model_ipamsvc_leases_command.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcLeasesCommand type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type IpamsvcLeasesCommand struct { Subnet []IpamsvcLeaseSubnet `json:"subnet,omitempty"` } +type _IpamsvcLeasesCommand IpamsvcLeasesCommand + // NewIpamsvcLeasesCommand instantiates a new IpamsvcLeasesCommand object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -190,6 +193,41 @@ func (o IpamsvcLeasesCommand) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcLeasesCommand) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "command", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcLeasesCommand := _IpamsvcLeasesCommand{} + + err = json.Unmarshal(bytes, &varIpamsvcLeasesCommand) + + if err != nil { + return err + } + + *o = IpamsvcLeasesCommand(varIpamsvcLeasesCommand) + + return err +} + type NullableIpamsvcLeasesCommand struct { value *IpamsvcLeasesCommand isSet bool diff --git a/ipam/model_ipamsvc_name.go b/ipam/model_ipamsvc_name.go index 4bb67e2..f532417 100644 --- a/ipam/model_ipamsvc_name.go +++ b/ipam/model_ipamsvc_name.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcName type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type IpamsvcName struct { Type string `json:"type"` } +type _IpamsvcName IpamsvcName + // NewIpamsvcName instantiates a new IpamsvcName object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +110,42 @@ func (o IpamsvcName) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcName) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcName := _IpamsvcName{} + + err = json.Unmarshal(bytes, &varIpamsvcName) + + if err != nil { + return err + } + + *o = IpamsvcName(varIpamsvcName) + + return err +} + type NullableIpamsvcName struct { value *IpamsvcName isSet bool diff --git a/ipam/model_ipamsvc_option_code.go b/ipam/model_ipamsvc_option_code.go index 79af98e..4885131 100644 --- a/ipam/model_ipamsvc_option_code.go +++ b/ipam/model_ipamsvc_option_code.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -42,6 +43,8 @@ type IpamsvcOptionCode struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionCode IpamsvcOptionCode + // NewIpamsvcOptionCode instantiates a new IpamsvcOptionCode object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -386,6 +389,44 @@ func (o IpamsvcOptionCode) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionCode) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "name", + "option_space", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionCode := _IpamsvcOptionCode{} + + err = json.Unmarshal(bytes, &varIpamsvcOptionCode) + + if err != nil { + return err + } + + *o = IpamsvcOptionCode(varIpamsvcOptionCode) + + return err +} + type NullableIpamsvcOptionCode struct { value *IpamsvcOptionCode isSet bool diff --git a/ipam/model_ipamsvc_option_filter.go b/ipam/model_ipamsvc_option_filter.go index 5dabbe5..e264fa2 100644 --- a/ipam/model_ipamsvc_option_filter.go +++ b/ipam/model_ipamsvc_option_filter.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -51,6 +52,8 @@ type IpamsvcOptionFilter struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcOptionFilter IpamsvcOptionFilter + // NewIpamsvcOptionFilter instantiates a new IpamsvcOptionFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -588,6 +591,42 @@ func (o IpamsvcOptionFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionFilter) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "rules", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionFilter := _IpamsvcOptionFilter{} + + err = json.Unmarshal(bytes, &varIpamsvcOptionFilter) + + if err != nil { + return err + } + + *o = IpamsvcOptionFilter(varIpamsvcOptionFilter) + + return err +} + type NullableIpamsvcOptionFilter struct { value *IpamsvcOptionFilter isSet bool diff --git a/ipam/model_ipamsvc_option_filter_rule.go b/ipam/model_ipamsvc_option_filter_rule.go index 7d61417..36a1f5d 100644 --- a/ipam/model_ipamsvc_option_filter_rule.go +++ b/ipam/model_ipamsvc_option_filter_rule.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcOptionFilterRule type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type IpamsvcOptionFilterRule struct { SubstringOffset *int64 `json:"substring_offset,omitempty"` } +type _IpamsvcOptionFilterRule IpamsvcOptionFilterRule + // NewIpamsvcOptionFilterRule instantiates a new IpamsvcOptionFilterRule object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -181,6 +184,42 @@ func (o IpamsvcOptionFilterRule) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionFilterRule) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "compare", + "option_code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionFilterRule := _IpamsvcOptionFilterRule{} + + err = json.Unmarshal(bytes, &varIpamsvcOptionFilterRule) + + if err != nil { + return err + } + + *o = IpamsvcOptionFilterRule(varIpamsvcOptionFilterRule) + + return err +} + type NullableIpamsvcOptionFilterRule struct { value *IpamsvcOptionFilterRule isSet bool diff --git a/ipam/model_ipamsvc_option_group.go b/ipam/model_ipamsvc_option_group.go index e4f710d..7281f6a 100644 --- a/ipam/model_ipamsvc_option_group.go +++ b/ipam/model_ipamsvc_option_group.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -38,6 +39,8 @@ type IpamsvcOptionGroup struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionGroup IpamsvcOptionGroup + // NewIpamsvcOptionGroup instantiates a new IpamsvcOptionGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -339,6 +342,41 @@ func (o IpamsvcOptionGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionGroup) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionGroup := _IpamsvcOptionGroup{} + + err = json.Unmarshal(bytes, &varIpamsvcOptionGroup) + + if err != nil { + return err + } + + *o = IpamsvcOptionGroup(varIpamsvcOptionGroup) + + return err +} + type NullableIpamsvcOptionGroup struct { value *IpamsvcOptionGroup isSet bool diff --git a/ipam/model_ipamsvc_option_space.go b/ipam/model_ipamsvc_option_space.go index e126876..e47a84d 100644 --- a/ipam/model_ipamsvc_option_space.go +++ b/ipam/model_ipamsvc_option_space.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -36,6 +37,8 @@ type IpamsvcOptionSpace struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionSpace IpamsvcOptionSpace + // NewIpamsvcOptionSpace instantiates a new IpamsvcOptionSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -302,6 +305,41 @@ func (o IpamsvcOptionSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionSpace) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionSpace := _IpamsvcOptionSpace{} + + err = json.Unmarshal(bytes, &varIpamsvcOptionSpace) + + if err != nil { + return err + } + + *o = IpamsvcOptionSpace(varIpamsvcOptionSpace) + + return err +} + type NullableIpamsvcOptionSpace struct { value *IpamsvcOptionSpace isSet bool diff --git a/ipam/model_ipamsvc_server.go b/ipam/model_ipamsvc_server.go index 1dd74ab..2174b36 100644 --- a/ipam/model_ipamsvc_server.go +++ b/ipam/model_ipamsvc_server.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" "time" ) @@ -94,6 +95,8 @@ type IpamsvcServer struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcServer IpamsvcServer + // NewIpamsvcServer instantiates a new IpamsvcServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1410,6 +1413,41 @@ func (o IpamsvcServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcServer) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcServer := _IpamsvcServer{} + + err = json.Unmarshal(bytes, &varIpamsvcServer) + + if err != nil { + return err + } + + *o = IpamsvcServer(varIpamsvcServer) + + return err +} + type NullableIpamsvcServer struct { value *IpamsvcServer isSet bool diff --git a/ipam/model_ipamsvc_tsig_key.go b/ipam/model_ipamsvc_tsig_key.go index b358da3..16473d1 100644 --- a/ipam/model_ipamsvc_tsig_key.go +++ b/ipam/model_ipamsvc_tsig_key.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcTSIGKey type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type IpamsvcTSIGKey struct { Secret *string `json:"secret,omitempty"` } +type _IpamsvcTSIGKey IpamsvcTSIGKey + // NewIpamsvcTSIGKey instantiates a new IpamsvcTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +267,41 @@ func (o IpamsvcTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcTSIGKey) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcTSIGKey := _IpamsvcTSIGKey{} + + err = json.Unmarshal(bytes, &varIpamsvcTSIGKey) + + if err != nil { + return err + } + + *o = IpamsvcTSIGKey(varIpamsvcTSIGKey) + + return err +} + type NullableIpamsvcTSIGKey struct { value *IpamsvcTSIGKey isSet bool diff --git a/ipam/model_ipamsvc_utilization_threshold.go b/ipam/model_ipamsvc_utilization_threshold.go index c6f492c..6283075 100644 --- a/ipam/model_ipamsvc_utilization_threshold.go +++ b/ipam/model_ipamsvc_utilization_threshold.go @@ -12,6 +12,7 @@ package ipam import ( "encoding/json" + "fmt" ) // checks if the IpamsvcUtilizationThreshold type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type IpamsvcUtilizationThreshold struct { Low int64 `json:"low"` } +type _IpamsvcUtilizationThreshold IpamsvcUtilizationThreshold + // NewIpamsvcUtilizationThreshold instantiates a new IpamsvcUtilizationThreshold object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +138,43 @@ func (o IpamsvcUtilizationThreshold) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcUtilizationThreshold) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "high", + "low", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcUtilizationThreshold := _IpamsvcUtilizationThreshold{} + + err = json.Unmarshal(bytes, &varIpamsvcUtilizationThreshold) + + if err != nil { + return err + } + + *o = IpamsvcUtilizationThreshold(varIpamsvcUtilizationThreshold) + + return err +} + type NullableIpamsvcUtilizationThreshold struct { value *IpamsvcUtilizationThreshold isSet bool diff --git a/keys/.openapi-generator/VERSION b/keys/.openapi-generator/VERSION index 9fe9ff9..3769235 100644 --- a/keys/.openapi-generator/VERSION +++ b/keys/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 +7.1.0 \ No newline at end of file diff --git a/keys/README.md b/keys/README.md index 20dc152..e1e6b9c 100644 --- a/keys/README.md +++ b/keys/README.md @@ -38,7 +38,7 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `keys.ContextServerIndex` of type `int`. ```golang ctx := context.WithValue(context.Background(), keys.ContextServerIndex, 1) @@ -46,7 +46,7 @@ ctx := context.WithValue(context.Background(), keys.ContextServerIndex, 1) ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `keys.ContextServerVariables` of type `map[string]string`. ```golang ctx := context.WithValue(context.Background(), keys.ContextServerVariables, map[string]string{ @@ -60,7 +60,7 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `keys.ContextOperationServerIndices` and `keys.ContextOperationServerVariables` context maps. ```golang ctx := context.WithValue(context.Background(), keys.ContextOperationServerIndices, map[string]int{ @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description *KerberosAPI* | [**KerberosList**](docs/KerberosAPI.md#kerberoslist) | **Get** /keys/kerberos | Retrieve Kerberos keys. *KerberosAPI* | [**KerberosRead**](docs/KerberosAPI.md#kerberosread) | **Get** /keys/kerberos/{id} | Retrieve the Kerberos key. *KerberosAPI* | [**KerberosUpdate**](docs/KerberosAPI.md#kerberosupdate) | **Patch** /keys/kerberos/{id} | Update the Kerberos key. +*KerberosAPI* | [**KeysKerberosPost**](docs/KerberosAPI.md#keyskerberospost) | **Post** /keys/kerberos | *TsigAPI* | [**TsigCreate**](docs/TsigAPI.md#tsigcreate) | **Post** /keys/tsig | Create the TSIG key. *TsigAPI* | [**TsigDelete**](docs/TsigAPI.md#tsigdelete) | **Delete** /keys/tsig/{id} | Delete the TSIG key. *TsigAPI* | [**TsigList**](docs/TsigAPI.md#tsiglist) | **Get** /keys/tsig | Retrieve TSIG keys. @@ -129,8 +130,8 @@ Example ```golang auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + keys.ContextAPIKeys, + map[string]keys.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/keys/api_generate_tsig.go b/keys/api_generate_tsig.go index d4e3ab8..1a2a0ec 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. @@ -61,8 +60,8 @@ GenerateTsigGenerateTSIG Generate TSIG key with a random secret. Use this method to generate a TSIG key with a random secret using the specified algorithm. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTsigGenerateTSIGRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTsigGenerateTSIGRequest */ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) ApiGenerateTsigGenerateTSIGRequest { return ApiGenerateTsigGenerateTSIGRequest{ @@ -72,8 +71,7 @@ func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIG(ctx context.Context) A } // Execute executes the request -// -// @return KeysGenerateTSIGResponse +// @return KeysGenerateTSIGResponse func (a *GenerateTsigAPIService) GenerateTsigGenerateTSIGExecute(r ApiGenerateTsigGenerateTSIGRequest) (*KeysGenerateTSIGResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -154,6 +152,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 df70288..da3f1fc 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,6 +80,17 @@ type KerberosAPI interface { // KerberosUpdateExecute executes the request // @return KeysUpdateKerberosKeyResponse KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) + /* + KeysKerberosPost Method for KeysKerberosPost + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest + */ + KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest + + // KeysKerberosPostExecute executes the request + // @return KeysListKerberosKeyResponse + KeysKerberosPostExecute(r ApiKeysKerberosPostRequest) (*KeysListKerberosKeyResponse, *http.Response, error) } // KerberosAPIService KerberosAPI service @@ -105,9 +112,9 @@ KerberosDelete Delete the Kerberos key. Use this method to delete a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosDeleteRequest */ func (a *KerberosAPIService) KerberosDelete(ctx context.Context, id string) ApiKerberosDeleteRequest { return ApiKerberosDeleteRequest{ @@ -206,37 +213,37 @@ type ApiKerberosListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosListRequest) Fields(fields string) ApiKerberosListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiKerberosListRequest) Filter(filter string) ApiKerberosListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiKerberosListRequest) Offset(offset int32) ApiKerberosListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiKerberosListRequest) Limit(limit int32) ApiKerberosListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiKerberosListRequest) PageToken(pageToken string) ApiKerberosListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiKerberosListRequest) OrderBy(orderBy string) ApiKerberosListRequest { r.orderBy = &orderBy return r @@ -264,8 +271,8 @@ KerberosList Retrieve Kerberos keys. Use this method to retrieve __KerberosKey__ objects. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiKerberosListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKerberosListRequest */ func (a *KerberosAPIService) KerberosList(ctx context.Context) ApiKerberosListRequest { return ApiKerberosListRequest{ @@ -275,8 +282,7 @@ func (a *KerberosAPIService) KerberosList(ctx context.Context) ApiKerberosListRe } // Execute executes the request -// -// @return KeysListKerberosKeyResponse +// @return KeysListKerberosKeyResponse func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -378,7 +384,6 @@ func (a *KerberosAPIService) KerberosListExecute(r ApiKerberosListRequest) (*Key newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -389,7 +394,7 @@ type ApiKerberosReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiKerberosReadRequest) Fields(fields string) ApiKerberosReadRequest { r.fields = &fields return r @@ -405,9 +410,9 @@ KerberosRead Retrieve the Kerberos key. Use this method to retrieve a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosReadRequest */ func (a *KerberosAPIService) KerberosRead(ctx context.Context, id string) ApiKerberosReadRequest { return ApiKerberosReadRequest{ @@ -418,8 +423,7 @@ func (a *KerberosAPIService) KerberosRead(ctx context.Context, id string) ApiKer } // Execute executes the request -// -// @return KeysReadKerberosKeyResponse +// @return KeysReadKerberosKeyResponse func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*KeysReadKerberosKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -501,7 +505,6 @@ func (a *KerberosAPIService) KerberosReadExecute(r ApiKerberosReadRequest) (*Key newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -527,9 +530,9 @@ KerberosUpdate Update the Kerberos key. Use this method to update a __KerberosKey__ object. A __KerberosKey__ object represents a Kerberos key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiKerberosUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiKerberosUpdateRequest */ func (a *KerberosAPIService) KerberosUpdate(ctx context.Context, id string) ApiKerberosUpdateRequest { return ApiKerberosUpdateRequest{ @@ -540,8 +543,7 @@ func (a *KerberosAPIService) KerberosUpdate(ctx context.Context, id string) ApiK } // Execute executes the request -// -// @return KeysUpdateKerberosKeyResponse +// @return KeysUpdateKerberosKeyResponse func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) (*KeysUpdateKerberosKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -625,6 +627,120 @@ func (a *KerberosAPIService) KerberosUpdateExecute(r ApiKerberosUpdateRequest) ( newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiKeysKerberosPostRequest struct { + ctx context.Context + ApiService KerberosAPI + body *KerberosKey +} + +func (r ApiKeysKerberosPostRequest) Body(body KerberosKey) ApiKeysKerberosPostRequest { + r.body = &body + return r +} + +func (r ApiKeysKerberosPostRequest) Execute() (*KeysListKerberosKeyResponse, *http.Response, error) { + return r.ApiService.KeysKerberosPostExecute(r) +} + +/* +KeysKerberosPost Method for KeysKerberosPost + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiKeysKerberosPostRequest +*/ +func (a *KerberosAPIService) KeysKerberosPost(ctx context.Context) ApiKeysKerberosPostRequest { + return ApiKeysKerberosPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return KeysListKerberosKeyResponse +func (a *KerberosAPIService) KeysKerberosPostExecute(r ApiKeysKerberosPostRequest) (*KeysListKerberosKeyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []internal.FormFile + localVarReturnValue *KeysListKerberosKeyResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(r.ctx, "KerberosAPIService.KeysKerberosPost") + if err != nil { + return localVarReturnValue, nil, internal.NewGenericOpenAPIError(err.Error()) + } + + localVarPath := localBasePath + "/keys/kerberos" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, internal.ReportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := internal.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := internal.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(internal.ContextAPIKeys).(map[string]internal.APIKey); ok { + if apiKey, ok := auth["ApiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.Client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := internal.NewGenericOpenAPIErrorWithBody(localVarHTTPResponse.Status, localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) + return localVarReturnValue, localVarHTTPResponse, newErr + } return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/api_tsig.go b/keys/api_tsig.go index 4386f89..17701ed 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. @@ -125,8 +120,8 @@ TsigCreate Create the TSIG key. Use this method to create a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigCreateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigCreateRequest */ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { return ApiTsigCreateRequest{ @@ -136,8 +131,7 @@ func (a *TsigAPIService) TsigCreate(ctx context.Context) ApiTsigCreateRequest { } // Execute executes the request -// -// @return KeysCreateTSIGKeyResponse +// @return KeysCreateTSIGKeyResponse func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateTSIGKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -177,6 +171,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 +222,6 @@ func (a *TsigAPIService) TsigCreateExecute(r ApiTsigCreateRequest) (*KeysCreateT newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -240,9 +241,9 @@ TsigDelete Delete the TSIG key. Use this method to delete a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigDeleteRequest */ func (a *TsigAPIService) TsigDelete(ctx context.Context, id string) ApiTsigDeleteRequest { return ApiTsigDeleteRequest{ @@ -341,37 +342,37 @@ type ApiTsigListRequest struct { torderBy *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigListRequest) Fields(fields string) ApiTsigListRequest { r.fields = &fields return r } -// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | +// A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | func (r ApiTsigListRequest) Filter(filter string) ApiTsigListRequest { r.filter = &filter return r } -// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. +// The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. func (r ApiTsigListRequest) Offset(offset int32) ApiTsigListRequest { r.offset = &offset return r } -// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. +// The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. func (r ApiTsigListRequest) Limit(limit int32) ApiTsigListRequest { r.limit = &limit return r } -// The service-defined string used to identify a page of resources. A null value indicates the first page. +// The service-defined string used to identify a page of resources. A null value indicates the first page. func (r ApiTsigListRequest) PageToken(pageToken string) ApiTsigListRequest { r.pageToken = &pageToken return r } -// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. +// A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. func (r ApiTsigListRequest) OrderBy(orderBy string) ApiTsigListRequest { r.orderBy = &orderBy return r @@ -399,8 +400,8 @@ TsigList Retrieve TSIG keys. Use this method to retrieve __TSIGKey__ objects. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTsigListRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTsigListRequest */ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { return ApiTsigListRequest{ @@ -410,8 +411,7 @@ func (a *TsigAPIService) TsigList(ctx context.Context) ApiTsigListRequest { } // Execute executes the request -// -// @return KeysListTSIGKeyResponse +// @return KeysListTSIGKeyResponse func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -513,7 +513,6 @@ func (a *TsigAPIService) TsigListExecute(r ApiTsigListRequest) (*KeysListTSIGKey newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -524,7 +523,7 @@ type ApiTsigReadRequest struct { fields *string } -// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. +// A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. func (r ApiTsigReadRequest) Fields(fields string) ApiTsigReadRequest { r.fields = &fields return r @@ -540,9 +539,9 @@ TsigRead Retrieve the TSIG key. Use this method to retrieve a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigReadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigReadRequest */ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadRequest { return ApiTsigReadRequest{ @@ -553,8 +552,7 @@ func (a *TsigAPIService) TsigRead(ctx context.Context, id string) ApiTsigReadReq } // Execute executes the request -// -// @return KeysReadTSIGKeyResponse +// @return KeysReadTSIGKeyResponse func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet @@ -636,7 +634,6 @@ func (a *TsigAPIService) TsigReadExecute(r ApiTsigReadRequest) (*KeysReadTSIGKey newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } @@ -662,9 +659,9 @@ TsigUpdate Update the TSIG key. Use this method to update a __TSIGKey__ object. A __TSIGKey__ object represents a TSIG key. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id An application specific resource identity of a resource - @return ApiTsigUpdateRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id An application specific resource identity of a resource + @return ApiTsigUpdateRequest */ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdateRequest { return ApiTsigUpdateRequest{ @@ -675,8 +672,7 @@ func (a *TsigAPIService) TsigUpdate(ctx context.Context, id string) ApiTsigUpdat } // Execute executes the request -// -// @return KeysUpdateTSIGKeyResponse +// @return KeysUpdateTSIGKeyResponse func (a *TsigAPIService) TsigUpdateExecute(r ApiTsigUpdateRequest) (*KeysUpdateTSIGKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -717,6 +713,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 +764,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..caa9d4f 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. @@ -60,8 +59,8 @@ UploadUpload Upload content to the keys service. Use this method to upload specified content type to the keys service. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadUploadRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUploadUploadRequest */ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequest { return ApiUploadUploadRequest{ @@ -71,8 +70,7 @@ func (a *UploadAPIService) UploadUpload(ctx context.Context) ApiUploadUploadRequ } // Execute executes the request -// -// @return DdiuploadResponse +// @return DdiuploadResponse func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*DdiuploadResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost @@ -112,6 +110,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 +161,5 @@ func (a *UploadAPIService) UploadUploadExecute(r ApiUploadUploadRequest) (*Ddiup newErr := internal.NewGenericOpenAPIErrorWithBody(err.Error(), localVarBody) return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/keys/client.go b/keys/client.go index b3649a4..286dc91 100644 --- a/keys/client.go +++ b/keys/client.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */ @@ -11,7 +11,7 @@ API version: v1 package keys import ( - "github.com/infobloxopen/bloxone-go-client/internal" + "github.com/infobloxopen/bloxone-go-client/internal" ) var ServiceBasePath = "/api/ddi/v1" @@ -19,20 +19,20 @@ var ServiceBasePath = "/api/ddi/v1" // APIClient manages communication with the DDI Keys API API vv1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - *internal.APIClient + *internal.APIClient // API Services GenerateTsigAPI GenerateTsigAPI - KerberosAPI KerberosAPI - TsigAPI TsigAPI - UploadAPI UploadAPI + KerberosAPI KerberosAPI + TsigAPI TsigAPI + UploadAPI UploadAPI } // NewAPIClient creates a new API client. Requires a userAgent string describing your application. // optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(cfg *internal.Configuration) *APIClient { c := &APIClient{} - c.APIClient = internal.NewAPIClient(cfg) + c.APIClient = internal.NewAPIClient(cfg) // API Services c.GenerateTsigAPI = (*GenerateTsigAPIService)(&c.Common) diff --git a/keys/docs/KerberosAPI.md b/keys/docs/KerberosAPI.md index 01fc80b..4e0fdb4 100644 --- a/keys/docs/KerberosAPI.md +++ b/keys/docs/KerberosAPI.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**KerberosList**](KerberosAPI.md#KerberosList) | **Get** /keys/kerberos | Retrieve Kerberos keys. [**KerberosRead**](KerberosAPI.md#KerberosRead) | **Get** /keys/kerberos/{id} | Retrieve the Kerberos key. [**KerberosUpdate**](KerberosAPI.md#KerberosUpdate) | **Patch** /keys/kerberos/{id} | Update the Kerberos key. +[**KeysKerberosPost**](KerberosAPI.md#KeysKerberosPost) | **Post** /keys/kerberos | @@ -302,3 +303,67 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## KeysKerberosPost + +> KeysListKerberosKeyResponse KeysKerberosPost(ctx).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" +) + +func main() { + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KeysKerberosPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KeysKerberosPost`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KeysKerberosPost`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiKeysKerberosPostRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**KerberosKey**](KerberosKey.md) | | + +### Return type + +[**KeysListKerberosKeyResponse**](KeysListKerberosKeyResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 9ebb444..8b8c5db 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -12,6 +12,7 @@ package keys import ( "encoding/json" + "fmt" "time" ) @@ -40,6 +41,8 @@ type KeysTSIGKey struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _KeysTSIGKey KeysTSIGKey + // NewKeysTSIGKey instantiates a new KeysTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -367,6 +370,42 @@ func (o KeysTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *KeysTSIGKey) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKeysTSIGKey := _KeysTSIGKey{} + + err = json.Unmarshal(bytes, &varKeysTSIGKey) + + if err != nil { + return err + } + + *o = KeysTSIGKey(varKeysTSIGKey) + + return err +} + type NullableKeysTSIGKey struct { value *KeysTSIGKey isSet bool diff --git a/keys/model_upload_request.go b/keys/model_upload_request.go index bb985e6..4068948 100644 --- a/keys/model_upload_request.go +++ b/keys/model_upload_request.go @@ -12,6 +12,7 @@ package keys import ( "encoding/json" + "fmt" ) // checks if the UploadRequest type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type UploadRequest struct { Type UploadContentType `json:"type"` } +type _UploadRequest UploadRequest + // NewUploadRequest instantiates a new UploadRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -218,6 +221,42 @@ func (o UploadRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UploadRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUploadRequest := _UploadRequest{} + + err = json.Unmarshal(bytes, &varUploadRequest) + + if err != nil { + return err + } + + *o = UploadRequest(varUploadRequest) + + return err +} + type NullableUploadRequest struct { value *UploadRequest isSet bool diff --git a/keys/utils.go b/keys/utils.go index 54647cd..ac6ed2b 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -1,7 +1,7 @@ /* DDI Keys API -The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. +The DDI Keys application is a BloxOne DDI service for managing TSIG keys and GSS-TSIG (Kerberos) keys which are used by other BloxOne DDI applications. It is part of the full-featured, DDI cloud solution that enables customers to deploy large numbers of protocol servers to deliver DNS and DHCP throughout their enterprise network. API version: v1 */