From f8ac7872fc830da013c55ff99c7ad95cd3a62ca4 Mon Sep 17 00:00:00 2001 From: Min Jiang <155574296+MinJiang00@users.noreply.github.com> Date: Tue, 27 Feb 2024 09:34:02 -0800 Subject: [PATCH] Just ran make client (#25) * Just ran make client * ran go fmt ./... --- dns_config/.openapi-generator/VERSION | 2 +- dns_config/README.md | 24 +- dns_config/docs/AclAPI.md | 164 +++---- dns_config/docs/AuthNsgAPI.md | 164 +++---- dns_config/docs/AuthZoneAPI.md | 202 ++++----- dns_config/docs/CacheFlushAPI.md | 30 +- dns_config/docs/ConvertDomainNameAPI.md | 30 +- dns_config/docs/ConvertRnameAPI.md | 30 +- dns_config/docs/DelegationAPI.md | 164 +++---- dns_config/docs/ForwardNsgAPI.md | 164 +++---- dns_config/docs/ForwardZoneAPI.md | 194 ++++---- dns_config/docs/GlobalAPI.md | 124 ++--- dns_config/docs/HostAPI.md | 114 ++--- dns_config/docs/LbdnAPI.md | 164 +++---- dns_config/docs/ServerAPI.md | 172 +++---- dns_config/docs/ViewAPI.md | 202 ++++----- dns_config/model_config_acl.go | 41 ++ dns_config/model_config_acl_item.go | 42 ++ dns_config/model_config_auth_nsg.go | 41 ++ dns_config/model_config_bulk_copy_view.go | 42 ++ dns_config/model_config_copy_auth_zone.go | 41 ++ dns_config/model_config_copy_forward_zone.go | 41 ++ dns_config/model_config_delegation_server.go | 41 ++ dns_config/model_config_ecs_zone.go | 42 ++ dns_config/model_config_external_primary.go | 41 ++ dns_config/model_config_external_secondary.go | 42 ++ dns_config/model_config_forward_nsg.go | 41 ++ dns_config/model_config_forwarder.go | 41 ++ dns_config/model_config_global.go | 41 ++ dns_config/model_config_internal_secondary.go | 41 ++ dns_config/model_config_kerberos_key.go | 41 ++ dns_config/model_config_lbdn.go | 42 ++ dns_config/model_config_root_ns.go | 42 ++ dns_config/model_config_server.go | 41 ++ dns_config/model_config_sort_list_item.go | 41 ++ dns_config/model_config_trust_anchor.go | 43 ++ dns_config/model_config_view.go | 41 ++ dns_config/utils.go | 2 +- dns_data/.openapi-generator/VERSION | 2 +- dns_data/README.md | 24 +- dns_data/docs/RecordAPI.md | 204 ++++----- dns_data/model_data_record.go | 41 ++ dns_data/utils.go | 2 +- infra_mgmt/.openapi-generator/VERSION | 2 +- infra_mgmt/README.md | 24 +- infra_mgmt/docs/DetailAPI.md | 88 ++-- infra_mgmt/docs/HostsAPI.md | 288 ++++++------ infra_mgmt/docs/ServicesAPI.md | 192 ++++---- infra_mgmt/model_infra_host.go | 41 ++ infra_mgmt/model_infra_service.go | 43 ++ infra_mgmt/utils.go | 2 +- infra_provision/.openapi-generator/VERSION | 2 +- infra_provision/README.md | 24 +- infra_provision/docs/UICSRAPI.md | 170 +++---- infra_provision/docs/UIJoinTokenAPI.md | 188 ++++---- .../model_hostactivation_join_token.go | 41 ++ infra_provision/utils.go | 2 +- ipam/.openapi-generator/VERSION | 2 +- ipam/README.md | 24 +- ipam/docs/AddressAPI.md | 168 +++---- ipam/docs/AddressBlockAPI.md | 428 +++++++++--------- ipam/docs/AsmAPI.md | 94 ++-- ipam/docs/DhcpHostAPI.md | 138 +++--- ipam/docs/DnsUsageAPI.md | 72 +-- ipam/docs/FilterAPI.md | 44 +- ipam/docs/FixedAddressAPI.md | 172 +++---- ipam/docs/GlobalAPI.md | 124 ++--- ipam/docs/HaGroupAPI.md | 168 +++---- ipam/docs/HardwareFilterAPI.md | 164 +++---- ipam/docs/IpSpaceAPI.md | 234 +++++----- ipam/docs/IpamHostAPI.md | 166 +++---- ipam/docs/LeasesCommandAPI.md | 30 +- ipam/docs/OptionCodeAPI.md | 160 +++---- ipam/docs/OptionFilterAPI.md | 164 +++---- ipam/docs/OptionGroupAPI.md | 164 +++---- ipam/docs/OptionSpaceAPI.md | 164 +++---- ipam/docs/RangeAPI.md | 240 +++++----- ipam/docs/ServerAPI.md | 172 +++---- ipam/docs/SubnetAPI.md | 272 +++++------ ipam/model_ipamsvc_access_filter.go | 41 ++ ipam/model_ipamsvc_address.go | 41 ++ ipam/model_ipamsvc_asm.go | 41 ++ ipam/model_ipamsvc_bulk_copy_ip_space.go | 42 ++ ipam/model_ipamsvc_copy_address_block.go | 41 ++ ipam/model_ipamsvc_copy_ip_space.go | 41 ++ ipam/model_ipamsvc_copy_subnet.go | 41 ++ ipam/model_ipamsvc_ddns_zone.go | 41 ++ ...odel_ipamsvc_dhcp_utilization_threshold.go | 43 ++ ipam/model_ipamsvc_exclusion_range.go | 42 ++ ipam/model_ipamsvc_fixed_address.go | 43 ++ ipam/model_ipamsvc_ha_group.go | 42 ++ ipam/model_ipamsvc_ha_group_host.go | 41 ++ ipam/model_ipamsvc_hardware_filter.go | 41 ++ ipam/model_ipamsvc_host_name.go | 42 ++ ipam/model_ipamsvc_ignore_item.go | 42 ++ ipam/model_ipamsvc_ip_space.go | 41 ++ ipam/model_ipamsvc_ipam_host.go | 41 ++ ipam/model_ipamsvc_kerberos_key.go | 41 ++ ipam/model_ipamsvc_leases_command.go | 41 ++ ipam/model_ipamsvc_name.go | 42 ++ ipam/model_ipamsvc_option_code.go | 44 ++ ipam/model_ipamsvc_option_filter.go | 42 ++ ipam/model_ipamsvc_option_filter_rule.go | 42 ++ ipam/model_ipamsvc_option_group.go | 41 ++ ipam/model_ipamsvc_option_space.go | 41 ++ ipam/model_ipamsvc_range.go | 42 ++ ipam/model_ipamsvc_server.go | 41 ++ ipam/model_ipamsvc_tsig_key.go | 41 ++ ipam/model_ipamsvc_utilization_threshold.go | 43 ++ ipam/utils.go | 2 +- keys/.openapi-generator/VERSION | 2 +- keys/README.md | 24 +- keys/docs/GenerateTsigAPI.md | 30 +- keys/docs/KerberosAPI.md | 164 +++---- keys/docs/TsigAPI.md | 164 +++---- keys/docs/UploadAPI.md | 30 +- keys/model_keys_tsig_key.go | 42 ++ keys/model_upload_request.go | 42 ++ keys/utils.go | 2 +- 119 files changed, 5838 insertions(+), 3471 deletions(-) diff --git a/dns_config/.openapi-generator/VERSION b/dns_config/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/dns_config/.openapi-generator/VERSION +++ b/dns_config/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/dns_config/README.md b/dns_config/README.md index 9289f28..bbffe47 100644 --- a/dns_config/README.md +++ b/dns_config/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import dns_config "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_config.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), dns_config.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_config.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), dns_config.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_config.ContextOperationServerIndices` and `dns_config.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), dns_config.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -266,11 +266,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_config.ContextAPIKeys, + map[string]dns_config.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_config/docs/AclAPI.md b/dns_config/docs/AclAPI.md index cb8cd18..2186694 100644 --- a/dns_config/docs/AclAPI.md +++ b/dns_config/docs/AclAPI.md @@ -26,24 +26,24 @@ Create the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclCreate`: ConfigCreateACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclCreate`: %v\n", resp) + body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclCreate`: ConfigCreateACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the ACL object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AclAPI.AclDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List ACL objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclList`: ConfigListACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclList`: ConfigListACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclRead`: ConfigReadACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclRead`: ConfigReadACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the ACL object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AclUpdate`: ConfigUpdateACLResponse - fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigACL("Name_example") // ConfigACL | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AclAPI.AclUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AclAPI.AclUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AclUpdate`: ConfigUpdateACLResponse + fmt.Fprintf(os.Stdout, "Response from `AclAPI.AclUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/AuthNsgAPI.md b/dns_config/docs/AuthNsgAPI.md index c121ebd..57a9e46 100644 --- a/dns_config/docs/AuthNsgAPI.md +++ b/dns_config/docs/AuthNsgAPI.md @@ -26,24 +26,24 @@ Create the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgCreate`: ConfigCreateAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgCreate`: %v\n", resp) + body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgCreate`: ConfigCreateAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the AuthNSG object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AuthNsgAPI.AuthNsgDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List AuthNSG objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgList`: ConfigListAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgList`: ConfigListAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgRead`: ConfigReadAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgRead`: ConfigReadAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the AuthNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthNsgUpdate`: ConfigUpdateAuthNSGResponse - fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigAuthNSG("Name_example") // ConfigAuthNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthNsgAPI.AuthNsgUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthNsgAPI.AuthNsgUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthNsgUpdate`: ConfigUpdateAuthNSGResponse + fmt.Fprintf(os.Stdout, "Response from `AuthNsgAPI.AuthNsgUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/AuthZoneAPI.md b/dns_config/docs/AuthZoneAPI.md index 041d137..3191123 100644 --- a/dns_config/docs/AuthZoneAPI.md +++ b/dns_config/docs/AuthZoneAPI.md @@ -27,24 +27,24 @@ Copies the __AuthZone__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCopyAuthZone("TargetView_example") // ConfigCopyAuthZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneCopy`: ConfigCopyAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCopy`: %v\n", resp) + body := *openapiclient.NewConfigCopyAuthZone("TargetView_example") // ConfigCopyAuthZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneCopy`: ConfigCopyAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCopy`: %v\n", resp) } ``` @@ -93,25 +93,25 @@ Create the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneCreate`: ConfigCreateAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCreate`: %v\n", resp) + body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneCreate`: ConfigCreateAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneCreate`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Moves the AuthZone object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AuthZoneAPI.AuthZoneDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,32 +229,32 @@ List AuthZone objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneList`: ConfigListAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneList`: ConfigListAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneList`: %v\n", resp) } ``` @@ -311,26 +311,26 @@ Read the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneRead`: ConfigReadAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneRead`: ConfigReadAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneRead`: %v\n", resp) } ``` @@ -385,26 +385,26 @@ Update the AuthZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthZoneUpdate`: ConfigUpdateAuthZoneResponse - fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigAuthZone() // ConfigAuthZone | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthZoneAPI.AuthZoneUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthZoneAPI.AuthZoneUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthZoneUpdate`: ConfigUpdateAuthZoneResponse + fmt.Fprintf(os.Stdout, "Response from `AuthZoneAPI.AuthZoneUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/CacheFlushAPI.md b/dns_config/docs/CacheFlushAPI.md index 7bc0fa2..9354a5f 100644 --- a/dns_config/docs/CacheFlushAPI.md +++ b/dns_config/docs/CacheFlushAPI.md @@ -22,24 +22,24 @@ Create the Cache Flush object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCacheFlush() // ConfigCacheFlush | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CacheFlushAPI.CacheFlushCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CacheFlushCreate`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `CacheFlushAPI.CacheFlushCreate`: %v\n", resp) + body := *openapiclient.NewConfigCacheFlush() // ConfigCacheFlush | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CacheFlushAPI.CacheFlushCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CacheFlushAPI.CacheFlushCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CacheFlushCreate`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `CacheFlushAPI.CacheFlushCreate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ConvertDomainNameAPI.md b/dns_config/docs/ConvertDomainNameAPI.md index 9843f03..cb6e7c9 100644 --- a/dns_config/docs/ConvertDomainNameAPI.md +++ b/dns_config/docs/ConvertDomainNameAPI.md @@ -22,24 +22,24 @@ Convert the object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - domainName := "domainName_example" // string | Input domain name in either of IDN or punycode representations. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConvertDomainNameAPI.ConvertDomainNameConvert``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ConvertDomainNameConvert`: ConfigConvertDomainNameResponse - fmt.Fprintf(os.Stdout, "Response from `ConvertDomainNameAPI.ConvertDomainNameConvert`: %v\n", resp) + domainName := "domainName_example" // string | Input domain name in either of IDN or punycode representations. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConvertDomainNameAPI.ConvertDomainNameConvert(context.Background(), domainName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConvertDomainNameAPI.ConvertDomainNameConvert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConvertDomainNameConvert`: ConfigConvertDomainNameResponse + fmt.Fprintf(os.Stdout, "Response from `ConvertDomainNameAPI.ConvertDomainNameConvert`: %v\n", resp) } ``` diff --git a/dns_config/docs/ConvertRnameAPI.md b/dns_config/docs/ConvertRnameAPI.md index a7f16be..226ce47 100644 --- a/dns_config/docs/ConvertRnameAPI.md +++ b/dns_config/docs/ConvertRnameAPI.md @@ -22,24 +22,24 @@ Convert the object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - emailAddress := "emailAddress_example" // string | Input email address. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConvertRnameAPI.ConvertRnameConvertRName``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ConvertRnameConvertRName`: ConfigConvertRNameResponse - fmt.Fprintf(os.Stdout, "Response from `ConvertRnameAPI.ConvertRnameConvertRName`: %v\n", resp) + emailAddress := "emailAddress_example" // string | Input email address. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConvertRnameAPI.ConvertRnameConvertRName(context.Background(), emailAddress).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConvertRnameAPI.ConvertRnameConvertRName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ConvertRnameConvertRName`: ConfigConvertRNameResponse + fmt.Fprintf(os.Stdout, "Response from `ConvertRnameAPI.ConvertRnameConvertRName`: %v\n", resp) } ``` diff --git a/dns_config/docs/DelegationAPI.md b/dns_config/docs/DelegationAPI.md index 0139c9d..5921d77 100644 --- a/dns_config/docs/DelegationAPI.md +++ b/dns_config/docs/DelegationAPI.md @@ -26,24 +26,24 @@ Create the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigDelegation() // ConfigDelegation | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationCreate`: ConfigCreateDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationCreate`: %v\n", resp) + body := *openapiclient.NewConfigDelegation() // ConfigDelegation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationCreate`: ConfigCreateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Moves the Delegation object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DelegationAPI.DelegationDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List Delegation objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationList`: ConfigListDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationList`: ConfigListDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationRead`: ConfigReadDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationRead`: ConfigReadDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the Delegation object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigDelegation() // ConfigDelegation | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DelegationUpdate`: ConfigUpdateDelegationResponse - fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigDelegation() // ConfigDelegation | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DelegationAPI.DelegationUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DelegationAPI.DelegationUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DelegationUpdate`: ConfigUpdateDelegationResponse + fmt.Fprintf(os.Stdout, "Response from `DelegationAPI.DelegationUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ForwardNsgAPI.md b/dns_config/docs/ForwardNsgAPI.md index ccf787f..a887b7e 100644 --- a/dns_config/docs/ForwardNsgAPI.md +++ b/dns_config/docs/ForwardNsgAPI.md @@ -26,24 +26,24 @@ Create the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgCreate`: ConfigCreateForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgCreate`: %v\n", resp) + body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgCreate`: ConfigCreateForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the ForwardNSG object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ForwardNsgAPI.ForwardNsgDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List ForwardNSG objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgList`: ConfigListForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgList`: ConfigListForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgRead`: ConfigReadForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgRead`: ConfigReadForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the ForwardNSG object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardNsgUpdate`: ConfigUpdateForwardNSGResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigForwardNSG("Name_example") // ConfigForwardNSG | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardNsgAPI.ForwardNsgUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardNsgAPI.ForwardNsgUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardNsgUpdate`: ConfigUpdateForwardNSGResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardNsgAPI.ForwardNsgUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ForwardZoneAPI.md b/dns_config/docs/ForwardZoneAPI.md index ae7ff8b..746faaa 100644 --- a/dns_config/docs/ForwardZoneAPI.md +++ b/dns_config/docs/ForwardZoneAPI.md @@ -27,24 +27,24 @@ Copies the __ForwardZone__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigCopyForwardZone("TargetView_example") // ConfigCopyForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneCopy`: ConfigCopyForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCopy`: %v\n", resp) + body := *openapiclient.NewConfigCopyForwardZone("TargetView_example") // ConfigCopyForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneCopy`: ConfigCopyForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCopy`: %v\n", resp) } ``` @@ -93,24 +93,24 @@ Create the ForwardZone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneCreate`: ConfigCreateForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCreate`: %v\n", resp) + body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneCreate`: ConfigCreateForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneCreate`: %v\n", resp) } ``` @@ -159,22 +159,22 @@ Move the Forward Zone object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ForwardZoneAPI.ForwardZoneDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -227,31 +227,31 @@ List Forward Zone objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneList`: ConfigListForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneList`: ConfigListForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneList`: %v\n", resp) } ``` @@ -307,25 +307,25 @@ Read the Forward Zone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneRead`: ConfigReadForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneRead`: ConfigReadForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneRead`: %v\n", resp) } ``` @@ -379,25 +379,25 @@ Update the Forward Zone object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ForwardZoneUpdate`: ConfigUpdateForwardZoneResponse - fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigForwardZone() // ConfigForwardZone | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ForwardZoneAPI.ForwardZoneUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ForwardZoneAPI.ForwardZoneUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ForwardZoneUpdate`: ConfigUpdateForwardZoneResponse + fmt.Fprintf(os.Stdout, "Response from `ForwardZoneAPI.ForwardZoneUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/GlobalAPI.md b/dns_config/docs/GlobalAPI.md index 6dd47b5..da7aac9 100644 --- a/dns_config/docs/GlobalAPI.md +++ b/dns_config/docs/GlobalAPI.md @@ -25,24 +25,24 @@ Read the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead`: ConfigReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead`: ConfigReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) } ``` @@ -91,25 +91,25 @@ Read the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead2`: ConfigReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead2`: ConfigReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) } ``` @@ -163,24 +163,24 @@ Update the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate`: ConfigUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) + body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate`: ConfigUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) } ``` @@ -229,25 +229,25 @@ Update the Global configuration object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate2`: ConfigUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigGlobal("Id_example") // ConfigGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate2`: ConfigUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) } ``` diff --git a/dns_config/docs/HostAPI.md b/dns_config/docs/HostAPI.md index c6433fa..897dc01 100644 --- a/dns_config/docs/HostAPI.md +++ b/dns_config/docs/HostAPI.md @@ -24,32 +24,32 @@ List DNS Host objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostList`: ConfigListHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostList`: ConfigListHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostList`: %v\n", resp) } ``` @@ -106,26 +106,26 @@ Read the DNS Host object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostRead`: ConfigReadHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostRead`: ConfigReadHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostRead`: %v\n", resp) } ``` @@ -180,26 +180,26 @@ Update the DNS Host object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigHost() // ConfigHost | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostUpdate`: ConfigUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigHost() // ConfigHost | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostAPI.HostUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostAPI.HostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostUpdate`: ConfigUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostAPI.HostUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/LbdnAPI.md b/dns_config/docs/LbdnAPI.md index e21786e..cd45642 100644 --- a/dns_config/docs/LbdnAPI.md +++ b/dns_config/docs/LbdnAPI.md @@ -26,24 +26,24 @@ Create the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnCreate`: ConfigCreateLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnCreate`: %v\n", resp) + body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnCreate`: ConfigCreateLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LbdnAPI.LbdnDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ List __LBDN__ objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnList`: ConfigListLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnList`: ConfigListLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Read the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnRead`: ConfigReadLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnRead`: ConfigReadLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the __LBDN__ object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LbdnUpdate`: ConfigUpdateLBDNResponse - fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigLBDN("Name_example", "View_example") // ConfigLBDN | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LbdnAPI.LbdnUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LbdnAPI.LbdnUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LbdnUpdate`: ConfigUpdateLBDNResponse + fmt.Fprintf(os.Stdout, "Response from `LbdnAPI.LbdnUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ServerAPI.md b/dns_config/docs/ServerAPI.md index 3413e39..4b8e307 100644 --- a/dns_config/docs/ServerAPI.md +++ b/dns_config/docs/ServerAPI.md @@ -26,25 +26,25 @@ Create the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerCreate`: ConfigCreateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) + body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerCreate`: ConfigCreateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the Server object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ List Server objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerList`: ConfigListServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerList`: ConfigListServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Read the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerRead`: ConfigReadServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerRead`: ConfigReadServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the Server object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerUpdate`: ConfigUpdateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigServer("Name_example") // ConfigServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerUpdate`: ConfigUpdateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) } ``` diff --git a/dns_config/docs/ViewAPI.md b/dns_config/docs/ViewAPI.md index 88cb110..c3106ba 100644 --- a/dns_config/docs/ViewAPI.md +++ b/dns_config/docs/ViewAPI.md @@ -27,24 +27,24 @@ Copies the specified __AuthZone__ and __ForwardZone__ objects in the __View__. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigBulkCopyView([]string{"Resources_example"}, "Target_example") // ConfigBulkCopyView | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewBulkCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewBulkCopy`: ConfigBulkCopyResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewBulkCopy`: %v\n", resp) + body := *openapiclient.NewConfigBulkCopyView([]string{"Resources_example"}, "Target_example") // ConfigBulkCopyView | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewBulkCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewBulkCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewBulkCopy`: ConfigBulkCopyResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewBulkCopy`: %v\n", resp) } ``` @@ -93,25 +93,25 @@ Create the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewConfigView("Name_example") // ConfigView | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewCreate`: ConfigCreateViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewCreate`: %v\n", resp) + body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewCreate`: ConfigCreateViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewCreate`: %v\n", resp) } ``` @@ -161,22 +161,22 @@ Move the View object to Recyclebin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ViewAPI.ViewDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -229,32 +229,32 @@ List View objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewList`: ConfigListViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewList`: ConfigListViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewList`: %v\n", resp) } ``` @@ -311,26 +311,26 @@ Read the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewRead`: ConfigReadViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewRead`: ConfigReadViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewRead`: %v\n", resp) } ``` @@ -385,26 +385,26 @@ Update the View object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewConfigView("Name_example") // ConfigView | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewUpdate`: ConfigUpdateViewResponse - fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewConfigView("Name_example") // ConfigView | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ViewAPI.ViewUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ViewAPI.ViewUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ViewUpdate`: ConfigUpdateViewResponse + fmt.Fprintf(os.Stdout, "Response from `ViewAPI.ViewUpdate`: %v\n", resp) } ``` diff --git a/dns_config/model_config_acl.go b/dns_config/model_config_acl.go index 932e0ce..fd163a8 100644 --- a/dns_config/model_config_acl.go +++ b/dns_config/model_config_acl.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigACL type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type ConfigACL struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigACL ConfigACL + // NewConfigACL instantiates a new ConfigACL object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -227,6 +231,43 @@ func (o ConfigACL) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigACL) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigACL := _ConfigACL{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigACL) + + if err != nil { + return err + } + + *o = ConfigACL(varConfigACL) + + return err +} + type NullableConfigACL struct { value *ConfigACL isSet bool diff --git a/dns_config/model_config_acl_item.go b/dns_config/model_config_acl_item.go index 56a0482..7270502 100644 --- a/dns_config/model_config_acl_item.go +++ b/dns_config/model_config_acl_item.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigACLItem type satisfies the MappedNullable interface at compile time @@ -30,6 +32,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 +221,44 @@ func (o ConfigACLItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigACLItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + "element", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigACLItem := _ConfigACLItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigACLItem) + + if err != nil { + return err + } + + *o = ConfigACLItem(varConfigACLItem) + + return err +} + type NullableConfigACLItem struct { value *ConfigACLItem isSet bool diff --git a/dns_config/model_config_auth_nsg.go b/dns_config/model_config_auth_nsg.go index 86e2519..4ee3bdd 100644 --- a/dns_config/model_config_auth_nsg.go +++ b/dns_config/model_config_auth_nsg.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigAuthNSG type satisfies the MappedNullable interface at compile time @@ -37,6 +39,8 @@ type ConfigAuthNSG struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigAuthNSG ConfigAuthNSG + // NewConfigAuthNSG instantiates a new ConfigAuthNSG object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -338,6 +342,43 @@ func (o ConfigAuthNSG) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigAuthNSG) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigAuthNSG := _ConfigAuthNSG{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigAuthNSG) + + if err != nil { + return err + } + + *o = ConfigAuthNSG(varConfigAuthNSG) + + return err +} + type NullableConfigAuthNSG struct { value *ConfigAuthNSG isSet bool diff --git a/dns_config/model_config_bulk_copy_view.go b/dns_config/model_config_bulk_copy_view.go index d8bbec7..f4a5d9c 100644 --- a/dns_config/model_config_bulk_copy_view.go +++ b/dns_config/model_config_bulk_copy_view.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigBulkCopyView type satisfies the MappedNullable interface at compile time @@ -32,6 +34,8 @@ type ConfigBulkCopyView struct { Target string `json:"target"` } +type _ConfigBulkCopyView ConfigBulkCopyView + // NewConfigBulkCopyView instantiates a new ConfigBulkCopyView object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -289,6 +293,44 @@ func (o ConfigBulkCopyView) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigBulkCopyView) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "resources", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigBulkCopyView := _ConfigBulkCopyView{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigBulkCopyView) + + if err != nil { + return err + } + + *o = ConfigBulkCopyView(varConfigBulkCopyView) + + return err +} + type NullableConfigBulkCopyView struct { value *ConfigBulkCopyView isSet bool diff --git a/dns_config/model_config_copy_auth_zone.go b/dns_config/model_config_copy_auth_zone.go index 7994869..a76e929 100644 --- a/dns_config/model_config_copy_auth_zone.go +++ b/dns_config/model_config_copy_auth_zone.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigCopyAuthZone type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigCopyAuthZone struct { TargetView string `json:"target_view"` } +type _ConfigCopyAuthZone ConfigCopyAuthZone + // NewConfigCopyAuthZone instantiates a new ConfigCopyAuthZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -375,6 +379,43 @@ func (o ConfigCopyAuthZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigCopyAuthZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigCopyAuthZone := _ConfigCopyAuthZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigCopyAuthZone) + + if err != nil { + return err + } + + *o = ConfigCopyAuthZone(varConfigCopyAuthZone) + + return err +} + type NullableConfigCopyAuthZone struct { value *ConfigCopyAuthZone isSet bool diff --git a/dns_config/model_config_copy_forward_zone.go b/dns_config/model_config_copy_forward_zone.go index 98b8fb0..7060b8f 100644 --- a/dns_config/model_config_copy_forward_zone.go +++ b/dns_config/model_config_copy_forward_zone.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigCopyForwardZone type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigCopyForwardZone struct { TargetView string `json:"target_view"` } +type _ConfigCopyForwardZone ConfigCopyForwardZone + // NewConfigCopyForwardZone instantiates a new ConfigCopyForwardZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -375,6 +379,43 @@ func (o ConfigCopyForwardZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigCopyForwardZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "target_view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigCopyForwardZone := _ConfigCopyForwardZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigCopyForwardZone) + + if err != nil { + return err + } + + *o = ConfigCopyForwardZone(varConfigCopyForwardZone) + + return err +} + type NullableConfigCopyForwardZone struct { value *ConfigCopyForwardZone isSet bool diff --git a/dns_config/model_config_delegation_server.go b/dns_config/model_config_delegation_server.go index 32171bb..84641ae 100644 --- a/dns_config/model_config_delegation_server.go +++ b/dns_config/model_config_delegation_server.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigDelegationServer type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigDelegationServer struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigDelegationServer ConfigDelegationServer + // NewConfigDelegationServer instantiates a new ConfigDelegationServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -153,6 +157,43 @@ func (o ConfigDelegationServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigDelegationServer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigDelegationServer := _ConfigDelegationServer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigDelegationServer) + + if err != nil { + return err + } + + *o = ConfigDelegationServer(varConfigDelegationServer) + + return err +} + type NullableConfigDelegationServer struct { value *ConfigDelegationServer isSet bool diff --git a/dns_config/model_config_ecs_zone.go b/dns_config/model_config_ecs_zone.go index ea54ad5..f24d088 100644 --- a/dns_config/model_config_ecs_zone.go +++ b/dns_config/model_config_ecs_zone.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigECSZone type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigECSZone struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigECSZone ConfigECSZone + // NewConfigECSZone instantiates a new ConfigECSZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +148,44 @@ func (o ConfigECSZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigECSZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigECSZone := _ConfigECSZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigECSZone) + + if err != nil { + return err + } + + *o = ConfigECSZone(varConfigECSZone) + + return err +} + type NullableConfigECSZone struct { value *ConfigECSZone isSet bool diff --git a/dns_config/model_config_external_primary.go b/dns_config/model_config_external_primary.go index a57a1c8..56da227 100644 --- a/dns_config/model_config_external_primary.go +++ b/dns_config/model_config_external_primary.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigExternalPrimary type satisfies the MappedNullable interface at compile time @@ -34,6 +36,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 +304,43 @@ func (o ConfigExternalPrimary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigExternalPrimary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigExternalPrimary := _ConfigExternalPrimary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigExternalPrimary) + + if err != nil { + return err + } + + *o = ConfigExternalPrimary(varConfigExternalPrimary) + + return err +} + type NullableConfigExternalPrimary struct { value *ConfigExternalPrimary isSet bool diff --git a/dns_config/model_config_external_secondary.go b/dns_config/model_config_external_secondary.go index df6480e..87468cd 100644 --- a/dns_config/model_config_external_secondary.go +++ b/dns_config/model_config_external_secondary.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigExternalSecondary type satisfies the MappedNullable interface at compile time @@ -32,6 +34,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 +258,44 @@ func (o ConfigExternalSecondary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigExternalSecondary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigExternalSecondary := _ConfigExternalSecondary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigExternalSecondary) + + if err != nil { + return err + } + + *o = ConfigExternalSecondary(varConfigExternalSecondary) + + return err +} + type NullableConfigExternalSecondary struct { value *ConfigExternalSecondary isSet bool diff --git a/dns_config/model_config_forward_nsg.go b/dns_config/model_config_forward_nsg.go index 6c75052..1480409 100644 --- a/dns_config/model_config_forward_nsg.go +++ b/dns_config/model_config_forward_nsg.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigForwardNSG type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigForwardNSG struct { Tags map[string]interface{} `json:"tags,omitempty"` } +type _ConfigForwardNSG ConfigForwardNSG + // NewConfigForwardNSG instantiates a new ConfigForwardNSG object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -375,6 +379,43 @@ func (o ConfigForwardNSG) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigForwardNSG) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigForwardNSG := _ConfigForwardNSG{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigForwardNSG) + + if err != nil { + return err + } + + *o = ConfigForwardNSG(varConfigForwardNSG) + + return err +} + type NullableConfigForwardNSG struct { value *ConfigForwardNSG isSet bool diff --git a/dns_config/model_config_forwarder.go b/dns_config/model_config_forwarder.go index f583e4a..2a455ee 100644 --- a/dns_config/model_config_forwarder.go +++ b/dns_config/model_config_forwarder.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigForwarder type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigForwarder struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigForwarder ConfigForwarder + // NewConfigForwarder instantiates a new ConfigForwarder object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -153,6 +157,43 @@ func (o ConfigForwarder) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigForwarder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigForwarder := _ConfigForwarder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigForwarder) + + if err != nil { + return err + } + + *o = ConfigForwarder(varConfigForwarder) + + return err +} + type NullableConfigForwarder struct { value *ConfigForwarder isSet bool diff --git a/dns_config/model_config_global.go b/dns_config/model_config_global.go index 76ca4ff..59f31ae 100644 --- a/dns_config/model_config_global.go +++ b/dns_config/model_config_global.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigGlobal type satisfies the MappedNullable interface at compile time @@ -109,6 +111,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 +1709,43 @@ func (o ConfigGlobal) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigGlobal) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigGlobal := _ConfigGlobal{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigGlobal) + + if err != nil { + return err + } + + *o = ConfigGlobal(varConfigGlobal) + + return err +} + type NullableConfigGlobal struct { value *ConfigGlobal isSet bool diff --git a/dns_config/model_config_internal_secondary.go b/dns_config/model_config_internal_secondary.go index 0a83134..57af484 100644 --- a/dns_config/model_config_internal_secondary.go +++ b/dns_config/model_config_internal_secondary.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigInternalSecondary type satisfies the MappedNullable interface at compile time @@ -23,6 +25,8 @@ type ConfigInternalSecondary struct { Host string `json:"host"` } +type _ConfigInternalSecondary ConfigInternalSecondary + // NewConfigInternalSecondary instantiates a new ConfigInternalSecondary object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +83,43 @@ func (o ConfigInternalSecondary) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigInternalSecondary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "host", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigInternalSecondary := _ConfigInternalSecondary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigInternalSecondary) + + if err != nil { + return err + } + + *o = ConfigInternalSecondary(varConfigInternalSecondary) + + return err +} + type NullableConfigInternalSecondary struct { value *ConfigInternalSecondary isSet bool diff --git a/dns_config/model_config_kerberos_key.go b/dns_config/model_config_kerberos_key.go index a477694..34d5290 100644 --- a/dns_config/model_config_kerberos_key.go +++ b/dns_config/model_config_kerberos_key.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigKerberosKey type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type ConfigKerberosKey struct { Version *int64 `json:"version,omitempty"` } +type _ConfigKerberosKey ConfigKerberosKey + // NewConfigKerberosKey instantiates a new ConfigKerberosKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +268,43 @@ func (o ConfigKerberosKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigKerberosKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigKerberosKey := _ConfigKerberosKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigKerberosKey) + + if err != nil { + return err + } + + *o = ConfigKerberosKey(varConfigKerberosKey) + + return err +} + type NullableConfigKerberosKey struct { value *ConfigKerberosKey isSet bool diff --git a/dns_config/model_config_lbdn.go b/dns_config/model_config_lbdn.go index a60ac09..91c97a7 100644 --- a/dns_config/model_config_lbdn.go +++ b/dns_config/model_config_lbdn.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigLBDN type satisfies the MappedNullable interface at compile time @@ -39,6 +41,8 @@ type ConfigLBDN struct { View string `json:"view"` } +type _ConfigLBDN ConfigLBDN + // NewConfigLBDN instantiates a new ConfigLBDN object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -401,6 +405,44 @@ func (o ConfigLBDN) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigLBDN) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "view", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigLBDN := _ConfigLBDN{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigLBDN) + + if err != nil { + return err + } + + *o = ConfigLBDN(varConfigLBDN) + + return err +} + type NullableConfigLBDN struct { value *ConfigLBDN isSet bool diff --git a/dns_config/model_config_root_ns.go b/dns_config/model_config_root_ns.go index 3420c41..231ec7c 100644 --- a/dns_config/model_config_root_ns.go +++ b/dns_config/model_config_root_ns.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigRootNS type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type ConfigRootNS struct { ProtocolFqdn *string `json:"protocol_fqdn,omitempty"` } +type _ConfigRootNS ConfigRootNS + // NewConfigRootNS instantiates a new ConfigRootNS object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +148,44 @@ func (o ConfigRootNS) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigRootNS) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "fqdn", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigRootNS := _ConfigRootNS{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigRootNS) + + if err != nil { + return err + } + + *o = ConfigRootNS(varConfigRootNS) + + return err +} + type NullableConfigRootNS struct { value *ConfigRootNS isSet bool diff --git a/dns_config/model_config_server.go b/dns_config/model_config_server.go index d671625..987980a 100644 --- a/dns_config/model_config_server.go +++ b/dns_config/model_config_server.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -119,6 +121,8 @@ type ConfigServer struct { Views []ConfigDisplayView `json:"views,omitempty"` } +type _ConfigServer ConfigServer + // NewConfigServer instantiates a new ConfigServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1855,6 +1859,43 @@ func (o ConfigServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigServer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigServer := _ConfigServer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigServer) + + if err != nil { + return err + } + + *o = ConfigServer(varConfigServer) + + return err +} + type NullableConfigServer struct { value *ConfigServer isSet bool diff --git a/dns_config/model_config_sort_list_item.go b/dns_config/model_config_sort_list_item.go index 2fca3ca..c22808f 100644 --- a/dns_config/model_config_sort_list_item.go +++ b/dns_config/model_config_sort_list_item.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigSortListItem type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type ConfigSortListItem struct { Source *string `json:"source,omitempty"` } +type _ConfigSortListItem ConfigSortListItem + // NewConfigSortListItem instantiates a new ConfigSortListItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -190,6 +194,43 @@ func (o ConfigSortListItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigSortListItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "element", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigSortListItem := _ConfigSortListItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigSortListItem) + + if err != nil { + return err + } + + *o = ConfigSortListItem(varConfigSortListItem) + + return err +} + type NullableConfigSortListItem struct { value *ConfigSortListItem isSet bool diff --git a/dns_config/model_config_trust_anchor.go b/dns_config/model_config_trust_anchor.go index eb1d56b..6448af1 100644 --- a/dns_config/model_config_trust_anchor.go +++ b/dns_config/model_config_trust_anchor.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" ) // checks if the ConfigTrustAnchor type satisfies the MappedNullable interface at compile time @@ -30,6 +32,8 @@ type ConfigTrustAnchor struct { Zone string `json:"zone"` } +type _ConfigTrustAnchor ConfigTrustAnchor + // NewConfigTrustAnchor instantiates a new ConfigTrustAnchor object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -208,6 +212,45 @@ func (o ConfigTrustAnchor) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigTrustAnchor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "algorithm", + "public_key", + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigTrustAnchor := _ConfigTrustAnchor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigTrustAnchor) + + if err != nil { + return err + } + + *o = ConfigTrustAnchor(varConfigTrustAnchor) + + return err +} + type NullableConfigTrustAnchor struct { value *ConfigTrustAnchor isSet bool diff --git a/dns_config/model_config_view.go b/dns_config/model_config_view.go index 5d21d3e..643fefb 100644 --- a/dns_config/model_config_view.go +++ b/dns_config/model_config_view.go @@ -11,7 +11,9 @@ API version: v1 package dns_config import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -115,6 +117,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 +1820,43 @@ func (o ConfigView) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ConfigView) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConfigView := _ConfigView{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConfigView) + + if err != nil { + return err + } + + *o = ConfigView(varConfigView) + + return err +} + type NullableConfigView struct { value *ConfigView isSet bool diff --git a/dns_config/utils.go b/dns_config/utils.go index a23d0eb..dd2f56a 100644 --- a/dns_config/utils.go +++ b/dns_config/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/dns_data/.openapi-generator/VERSION b/dns_data/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/dns_data/.openapi-generator/VERSION +++ b/dns_data/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/dns_data/README.md b/dns_data/README.md index c915354..e1d4afb 100644 --- a/dns_data/README.md +++ b/dns_data/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import dns_data "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `dns_data.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `dns_data.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `dns_data.ContextOperationServerIndices` and `dns_data.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), dns_data.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -115,11 +115,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + dns_data.ContextAPIKeys, + map[string]dns_data.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/dns_data/docs/RecordAPI.md b/dns_data/docs/RecordAPI.md index 9a09e0e..1b08a69 100644 --- a/dns_data/docs/RecordAPI.md +++ b/dns_data/docs/RecordAPI.md @@ -27,25 +27,25 @@ Create the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordCreate`: DataCreateRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordCreate`: %v\n", resp) + body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordCreate`: DataCreateRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordCreate`: %v\n", resp) } ``` @@ -95,22 +95,22 @@ Move the DNS resource record to recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RecordAPI.RecordDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -163,32 +163,32 @@ Retrieve DNS resource records. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordList`: DataListRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordList`: DataListRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordList`: %v\n", resp) } ``` @@ -245,26 +245,26 @@ Retrieve the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordRead`: DataReadRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordRead`: DataReadRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordRead`: %v\n", resp) } ``` @@ -319,25 +319,25 @@ Increment serial number for the SOA record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewDataSOASerialIncrementRequest() // DataSOASerialIncrementRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordSOASerialIncrement``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordSOASerialIncrement`: DataSOASerialIncrementResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordSOASerialIncrement`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewDataSOASerialIncrementRequest() // DataSOASerialIncrementRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordSOASerialIncrement(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordSOASerialIncrement``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordSOASerialIncrement`: DataSOASerialIncrementResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordSOASerialIncrement`: %v\n", resp) } ``` @@ -391,26 +391,26 @@ Update the DNS resource record. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RecordUpdate`: DataUpdateRecordResponse - fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewDataRecord(map[string]interface{}(123)) // DataRecord | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RecordAPI.RecordUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RecordAPI.RecordUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RecordUpdate`: DataUpdateRecordResponse + fmt.Fprintf(os.Stdout, "Response from `RecordAPI.RecordUpdate`: %v\n", resp) } ``` diff --git a/dns_data/model_data_record.go b/dns_data/model_data_record.go index 35e1911..58b63d6 100644 --- a/dns_data/model_data_record.go +++ b/dns_data/model_data_record.go @@ -11,7 +11,9 @@ API version: v1 package dns_data import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -73,6 +75,8 @@ type DataRecord struct { Zone *string `json:"zone,omitempty"` } +type _DataRecord DataRecord + // NewDataRecord instantiates a new DataRecord object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1004,6 +1008,43 @@ func (o DataRecord) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DataRecord) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rdata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataRecord := _DataRecord{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataRecord) + + if err != nil { + return err + } + + *o = DataRecord(varDataRecord) + + return err +} + type NullableDataRecord struct { value *DataRecord isSet bool diff --git a/dns_data/utils.go b/dns_data/utils.go index d20341f..9e6e1a0 100644 --- a/dns_data/utils.go +++ b/dns_data/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/infra_mgmt/.openapi-generator/VERSION b/infra_mgmt/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/infra_mgmt/.openapi-generator/VERSION +++ b/infra_mgmt/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/infra_mgmt/README.md b/infra_mgmt/README.md index 7a82978..337a231 100644 --- a/infra_mgmt/README.md +++ b/infra_mgmt/README.md @@ -62,20 +62,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import infra_mgmt "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -85,17 +85,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `infra_mgmt.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `infra_mgmt.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), infra_mgmt.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -107,9 +107,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `infra_mgmt.ContextOperationServerIndices` and `infra_mgmt.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), infra_mgmt.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -191,11 +191,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + infra_mgmt.ContextAPIKeys, + map[string]infra_mgmt.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/infra_mgmt/docs/DetailAPI.md b/infra_mgmt/docs/DetailAPI.md index a21feb9..bcba07e 100644 --- a/infra_mgmt/docs/DetailAPI.md +++ b/infra_mgmt/docs/DetailAPI.md @@ -21,31 +21,31 @@ List all the Hosts along with its associated Services (applications). package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DetailAPI.DetailHostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailHostsList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DetailHostsList`: InfraListDetailHostsResponse - fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailHostsList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DetailAPI.DetailHostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailHostsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailHostsList`: InfraListDetailHostsResponse + fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailHostsList`: %v\n", resp) } ``` @@ -99,31 +99,31 @@ List all the Services (applications) along with its associated Hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DetailAPI.DetailServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailServicesList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DetailServicesList`: InfraListDetailServicesResponse - fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailServicesList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DetailAPI.DetailServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DetailAPI.DetailServicesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DetailServicesList`: InfraListDetailServicesResponse + fmt.Fprintf(os.Stdout, "Response from `DetailAPI.DetailServicesList`: %v\n", resp) } ``` diff --git a/infra_mgmt/docs/HostsAPI.md b/infra_mgmt/docs/HostsAPI.md index 8dfb38b..a838200 100644 --- a/infra_mgmt/docs/HostsAPI.md +++ b/infra_mgmt/docs/HostsAPI.md @@ -30,24 +30,24 @@ Assign tags for list of hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraAssignTagsRequest() // InfraAssignTagsRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsAssignTags(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsAssignTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsAssignTags`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsAssignTags`: %v\n", resp) + body := *openapiclient.NewInfraAssignTagsRequest() // InfraAssignTagsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsAssignTags(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsAssignTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsAssignTags`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsAssignTags`: %v\n", resp) } ``` @@ -96,24 +96,24 @@ Create a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsCreate`: InfraCreateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsCreate`: %v\n", resp) + body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsCreate`: InfraCreateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsCreate`: %v\n", resp) } ``` @@ -162,22 +162,22 @@ Delete a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.HostsAPI.HostsDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.HostsAPI.HostsDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -230,25 +230,25 @@ Disconnect a Host by resource ID. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraDisconnectRequest() // InfraDisconnectRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsDisconnect(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDisconnect``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsDisconnect`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsDisconnect`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraDisconnectRequest() // InfraDisconnectRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsDisconnect(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsDisconnect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsDisconnect`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsDisconnect`: %v\n", resp) } ``` @@ -300,31 +300,31 @@ List all the Host resources for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsList`: InfraListHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsList`: InfraListHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsList`: %v\n", resp) } ``` @@ -380,24 +380,24 @@ Get a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsRead(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsRead`: InfraGetHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsRead`: InfraGetHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsRead`: %v\n", resp) } ``` @@ -448,26 +448,26 @@ Migrate a Host's configuration from one to another. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fromResourceId := "fromResourceId_example" // string | An application specific resource identity of a resource - toResourceId := "toResourceId_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraReplaceHostRequest() // InfraReplaceHostRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsReplace(context.Background(), fromResourceId, toResourceId).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsReplace``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsReplace`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsReplace`: %v\n", resp) + fromResourceId := "fromResourceId_example" // string | An application specific resource identity of a resource + toResourceId := "toResourceId_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraReplaceHostRequest() // InfraReplaceHostRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsReplace(context.Background(), fromResourceId, toResourceId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsReplace``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsReplace`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsReplace`: %v\n", resp) } ``` @@ -523,24 +523,24 @@ Unassign tag for the list hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraUnassignTagsRequest() // InfraUnassignTagsRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsUnassignTags(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUnassignTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsUnassignTags`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUnassignTags`: %v\n", resp) + body := *openapiclient.NewInfraUnassignTagsRequest() // InfraUnassignTagsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsUnassignTags(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUnassignTags``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsUnassignTags`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUnassignTags`: %v\n", resp) } ``` @@ -589,25 +589,25 @@ Update a Host resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HostsAPI.HostsUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HostsUpdate`: InfraUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraHost("DisplayName_example") // InfraHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HostsAPI.HostsUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HostsAPI.HostsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HostsUpdate`: InfraUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `HostsAPI.HostsUpdate`: %v\n", resp) } ``` diff --git a/infra_mgmt/docs/ServicesAPI.md b/infra_mgmt/docs/ServicesAPI.md index 34fbbc9..a8d1020 100644 --- a/infra_mgmt/docs/ServicesAPI.md +++ b/infra_mgmt/docs/ServicesAPI.md @@ -27,24 +27,24 @@ List applications (Service types) for a particular account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - accountId := "accountId_example" // string | Account ID. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesApplications(context.Background()).AccountId(accountId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesApplications``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesApplications`: InfraApplicationsResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesApplications`: %v\n", resp) + accountId := "accountId_example" // string | Account ID. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesApplications(context.Background()).AccountId(accountId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesApplications``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesApplications`: InfraApplicationsResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesApplications`: %v\n", resp) } ``` @@ -93,24 +93,24 @@ Create a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesCreate`: InfraCreateServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesCreate`: %v\n", resp) + body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesCreate`: InfraCreateServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesCreate`: %v\n", resp) } ``` @@ -159,22 +159,22 @@ Delete a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServicesAPI.ServicesDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServicesAPI.ServicesDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -225,31 +225,31 @@ List all the Service resources for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesList`: InfraListServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Fields(fields).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesList`: InfraListServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesList`: %v\n", resp) } ``` @@ -305,24 +305,24 @@ Read a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesRead(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesRead`: InfraGetServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesRead(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesRead`: InfraGetServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesRead`: %v\n", resp) } ``` @@ -375,25 +375,25 @@ Update a Service resource. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServicesAPI.ServicesUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServicesUpdate`: InfraUpdateServiceResponse - fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewInfraService("Name_example", "PoolId_example", "ServiceType_example") // InfraService | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServicesAPI.ServicesUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServicesAPI.ServicesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServicesUpdate`: InfraUpdateServiceResponse + fmt.Fprintf(os.Stdout, "Response from `ServicesAPI.ServicesUpdate`: %v\n", resp) } ``` diff --git a/infra_mgmt/model_infra_host.go b/infra_mgmt/model_infra_host.go index 511d8d7..4f30cd6 100644 --- a/infra_mgmt/model_infra_host.go +++ b/infra_mgmt/model_infra_host.go @@ -11,7 +11,9 @@ API version: v1 package infra_mgmt import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -69,6 +71,8 @@ type InfraHost struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _InfraHost InfraHost + // NewInfraHost instantiates a new InfraHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -930,6 +934,43 @@ func (o InfraHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *InfraHost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "display_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInfraHost := _InfraHost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInfraHost) + + if err != nil { + return err + } + + *o = InfraHost(varInfraHost) + + return err +} + type NullableInfraHost struct { value *InfraHost isSet bool diff --git a/infra_mgmt/model_infra_service.go b/infra_mgmt/model_infra_service.go index 2ae3169..e6e7e35 100644 --- a/infra_mgmt/model_infra_service.go +++ b/infra_mgmt/model_infra_service.go @@ -11,7 +11,9 @@ API version: v1 package infra_mgmt import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -46,6 +48,8 @@ type InfraService struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _InfraService InfraService + // NewInfraService instantiates a new InfraService object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -469,6 +473,45 @@ func (o InfraService) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *InfraService) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pool_id", + "service_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInfraService := _InfraService{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInfraService) + + if err != nil { + return err + } + + *o = InfraService(varInfraService) + + return err +} + type NullableInfraService struct { value *InfraService isSet bool diff --git a/infra_mgmt/utils.go b/infra_mgmt/utils.go index 582297a..55d2f04 100644 --- a/infra_mgmt/utils.go +++ b/infra_mgmt/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/infra_provision/.openapi-generator/VERSION b/infra_provision/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/infra_provision/.openapi-generator/VERSION +++ b/infra_provision/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/infra_provision/README.md b/infra_provision/README.md index 725d160..11598b5 100644 --- a/infra_provision/README.md +++ b/infra_provision/README.md @@ -13,20 +13,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import infra_provision "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -36,17 +36,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `infra_provision.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), infra_provision.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `infra_provision.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), infra_provision.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -58,9 +58,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `infra_provision.ContextOperationServerIndices` and `infra_provision.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), infra_provision.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -124,11 +124,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + infra_provision.ContextAPIKeys, + map[string]infra_provision.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/infra_provision/docs/UICSRAPI.md b/infra_provision/docs/UICSRAPI.md index 2b70330..53e6ea7 100644 --- a/infra_provision/docs/UICSRAPI.md +++ b/infra_provision/docs/UICSRAPI.md @@ -24,25 +24,25 @@ Marks the certificate signing request as approved. The host activation service w package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR - body := *openapiclient.NewHostactivationApproveCSRRequest() // HostactivationApproveCSRRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRApprove(context.Background(), activationCode).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRApprove``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRApprove`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRApprove`: %v\n", resp) + activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR + body := *openapiclient.NewHostactivationApproveCSRRequest() // HostactivationApproveCSRRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRApprove(context.Background(), activationCode).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRApprove``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRApprove`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRApprove`: %v\n", resp) } ``` @@ -94,25 +94,25 @@ Marks the certificate signing request as denied. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR - body := *openapiclient.NewHostactivationDenyCSRRequest() // HostactivationDenyCSRRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRDeny(context.Background(), activationCode).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRDeny``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRDeny`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRDeny`: %v\n", resp) + activationCode := "activationCode_example" // string | activation code is used by the clients to track the approval of the CSR + body := *openapiclient.NewHostactivationDenyCSRRequest() // HostactivationDenyCSRRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRDeny(context.Background(), activationCode).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRDeny``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRDeny`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRDeny`: %v\n", resp) } ``` @@ -164,30 +164,30 @@ User can list the certificate signing requests for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRList`: HostactivationListCSRsResponse - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRList`: HostactivationListCSRsResponse + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRList`: %v\n", resp) } ``` @@ -242,25 +242,25 @@ Invalidates a certificate by adding it to a certificate revocation list. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - certSerial := "certSerial_example" // string | x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required - body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRRevoke(context.Background(), certSerial).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRRevoke`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke`: %v\n", resp) + certSerial := "certSerial_example" // string | x509 serial number of the certificate. This can be obtained by parsing the client certificate file on the onprem. Either cert_serial or ophid is required + body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRRevoke(context.Background(), certSerial).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRRevoke`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke`: %v\n", resp) } ``` @@ -314,25 +314,25 @@ Invalidates a certificate by adding it to a certificate revocation list. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - ophid := "ophid_example" // string | On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . - body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UICSRAPI.UICSRRevoke2(context.Background(), ophid).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UICSRRevoke2`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke2`: %v\n", resp) + ophid := "ophid_example" // string | On-prem host ID which can be obtained either from on-prem or BloxOne UI portal(Manage > Infrastructure > Hosts > Select the onprem > click on 3 dots on top right side > General Information > Ophid) . + body := *openapiclient.NewHostactivationRevokeCertRequest() // HostactivationRevokeCertRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UICSRAPI.UICSRRevoke2(context.Background(), ophid).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UICSRAPI.UICSRRevoke2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UICSRRevoke2`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `UICSRAPI.UICSRRevoke2`: %v\n", resp) } ``` diff --git a/infra_provision/docs/UIJoinTokenAPI.md b/infra_provision/docs/UIJoinTokenAPI.md index 54a6829..ef314fb 100644 --- a/infra_provision/docs/UIJoinTokenAPI.md +++ b/infra_provision/docs/UIJoinTokenAPI.md @@ -27,24 +27,24 @@ User can create a join token. Join token is random character string which is use package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenCreate`: HostactivationCreateJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenCreate`: %v\n", resp) + body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenCreate`: HostactivationCreateJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenCreate`: %v\n", resp) } ``` @@ -91,22 +91,22 @@ User can revoke the join token. Once revoked, it can not be used further. The jo package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -157,22 +157,22 @@ User can revoke a list of join tokens. Once revoked, join tokens can not be used package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewHostactivationDeleteJoinTokensRequest() // HostactivationDeleteJoinTokensRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDeleteSet(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDeleteSet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + body := *openapiclient.NewHostactivationDeleteJoinTokensRequest() // HostactivationDeleteJoinTokensRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UIJoinTokenAPI.UIJoinTokenDeleteSet(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenDeleteSet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -221,30 +221,30 @@ User can list the join tokens for an account. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenList`: HostactivationListJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenList(context.Background()).Filter(filter).OrderBy(orderBy).Offset(offset).Limit(limit).PageToken(pageToken).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenList`: HostactivationListJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenList`: %v\n", resp) } ``` @@ -297,25 +297,25 @@ User can get the join token providing its resource id in the parameter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenRead`: HostactivationReadJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenRead`: HostactivationReadJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenRead`: %v\n", resp) } ``` @@ -369,25 +369,25 @@ User can modify the tags or expiration time of a join token. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UIJoinTokenUpdate`: HostactivationUpdateJoinTokenResponse - fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewHostactivationJoinToken("Name_example") // HostactivationJoinToken | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UIJoinTokenAPI.UIJoinTokenUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UIJoinTokenAPI.UIJoinTokenUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UIJoinTokenUpdate`: HostactivationUpdateJoinTokenResponse + fmt.Fprintf(os.Stdout, "Response from `UIJoinTokenAPI.UIJoinTokenUpdate`: %v\n", resp) } ``` diff --git a/infra_provision/model_hostactivation_join_token.go b/infra_provision/model_hostactivation_join_token.go index d4ff235..af3343a 100644 --- a/infra_provision/model_hostactivation_join_token.go +++ b/infra_provision/model_hostactivation_join_token.go @@ -11,7 +11,9 @@ API version: v1 package infra_provision import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -34,6 +36,8 @@ 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 @@ -409,6 +413,43 @@ func (o HostactivationJoinToken) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *HostactivationJoinToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHostactivationJoinToken := _HostactivationJoinToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHostactivationJoinToken) + + if err != nil { + return err + } + + *o = HostactivationJoinToken(varHostactivationJoinToken) + + return err +} + type NullableHostactivationJoinToken struct { value *HostactivationJoinToken isSet bool diff --git a/infra_provision/utils.go b/infra_provision/utils.go index 07e76f3..eeec3ff 100644 --- a/infra_provision/utils.go +++ b/infra_provision/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/ipam/.openapi-generator/VERSION b/ipam/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/ipam/.openapi-generator/VERSION +++ b/ipam/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/ipam/README.md b/ipam/README.md index 1bc0c10..562ac4c 100644 --- a/ipam/README.md +++ b/ipam/README.md @@ -13,20 +13,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import ipam "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -36,17 +36,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `ipam.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), ipam.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `ipam.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), ipam.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -58,9 +58,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `ipam.ContextOperationServerIndices` and `ipam.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), ipam.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -359,11 +359,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + ipam.ContextAPIKeys, + map[string]ipam.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/ipam/docs/AddressAPI.md b/ipam/docs/AddressAPI.md index a9fabca..2506a67 100644 --- a/ipam/docs/AddressAPI.md +++ b/ipam/docs/AddressAPI.md @@ -26,24 +26,24 @@ Create the IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressCreate`: IpamsvcCreateAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressCreate`: IpamsvcCreateAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the IP address to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AddressAPI.AddressDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AddressAPI.AddressDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,33 +160,33 @@ Retrieve IP addresses. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - scope := "scope_example" // string | (optional) - addressState := "addressState_example" // string | (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).Scope(scope).AddressState(addressState).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressList`: IpamsvcListAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + scope := "scope_example" // string | (optional) + addressState := "addressState_example" // string | (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).Scope(scope).AddressState(addressState).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressList`: IpamsvcListAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressList`: %v\n", resp) } ``` @@ -244,25 +244,25 @@ Retrieve the IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressRead`: IpamsvcReadAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressRead`: IpamsvcReadAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressRead`: %v\n", resp) } ``` @@ -316,25 +316,25 @@ Update the IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressAPI.AddressUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressUpdate`: IpamsvcUpdateAddressResponse - fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcAddress("Address_example") // IpamsvcAddress | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressAPI.AddressUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressAPI.AddressUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressUpdate`: IpamsvcUpdateAddressResponse + fmt.Fprintf(os.Stdout, "Response from `AddressAPI.AddressUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/AddressBlockAPI.md b/ipam/docs/AddressBlockAPI.md index 1eae92e..38ca0e4 100644 --- a/ipam/docs/AddressBlockAPI.md +++ b/ipam/docs/AddressBlockAPI.md @@ -33,25 +33,25 @@ Copy the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcCopyAddressBlock("Space_example") // IpamsvcCopyAddressBlock | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCopy`: IpamsvcCopyAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCopy`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcCopyAddressBlock("Space_example") // IpamsvcCopyAddressBlock | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCopy(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCopy`: IpamsvcCopyAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCopy`: %v\n", resp) } ``` @@ -105,25 +105,25 @@ Create the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreate`: IpamsvcCreateAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreate`: IpamsvcCreateAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreate`: %v\n", resp) } ``` @@ -173,28 +173,28 @@ Create the Next Available Address Block object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of address blocks to be created. - count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) (default to 1) - name := "name_example" // string | Name of next available address blocks. (optional) - comment := "comment_example" // string | Comment of next available address blocks. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableAB``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreateNextAvailableAB`: IpamsvcCreateNextAvailableABResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableAB`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of address blocks to be created. + count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) (default to 1) + name := "name_example" // string | Name of next available address blocks. (optional) + comment := "comment_example" // string | Comment of next available address blocks. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableAB``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreateNextAvailableAB`: IpamsvcCreateNextAvailableABResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableAB`: %v\n", resp) } ``` @@ -251,26 +251,26 @@ Allocate the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableIP`: %v\n", resp) } ``` @@ -325,29 +325,29 @@ Create the Next Available Subnet object. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of subnets to be created. - count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) (default to 1) - name := "name_example" // string | Name of next available subnets. (optional) - comment := "comment_example" // string | Comment of next available subnets. (optional) - dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockCreateNextAvailableSubnet`: IpamsvcCreateNextAvailableSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of subnets to be created. + count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) (default to 1) + name := "name_example" // string | Name of next available subnets. (optional) + comment := "comment_example" // string | Comment of next available subnets. (optional) + dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockCreateNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockCreateNextAvailableSubnet`: IpamsvcCreateNextAvailableSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockCreateNextAvailableSubnet`: %v\n", resp) } ``` @@ -405,22 +405,22 @@ Move the address block to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AddressBlockAPI.AddressBlockDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -473,32 +473,32 @@ Retrieve the address blocks. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockList`: IpamsvcListAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockList`: IpamsvcListAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockList`: %v\n", resp) } ``` @@ -555,28 +555,28 @@ List Next Available Address Block objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of address blocks to be created. (optional) - count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) - name := "name_example" // string | Name of next available address blocks. (optional) - comment := "comment_example" // string | Comment of next available address blocks. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableAB``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockListNextAvailableAB`: IpamsvcNextAvailableABResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableAB`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of address blocks to be created. (optional) + count := int32(56) // int32 | Number of address blocks to generate. Default 1 if not set. (optional) + name := "name_example" // string | Name of next available address blocks. (optional) + comment := "comment_example" // string | Comment of next available address blocks. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableAB(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableAB``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockListNextAvailableAB`: IpamsvcNextAvailableABResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableAB`: %v\n", resp) } ``` @@ -633,26 +633,26 @@ Retrieve the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockListNextAvailableIP`: IpamsvcNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockListNextAvailableIP`: IpamsvcNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableIP`: %v\n", resp) } ``` @@ -707,29 +707,29 @@ List Next Available Subnet objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - cidr := int32(56) // int32 | The cidr value of subnets to be created. (optional) - count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) - name := "name_example" // string | Name of next available subnets. (optional) - comment := "comment_example" // string | Comment of next available subnets. (optional) - dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableSubnet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockListNextAvailableSubnet`: IpamsvcNextAvailableSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableSubnet`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + cidr := int32(56) // int32 | The cidr value of subnets to be created. (optional) + count := int32(56) // int32 | Number of subnets to generate. Default 1 if not set. (optional) + name := "name_example" // string | Name of next available subnets. (optional) + comment := "comment_example" // string | Comment of next available subnets. (optional) + dhcpHost := "dhcpHost_example" // string | Reference of OnPrem Host associated with the next available subnets to be created. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockListNextAvailableSubnet(context.Background(), id).Cidr(cidr).Count(count).Name(name).Comment(comment).DhcpHost(dhcpHost).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockListNextAvailableSubnet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockListNextAvailableSubnet`: IpamsvcNextAvailableSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockListNextAvailableSubnet`: %v\n", resp) } ``` @@ -787,26 +787,26 @@ Retrieve the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockRead`: IpamsvcReadAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockRead`: IpamsvcReadAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockRead`: %v\n", resp) } ``` @@ -861,26 +861,26 @@ Update the address block. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddressBlockUpdate`: IpamsvcUpdateAddressBlockResponse - fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcAddressBlock() // IpamsvcAddressBlock | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AddressBlockAPI.AddressBlockUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AddressBlockAPI.AddressBlockUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddressBlockUpdate`: IpamsvcUpdateAddressBlockResponse + fmt.Fprintf(os.Stdout, "Response from `AddressBlockAPI.AddressBlockUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/AsmAPI.md b/ipam/docs/AsmAPI.md index 4b7038b..f1e9836 100644 --- a/ipam/docs/AsmAPI.md +++ b/ipam/docs/AsmAPI.md @@ -24,24 +24,24 @@ Update subnet and ranges for Automated Scope Management. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcASM("SubnetId_example") // IpamsvcASM | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AsmCreate`: IpamsvcCreateASMResponse - fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcASM("SubnetId_example") // IpamsvcASM | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AsmAPI.AsmCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AsmCreate`: IpamsvcCreateASMResponse + fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmCreate`: %v\n", resp) } ``` @@ -90,25 +90,25 @@ Retrieve suggested updates for Automated Scope Management. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - subnetId := "subnetId_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AsmAPI.AsmList(context.Background()).Fields(fields).SubnetId(subnetId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AsmList`: IpamsvcListASMResponse - fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + subnetId := "subnetId_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AsmAPI.AsmList(context.Background()).Fields(fields).SubnetId(subnetId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AsmList`: IpamsvcListASMResponse + fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmList`: %v\n", resp) } ``` @@ -158,25 +158,25 @@ Retrieve the suggested update for Automated Scope Management. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AsmAPI.AsmRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AsmRead`: IpamsvcReadASMResponse - fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AsmAPI.AsmRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AsmAPI.AsmRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AsmRead`: IpamsvcReadASMResponse + fmt.Fprintf(os.Stdout, "Response from `AsmAPI.AsmRead`: %v\n", resp) } ``` diff --git a/ipam/docs/DhcpHostAPI.md b/ipam/docs/DhcpHostAPI.md index cae4a34..e964fd1 100644 --- a/ipam/docs/DhcpHostAPI.md +++ b/ipam/docs/DhcpHostAPI.md @@ -25,31 +25,31 @@ Retrieve DHCP hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostList`: IpamsvcListHostResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostList`: IpamsvcListHostResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostList`: %v\n", resp) } ``` @@ -105,24 +105,24 @@ Retrieve DHCP host associations. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostListAssociations``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostListAssociations`: IpamsvcHostAssociationsResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostListAssociations`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostListAssociations(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostListAssociations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostListAssociations`: IpamsvcHostAssociationsResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostListAssociations`: %v\n", resp) } ``` @@ -175,25 +175,25 @@ Retrieve the DHCP host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostRead`: IpamsvcReadHostResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostRead`: IpamsvcReadHostResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostRead`: %v\n", resp) } ``` @@ -247,25 +247,25 @@ Update the DHCP hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcHost() // IpamsvcHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DhcpHostUpdate`: IpamsvcUpdateHostResponse - fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcHost() // IpamsvcHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DhcpHostAPI.DhcpHostUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DhcpHostAPI.DhcpHostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DhcpHostUpdate`: IpamsvcUpdateHostResponse + fmt.Fprintf(os.Stdout, "Response from `DhcpHostAPI.DhcpHostUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/DnsUsageAPI.md b/ipam/docs/DnsUsageAPI.md index 8e67567..6ddfc39 100644 --- a/ipam/docs/DnsUsageAPI.md +++ b/ipam/docs/DnsUsageAPI.md @@ -23,29 +23,29 @@ Retrieve DNS usage for multiple objects. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DnsUsageAPI.DnsUsageList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DnsUsageList`: IpamsvcListDNSUsageResponse - fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DnsUsageAPI.DnsUsageList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsUsageList`: IpamsvcListDNSUsageResponse + fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageList`: %v\n", resp) } ``` @@ -99,25 +99,25 @@ Retrieve the DNS usage. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DnsUsageAPI.DnsUsageRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DnsUsageRead`: IpamsvcReadDNSUsageResponse - fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DnsUsageAPI.DnsUsageRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DnsUsageAPI.DnsUsageRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsUsageRead`: IpamsvcReadDNSUsageResponse + fmt.Fprintf(os.Stdout, "Response from `DnsUsageAPI.DnsUsageRead`: %v\n", resp) } ``` diff --git a/ipam/docs/FilterAPI.md b/ipam/docs/FilterAPI.md index e359bba..5df7545 100644 --- a/ipam/docs/FilterAPI.md +++ b/ipam/docs/FilterAPI.md @@ -22,31 +22,31 @@ Retrieve DHCP filters. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FilterAPI.FilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FilterAPI.FilterList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FilterList`: IpamsvcListFilterResponse - fmt.Fprintf(os.Stdout, "Response from `FilterAPI.FilterList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FilterAPI.FilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FilterAPI.FilterList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FilterList`: IpamsvcListFilterResponse + fmt.Fprintf(os.Stdout, "Response from `FilterAPI.FilterList`: %v\n", resp) } ``` diff --git a/ipam/docs/FixedAddressAPI.md b/ipam/docs/FixedAddressAPI.md index f69e942..f86f1e6 100644 --- a/ipam/docs/FixedAddressAPI.md +++ b/ipam/docs/FixedAddressAPI.md @@ -26,25 +26,25 @@ Create the fixed address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressCreate`: IpamsvcCreateFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressCreate`: IpamsvcCreateFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the fixed address to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.FixedAddressAPI.FixedAddressDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ Retrieve fixed addresses. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressList`: IpamsvcListFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressList`: IpamsvcListFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Retrieve the fixed address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressRead`: IpamsvcReadFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressRead`: IpamsvcReadFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the fixed address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FixedAddressUpdate`: IpamsvcUpdateFixedAddressResponse - fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcFixedAddress("Address_example", "MatchType_example", "MatchValue_example") // IpamsvcFixedAddress | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FixedAddressAPI.FixedAddressUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FixedAddressAPI.FixedAddressUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FixedAddressUpdate`: IpamsvcUpdateFixedAddressResponse + fmt.Fprintf(os.Stdout, "Response from `FixedAddressAPI.FixedAddressUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/GlobalAPI.md b/ipam/docs/GlobalAPI.md index 167ba40..bd93827 100644 --- a/ipam/docs/GlobalAPI.md +++ b/ipam/docs/GlobalAPI.md @@ -25,24 +25,24 @@ Retrieve the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead`: IpamsvcReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead`: IpamsvcReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead`: %v\n", resp) } ``` @@ -91,25 +91,25 @@ Retrieve the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalRead2`: IpamsvcReadGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalRead2(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalRead2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalRead2`: IpamsvcReadGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalRead2`: %v\n", resp) } ``` @@ -163,24 +163,24 @@ Update the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate`: IpamsvcUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) + body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate`: IpamsvcUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate`: %v\n", resp) } ``` @@ -229,25 +229,25 @@ Update the global configuration. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GlobalUpdate2`: IpamsvcUpdateGlobalResponse - fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcGlobal() // IpamsvcGlobal | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GlobalAPI.GlobalUpdate2(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalAPI.GlobalUpdate2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalUpdate2`: IpamsvcUpdateGlobalResponse + fmt.Fprintf(os.Stdout, "Response from `GlobalAPI.GlobalUpdate2`: %v\n", resp) } ``` diff --git a/ipam/docs/HaGroupAPI.md b/ipam/docs/HaGroupAPI.md index b2f9159..e3a67f6 100644 --- a/ipam/docs/HaGroupAPI.md +++ b/ipam/docs/HaGroupAPI.md @@ -26,24 +26,24 @@ Create the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupCreate`: IpamsvcCreateHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupCreate`: IpamsvcCreateHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.HaGroupAPI.HaGroupDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,32 +160,32 @@ Retrieve HA groups. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).CollectStats(collectStats).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupList`: IpamsvcListHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).CollectStats(collectStats).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupList`: IpamsvcListHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupList`: %v\n", resp) } ``` @@ -242,26 +242,26 @@ Retrieve the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), id).Fields(fields).CollectStats(collectStats).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupRead`: IpamsvcReadHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + collectStats := true // bool | collect_stats gets the HA group stats(state, status, heartbeat) if set to _true_ in the _GET_ _/dhcp/ha_group_ request. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupRead(context.Background(), id).Fields(fields).CollectStats(collectStats).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupRead`: IpamsvcReadHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupRead`: %v\n", resp) } ``` @@ -316,25 +316,25 @@ Update the HA group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HaGroupUpdate`: IpamsvcUpdateHAGroupResponse - fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcHAGroup([]openapiclient.IpamsvcHAGroupHost{*openapiclient.NewIpamsvcHAGroupHost("Host_example")}, "Name_example") // IpamsvcHAGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HaGroupAPI.HaGroupUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HaGroupAPI.HaGroupUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HaGroupUpdate`: IpamsvcUpdateHAGroupResponse + fmt.Fprintf(os.Stdout, "Response from `HaGroupAPI.HaGroupUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/HardwareFilterAPI.md b/ipam/docs/HardwareFilterAPI.md index d5e2f5d..c9a7d6d 100644 --- a/ipam/docs/HardwareFilterAPI.md +++ b/ipam/docs/HardwareFilterAPI.md @@ -26,24 +26,24 @@ Create the hardware filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterCreate`: IpamsvcCreateHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterCreate`: IpamsvcCreateHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the hardware filter to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.HardwareFilterAPI.HardwareFilterDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve hardware filters. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterList`: IpamsvcListHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterList`: IpamsvcListHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the hardware filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterRead`: IpamsvcReadHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterRead`: IpamsvcReadHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the hardware filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HardwareFilterUpdate`: IpamsvcUpdateHardwareFilterResponse - fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcHardwareFilter("Name_example") // IpamsvcHardwareFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HardwareFilterAPI.HardwareFilterUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HardwareFilterAPI.HardwareFilterUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HardwareFilterUpdate`: IpamsvcUpdateHardwareFilterResponse + fmt.Fprintf(os.Stdout, "Response from `HardwareFilterAPI.HardwareFilterUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/IpSpaceAPI.md b/ipam/docs/IpSpaceAPI.md index 4c0a896..cd5e988 100644 --- a/ipam/docs/IpSpaceAPI.md +++ b/ipam/docs/IpSpaceAPI.md @@ -28,24 +28,24 @@ Copy the specified address block and subnets in the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcBulkCopyIPSpace([]string{"CopyObjects_example"}, "Target_example") // IpamsvcBulkCopyIPSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceBulkCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceBulkCopy`: IpamsvcBulkCopyIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceBulkCopy`: %v\n", resp) + body := *openapiclient.NewIpamsvcBulkCopyIPSpace([]string{"CopyObjects_example"}, "Target_example") // IpamsvcBulkCopyIPSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceBulkCopy(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceBulkCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceBulkCopy`: IpamsvcBulkCopyIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceBulkCopy`: %v\n", resp) } ``` @@ -94,25 +94,25 @@ Copy the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcCopyIPSpace("Name_example") // IpamsvcCopyIPSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceCopy`: IpamsvcCopyIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCopy`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcCopyIPSpace("Name_example") // IpamsvcCopyIPSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceCopy(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceCopy`: IpamsvcCopyIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCopy`: %v\n", resp) } ``` @@ -166,25 +166,25 @@ Create the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceCreate`: IpamsvcCreateIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceCreate`: IpamsvcCreateIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceCreate`: %v\n", resp) } ``` @@ -234,22 +234,22 @@ Move the IP space to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.IpSpaceAPI.IpSpaceDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -302,32 +302,32 @@ Retrieve IP spaces. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceList`: IpamsvcListIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceList`: IpamsvcListIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceList`: %v\n", resp) } ``` @@ -384,26 +384,26 @@ Retrieve the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceRead`: IpamsvcReadIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceRead`: IpamsvcReadIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceRead`: %v\n", resp) } ``` @@ -458,26 +458,26 @@ Update the IP space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpSpaceUpdate`: IpamsvcUpdateIPSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcIPSpace("Name_example") // IpamsvcIPSpace | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpSpaceAPI.IpSpaceUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpSpaceAPI.IpSpaceUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpSpaceUpdate`: IpamsvcUpdateIPSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `IpSpaceAPI.IpSpaceUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/IpamHostAPI.md b/ipam/docs/IpamHostAPI.md index ff8d66f..1b08803 100644 --- a/ipam/docs/IpamHostAPI.md +++ b/ipam/docs/IpamHostAPI.md @@ -26,24 +26,24 @@ Create the IPAM host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostCreate`: IpamsvcCreateIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostCreate`: IpamsvcCreateIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the IPAM host to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.IpamHostAPI.IpamHostDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve the IPAM hosts. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostList(context.Background()).Fields(fields).OrderBy(orderBy).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostList`: IpamsvcListIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostList(context.Background()).Fields(fields).OrderBy(orderBy).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostList`: IpamsvcListIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostList`: %v\n", resp) } ``` @@ -240,26 +240,26 @@ Retrieve the IPAM host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), id).OrderBy(orderBy).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostRead`: IpamsvcReadIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostRead(context.Background(), id).OrderBy(orderBy).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostRead`: IpamsvcReadIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostRead`: %v\n", resp) } ``` @@ -314,25 +314,25 @@ Update the IPAM host. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IpamHostUpdate`: IpamsvcUpdateIpamHostResponse - fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcIpamHost("Name_example") // IpamsvcIpamHost | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IpamHostAPI.IpamHostUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IpamHostAPI.IpamHostUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `IpamHostUpdate`: IpamsvcUpdateIpamHostResponse + fmt.Fprintf(os.Stdout, "Response from `IpamHostAPI.IpamHostUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/LeasesCommandAPI.md b/ipam/docs/LeasesCommandAPI.md index 2f88304..bfff583 100644 --- a/ipam/docs/LeasesCommandAPI.md +++ b/ipam/docs/LeasesCommandAPI.md @@ -22,24 +22,24 @@ Perform actions like clearing DHCP lease(s). package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcLeasesCommand("Command_example") // IpamsvcLeasesCommand | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LeasesCommandAPI.LeasesCommandCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LeasesCommandCreate`: IpamsvcCreateLeasesCommandResponse - fmt.Fprintf(os.Stdout, "Response from `LeasesCommandAPI.LeasesCommandCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcLeasesCommand("Command_example") // IpamsvcLeasesCommand | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LeasesCommandAPI.LeasesCommandCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LeasesCommandAPI.LeasesCommandCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LeasesCommandCreate`: IpamsvcCreateLeasesCommandResponse + fmt.Fprintf(os.Stdout, "Response from `LeasesCommandAPI.LeasesCommandCreate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionCodeAPI.md b/ipam/docs/OptionCodeAPI.md index f481072..81660a8 100644 --- a/ipam/docs/OptionCodeAPI.md +++ b/ipam/docs/OptionCodeAPI.md @@ -26,24 +26,24 @@ Create the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeCreate`: IpamsvcCreateOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeCreate`: IpamsvcCreateOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionCodeAPI.OptionCodeDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,29 +160,29 @@ Retrieve DHCP option codes. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeList`: IpamsvcListOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeList`: IpamsvcListOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeList`: %v\n", resp) } ``` @@ -236,25 +236,25 @@ Retrieve the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeRead`: IpamsvcReadOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeRead`: IpamsvcReadOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeRead`: %v\n", resp) } ``` @@ -308,25 +308,25 @@ Update the DHCP option code. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionCodeUpdate`: IpamsvcUpdateOptionCodeResponse - fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionCode(int64(123), "Name_example", "OptionSpace_example", "Type_example") // IpamsvcOptionCode | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionCodeAPI.OptionCodeUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionCodeAPI.OptionCodeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionCodeUpdate`: IpamsvcUpdateOptionCodeResponse + fmt.Fprintf(os.Stdout, "Response from `OptionCodeAPI.OptionCodeUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionFilterAPI.md b/ipam/docs/OptionFilterAPI.md index f1d27e9..49e0c41 100644 --- a/ipam/docs/OptionFilterAPI.md +++ b/ipam/docs/OptionFilterAPI.md @@ -26,24 +26,24 @@ Create the DHCP option filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterCreate`: IpamsvcCreateOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterCreate`: IpamsvcCreateOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the DHCP option filter to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionFilterAPI.OptionFilterDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve DHCP option filters. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterList`: IpamsvcListOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterList`: IpamsvcListOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the DHCP option filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterRead`: IpamsvcReadOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterRead`: IpamsvcReadOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the DHCP option filter. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionFilterUpdate`: IpamsvcUpdateOptionFilterResponse - fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionFilter("Name_example", *openapiclient.NewIpamsvcOptionFilterRuleList()) // IpamsvcOptionFilter | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionFilterAPI.OptionFilterUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionFilterAPI.OptionFilterUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionFilterUpdate`: IpamsvcUpdateOptionFilterResponse + fmt.Fprintf(os.Stdout, "Response from `OptionFilterAPI.OptionFilterUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionGroupAPI.md b/ipam/docs/OptionGroupAPI.md index 7775e7d..9501fa3 100644 --- a/ipam/docs/OptionGroupAPI.md +++ b/ipam/docs/OptionGroupAPI.md @@ -26,24 +26,24 @@ Create the DHCP option group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupCreate`: IpamsvcCreateOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupCreate`: IpamsvcCreateOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the DHCP option group to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionGroupAPI.OptionGroupDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve DHCP option groups. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupList`: IpamsvcListOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupList`: IpamsvcListOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the DHCP option group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupRead`: IpamsvcReadOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupRead`: IpamsvcReadOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the DHCP option group. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionGroupUpdate`: IpamsvcUpdateOptionGroupResponse - fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionGroup("Name_example") // IpamsvcOptionGroup | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionGroupAPI.OptionGroupUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionGroupAPI.OptionGroupUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionGroupUpdate`: IpamsvcUpdateOptionGroupResponse + fmt.Fprintf(os.Stdout, "Response from `OptionGroupAPI.OptionGroupUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/OptionSpaceAPI.md b/ipam/docs/OptionSpaceAPI.md index eebcd90..93f5f44 100644 --- a/ipam/docs/OptionSpaceAPI.md +++ b/ipam/docs/OptionSpaceAPI.md @@ -26,24 +26,24 @@ Create the DHCP option space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceCreate`: IpamsvcCreateOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceCreate`: IpamsvcCreateOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Move the DHCP option space to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OptionSpaceAPI.OptionSpaceDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve DHCP option spaces. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceList`: IpamsvcListOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceList`: IpamsvcListOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the DHCP option space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceRead`: IpamsvcReadOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceRead`: IpamsvcReadOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the DHCP option space. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OptionSpaceUpdate`: IpamsvcUpdateOptionSpaceResponse - fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcOptionSpace("Name_example") // IpamsvcOptionSpace | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OptionSpaceAPI.OptionSpaceUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OptionSpaceAPI.OptionSpaceUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OptionSpaceUpdate`: IpamsvcUpdateOptionSpaceResponse + fmt.Fprintf(os.Stdout, "Response from `OptionSpaceAPI.OptionSpaceUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/RangeAPI.md b/ipam/docs/RangeAPI.md index 087beb9..6f7159d 100644 --- a/ipam/docs/RangeAPI.md +++ b/ipam/docs/RangeAPI.md @@ -28,25 +28,25 @@ Create the range. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeCreate`: IpamsvcCreateRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeCreate`: IpamsvcCreateRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreate`: %v\n", resp) } ``` @@ -96,26 +96,26 @@ Allocate the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreateNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreateNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeCreateNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeCreateNextAvailableIP`: %v\n", resp) } ``` @@ -170,22 +170,22 @@ Move the range to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.RangeAPI.RangeDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RangeAPI.RangeDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -238,32 +238,32 @@ Retrieve ranges. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeList`: IpamsvcListRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeList`: IpamsvcListRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeList`: %v\n", resp) } ``` @@ -320,26 +320,26 @@ Retrieve the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeListNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeListNextAvailableIP`: IpamsvcNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeListNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeListNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeListNextAvailableIP`: IpamsvcNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeListNextAvailableIP`: %v\n", resp) } ``` @@ -394,26 +394,26 @@ Retrieve the range. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeRead`: IpamsvcReadRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeRead`: IpamsvcReadRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeRead`: %v\n", resp) } ``` @@ -468,26 +468,26 @@ Update the range. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RangeUpdate`: IpamsvcUpdateRangeResponse - fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcRange("End_example", "Start_example") // IpamsvcRange | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RangeAPI.RangeUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RangeAPI.RangeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RangeUpdate`: IpamsvcUpdateRangeResponse + fmt.Fprintf(os.Stdout, "Response from `RangeAPI.RangeUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/ServerAPI.md b/ipam/docs/ServerAPI.md index ffb3780..2575063 100644 --- a/ipam/docs/ServerAPI.md +++ b/ipam/docs/ServerAPI.md @@ -26,25 +26,25 @@ Create the DHCP configuration profile. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerCreate`: IpamsvcCreateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerCreate`: IpamsvcCreateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerCreate`: %v\n", resp) } ``` @@ -94,22 +94,22 @@ Move the DHCP configuration profile to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ServerAPI.ServerDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -162,32 +162,32 @@ Retrieve DHCP configuration profiles. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerList`: IpamsvcListServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerList(context.Background()).Filter(filter).OrderBy(orderBy).Fields(fields).Offset(offset).Limit(limit).PageToken(pageToken).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerList`: IpamsvcListServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerList`: %v\n", resp) } ``` @@ -244,26 +244,26 @@ Retrieve the DHCP configuration profile. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerRead`: IpamsvcReadServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerRead`: IpamsvcReadServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerRead`: %v\n", resp) } ``` @@ -318,26 +318,26 @@ Update the DHCP configuration profile. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ServerUpdate`: IpamsvcUpdateServerResponse - fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcServer("Name_example") // IpamsvcServer | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ServerAPI.ServerUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ServerAPI.ServerUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ServerUpdate`: IpamsvcUpdateServerResponse + fmt.Fprintf(os.Stdout, "Response from `ServerAPI.ServerUpdate`: %v\n", resp) } ``` diff --git a/ipam/docs/SubnetAPI.md b/ipam/docs/SubnetAPI.md index fa6ad18..c4aab76 100644 --- a/ipam/docs/SubnetAPI.md +++ b/ipam/docs/SubnetAPI.md @@ -29,25 +29,25 @@ Copy the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcCopySubnet("Space_example") // IpamsvcCopySubnet | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCopy``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetCopy`: IpamsvcCopySubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCopy`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcCopySubnet("Space_example") // IpamsvcCopySubnet | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetCopy(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetCopy`: IpamsvcCopySubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCopy`: %v\n", resp) } ``` @@ -101,25 +101,25 @@ Create the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetCreate`: IpamsvcCreateSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreate`: %v\n", resp) + body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetCreate(context.Background()).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetCreate`: IpamsvcCreateSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreate`: %v\n", resp) } ``` @@ -169,26 +169,26 @@ Allocate the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreateNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreateNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) (default to false) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetCreateNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetCreateNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetCreateNextAvailableIP`: IpamsvcCreateNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetCreateNextAvailableIP`: %v\n", resp) } ``` @@ -243,22 +243,22 @@ Move the subnet to the recycle bin. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SubnetAPI.SubnetDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -311,32 +311,32 @@ Retrieve subnets. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetList`: IpamsvcListSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).TorderBy(torderBy).Tfilter(tfilter).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetList`: IpamsvcListSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetList`: %v\n", resp) } ``` @@ -393,26 +393,26 @@ Retrieve the next available IP address. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) - count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetListNextAvailableIP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetListNextAvailableIP`: IpamsvcNextAvailableIPResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetListNextAvailableIP`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + contiguous := true // bool | Indicates whether the IP addresses should belong to a contiguous block. Defaults to _false_. (optional) + count := int32(56) // int32 | The number of IP addresses requested. Defaults to 1. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetListNextAvailableIP(context.Background(), id).Contiguous(contiguous).Count(count).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetListNextAvailableIP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetListNextAvailableIP`: IpamsvcNextAvailableIPResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetListNextAvailableIP`: %v\n", resp) } ``` @@ -467,26 +467,26 @@ Retrieve the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetRead`: IpamsvcReadSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetRead(context.Background(), id).Fields(fields).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetRead`: IpamsvcReadSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetRead`: %v\n", resp) } ``` @@ -541,26 +541,26 @@ Update the subnet. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | - inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SubnetUpdate`: IpamsvcUpdateSubnetResponse - fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewIpamsvcSubnet() // IpamsvcSubnet | + inherit := "inherit_example" // string | This parameter is used for getting inheritance_sources. Allowed values: * _none_, * _partial_, * _full_. Defaults to _none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SubnetAPI.SubnetUpdate(context.Background(), id).Body(body).Inherit(inherit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SubnetAPI.SubnetUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SubnetUpdate`: IpamsvcUpdateSubnetResponse + fmt.Fprintf(os.Stdout, "Response from `SubnetAPI.SubnetUpdate`: %v\n", resp) } ``` diff --git a/ipam/model_ipamsvc_access_filter.go b/ipam/model_ipamsvc_access_filter.go index d185ec6..b4ee156 100644 --- a/ipam/model_ipamsvc_access_filter.go +++ b/ipam/model_ipamsvc_access_filter.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcAccessFilter type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcAccessFilter struct { OptionFilterId *string `json:"option_filter_id,omitempty"` } +type _IpamsvcAccessFilter IpamsvcAccessFilter + // NewIpamsvcAccessFilter instantiates a new IpamsvcAccessFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -153,6 +157,43 @@ func (o IpamsvcAccessFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcAccessFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcAccessFilter := _IpamsvcAccessFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcAccessFilter) + + if err != nil { + return err + } + + *o = IpamsvcAccessFilter(varIpamsvcAccessFilter) + + return err +} + type NullableIpamsvcAccessFilter struct { value *IpamsvcAccessFilter isSet bool diff --git a/ipam/model_ipamsvc_address.go b/ipam/model_ipamsvc_address.go index 83c73e1..2f36ad4 100644 --- a/ipam/model_ipamsvc_address.go +++ b/ipam/model_ipamsvc_address.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -61,6 +63,8 @@ type IpamsvcAddress struct { Usage []string `json:"usage,omitempty"` } +type _IpamsvcAddress IpamsvcAddress + // NewIpamsvcAddress instantiates a new IpamsvcAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -782,6 +786,43 @@ func (o IpamsvcAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcAddress) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcAddress := _IpamsvcAddress{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcAddress) + + if err != nil { + return err + } + + *o = IpamsvcAddress(varIpamsvcAddress) + + return err +} + type NullableIpamsvcAddress struct { value *IpamsvcAddress isSet bool diff --git a/ipam/model_ipamsvc_asm.go b/ipam/model_ipamsvc_asm.go index 252a668..87059fb 100644 --- a/ipam/model_ipamsvc_asm.go +++ b/ipam/model_ipamsvc_asm.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcASM type satisfies the MappedNullable interface at compile time @@ -69,6 +71,8 @@ type IpamsvcASM struct { Utilization *int64 `json:"utilization,omitempty"` } +type _IpamsvcASM IpamsvcASM + // NewIpamsvcASM instantiates a new IpamsvcASM object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -930,6 +934,43 @@ func (o IpamsvcASM) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcASM) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "subnet_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcASM := _IpamsvcASM{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcASM) + + if err != nil { + return err + } + + *o = IpamsvcASM(varIpamsvcASM) + + return err +} + type NullableIpamsvcASM struct { value *IpamsvcASM isSet bool diff --git a/ipam/model_ipamsvc_bulk_copy_ip_space.go b/ipam/model_ipamsvc_bulk_copy_ip_space.go index bf4a0ea..2de44a6 100644 --- a/ipam/model_ipamsvc_bulk_copy_ip_space.go +++ b/ipam/model_ipamsvc_bulk_copy_ip_space.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcBulkCopyIPSpace type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type IpamsvcBulkCopyIPSpace struct { Target string `json:"target"` } +type _IpamsvcBulkCopyIPSpace IpamsvcBulkCopyIPSpace + // NewIpamsvcBulkCopyIPSpace instantiates a new IpamsvcBulkCopyIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -218,6 +222,44 @@ func (o IpamsvcBulkCopyIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcBulkCopyIPSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "copy_objects", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcBulkCopyIPSpace := _IpamsvcBulkCopyIPSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcBulkCopyIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcBulkCopyIPSpace(varIpamsvcBulkCopyIPSpace) + + return err +} + type NullableIpamsvcBulkCopyIPSpace struct { value *IpamsvcBulkCopyIPSpace isSet bool diff --git a/ipam/model_ipamsvc_copy_address_block.go b/ipam/model_ipamsvc_copy_address_block.go index ac70f2d..4158e0b 100644 --- a/ipam/model_ipamsvc_copy_address_block.go +++ b/ipam/model_ipamsvc_copy_address_block.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcCopyAddressBlock type satisfies the MappedNullable interface at compile time @@ -35,6 +37,8 @@ type IpamsvcCopyAddressBlock struct { Space string `json:"space"` } +type _IpamsvcCopyAddressBlock IpamsvcCopyAddressBlock + // NewIpamsvcCopyAddressBlock instantiates a new IpamsvcCopyAddressBlock object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -301,6 +305,43 @@ func (o IpamsvcCopyAddressBlock) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopyAddressBlock) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "space", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopyAddressBlock := _IpamsvcCopyAddressBlock{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcCopyAddressBlock) + + if err != nil { + return err + } + + *o = IpamsvcCopyAddressBlock(varIpamsvcCopyAddressBlock) + + return err +} + type NullableIpamsvcCopyAddressBlock struct { value *IpamsvcCopyAddressBlock isSet bool diff --git a/ipam/model_ipamsvc_copy_ip_space.go b/ipam/model_ipamsvc_copy_ip_space.go index 7fe0e96..9c9035a 100644 --- a/ipam/model_ipamsvc_copy_ip_space.go +++ b/ipam/model_ipamsvc_copy_ip_space.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcCopyIPSpace type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type IpamsvcCopyIPSpace struct { SkipOnError *bool `json:"skip_on_error,omitempty"` } +type _IpamsvcCopyIPSpace IpamsvcCopyIPSpace + // NewIpamsvcCopyIPSpace instantiates a new IpamsvcCopyIPSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -227,6 +231,43 @@ func (o IpamsvcCopyIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopyIPSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopyIPSpace := _IpamsvcCopyIPSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcCopyIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcCopyIPSpace(varIpamsvcCopyIPSpace) + + return err +} + type NullableIpamsvcCopyIPSpace struct { value *IpamsvcCopyIPSpace isSet bool diff --git a/ipam/model_ipamsvc_copy_subnet.go b/ipam/model_ipamsvc_copy_subnet.go index 43c101b..6ae7241 100644 --- a/ipam/model_ipamsvc_copy_subnet.go +++ b/ipam/model_ipamsvc_copy_subnet.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcCopySubnet type satisfies the MappedNullable interface at compile time @@ -35,6 +37,8 @@ type IpamsvcCopySubnet struct { Space string `json:"space"` } +type _IpamsvcCopySubnet IpamsvcCopySubnet + // NewIpamsvcCopySubnet instantiates a new IpamsvcCopySubnet object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -301,6 +305,43 @@ func (o IpamsvcCopySubnet) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcCopySubnet) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "space", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcCopySubnet := _IpamsvcCopySubnet{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcCopySubnet) + + if err != nil { + return err + } + + *o = IpamsvcCopySubnet(varIpamsvcCopySubnet) + + return err +} + type NullableIpamsvcCopySubnet struct { value *IpamsvcCopySubnet isSet bool diff --git a/ipam/model_ipamsvc_ddns_zone.go b/ipam/model_ipamsvc_ddns_zone.go index c076f5d..689ce99 100644 --- a/ipam/model_ipamsvc_ddns_zone.go +++ b/ipam/model_ipamsvc_ddns_zone.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcDDNSZone type satisfies the MappedNullable interface at compile time @@ -36,6 +38,8 @@ type IpamsvcDDNSZone struct { Zone string `json:"zone"` } +type _IpamsvcDDNSZone IpamsvcDDNSZone + // NewIpamsvcDDNSZone instantiates a new IpamsvcDDNSZone object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -337,6 +341,43 @@ func (o IpamsvcDDNSZone) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcDDNSZone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcDDNSZone := _IpamsvcDDNSZone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcDDNSZone) + + if err != nil { + return err + } + + *o = IpamsvcDDNSZone(varIpamsvcDDNSZone) + + return err +} + type NullableIpamsvcDDNSZone struct { value *IpamsvcDDNSZone isSet bool diff --git a/ipam/model_ipamsvc_dhcp_utilization_threshold.go b/ipam/model_ipamsvc_dhcp_utilization_threshold.go index a897e08..c499478 100644 --- a/ipam/model_ipamsvc_dhcp_utilization_threshold.go +++ b/ipam/model_ipamsvc_dhcp_utilization_threshold.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcDHCPUtilizationThreshold type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcDHCPUtilizationThreshold struct { Low int64 `json:"low"` } +type _IpamsvcDHCPUtilizationThreshold IpamsvcDHCPUtilizationThreshold + // NewIpamsvcDHCPUtilizationThreshold instantiates a new IpamsvcDHCPUtilizationThreshold object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o IpamsvcDHCPUtilizationThreshold) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *IpamsvcDHCPUtilizationThreshold) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "high", + "low", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcDHCPUtilizationThreshold := _IpamsvcDHCPUtilizationThreshold{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcDHCPUtilizationThreshold) + + if err != nil { + return err + } + + *o = IpamsvcDHCPUtilizationThreshold(varIpamsvcDHCPUtilizationThreshold) + + return err +} + type NullableIpamsvcDHCPUtilizationThreshold struct { value *IpamsvcDHCPUtilizationThreshold isSet bool diff --git a/ipam/model_ipamsvc_exclusion_range.go b/ipam/model_ipamsvc_exclusion_range.go index 5f01e73..c042e18 100644 --- a/ipam/model_ipamsvc_exclusion_range.go +++ b/ipam/model_ipamsvc_exclusion_range.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcExclusionRange type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcExclusionRange struct { Start string `json:"start"` } +type _IpamsvcExclusionRange IpamsvcExclusionRange + // NewIpamsvcExclusionRange instantiates a new IpamsvcExclusionRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +148,44 @@ func (o IpamsvcExclusionRange) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcExclusionRange) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "end", + "start", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcExclusionRange := _IpamsvcExclusionRange{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcExclusionRange) + + if err != nil { + return err + } + + *o = IpamsvcExclusionRange(varIpamsvcExclusionRange) + + return err +} + type NullableIpamsvcExclusionRange struct { value *IpamsvcExclusionRange isSet bool diff --git a/ipam/model_ipamsvc_fixed_address.go b/ipam/model_ipamsvc_fixed_address.go index f03d532..6817587 100644 --- a/ipam/model_ipamsvc_fixed_address.go +++ b/ipam/model_ipamsvc_fixed_address.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -61,6 +63,8 @@ type IpamsvcFixedAddress struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcFixedAddress IpamsvcFixedAddress + // NewIpamsvcFixedAddress instantiates a new IpamsvcFixedAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -764,6 +768,45 @@ func (o IpamsvcFixedAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcFixedAddress) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "match_type", + "match_value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcFixedAddress := _IpamsvcFixedAddress{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcFixedAddress) + + if err != nil { + return err + } + + *o = IpamsvcFixedAddress(varIpamsvcFixedAddress) + + return err +} + type NullableIpamsvcFixedAddress struct { value *IpamsvcFixedAddress isSet bool diff --git a/ipam/model_ipamsvc_ha_group.go b/ipam/model_ipamsvc_ha_group.go index a6c11e5..852bb96 100644 --- a/ipam/model_ipamsvc_ha_group.go +++ b/ipam/model_ipamsvc_ha_group.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -44,6 +46,8 @@ type IpamsvcHAGroup struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcHAGroup IpamsvcHAGroup + // NewIpamsvcHAGroup instantiates a new IpamsvcHAGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -441,6 +445,44 @@ func (o IpamsvcHAGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHAGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "hosts", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHAGroup := _IpamsvcHAGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHAGroup) + + if err != nil { + return err + } + + *o = IpamsvcHAGroup(varIpamsvcHAGroup) + + return err +} + type NullableIpamsvcHAGroup struct { value *IpamsvcHAGroup isSet bool diff --git a/ipam/model_ipamsvc_ha_group_host.go b/ipam/model_ipamsvc_ha_group_host.go index 82d24a1..4c79efa 100644 --- a/ipam/model_ipamsvc_ha_group_host.go +++ b/ipam/model_ipamsvc_ha_group_host.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcHAGroupHost type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type IpamsvcHAGroupHost struct { State *string `json:"state,omitempty"` } +type _IpamsvcHAGroupHost IpamsvcHAGroupHost + // NewIpamsvcHAGroupHost instantiates a new IpamsvcHAGroupHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +268,43 @@ func (o IpamsvcHAGroupHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHAGroupHost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "host", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHAGroupHost := _IpamsvcHAGroupHost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHAGroupHost) + + if err != nil { + return err + } + + *o = IpamsvcHAGroupHost(varIpamsvcHAGroupHost) + + return err +} + type NullableIpamsvcHAGroupHost struct { value *IpamsvcHAGroupHost isSet bool diff --git a/ipam/model_ipamsvc_hardware_filter.go b/ipam/model_ipamsvc_hardware_filter.go index 357c0b9..c4a149e 100644 --- a/ipam/model_ipamsvc_hardware_filter.go +++ b/ipam/model_ipamsvc_hardware_filter.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -50,6 +52,8 @@ type IpamsvcHardwareFilter struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcHardwareFilter IpamsvcHardwareFilter + // NewIpamsvcHardwareFilter instantiates a new IpamsvcHardwareFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -561,6 +565,43 @@ func (o IpamsvcHardwareFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHardwareFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHardwareFilter := _IpamsvcHardwareFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHardwareFilter) + + if err != nil { + return err + } + + *o = IpamsvcHardwareFilter(varIpamsvcHardwareFilter) + + return err +} + type NullableIpamsvcHardwareFilter struct { value *IpamsvcHardwareFilter isSet bool diff --git a/ipam/model_ipamsvc_host_name.go b/ipam/model_ipamsvc_host_name.go index e728d63..28def57 100644 --- a/ipam/model_ipamsvc_host_name.go +++ b/ipam/model_ipamsvc_host_name.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcHostName type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type IpamsvcHostName struct { Zone string `json:"zone"` } +type _IpamsvcHostName IpamsvcHostName + // NewIpamsvcHostName instantiates a new IpamsvcHostName object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -181,6 +185,44 @@ func (o IpamsvcHostName) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcHostName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "zone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcHostName := _IpamsvcHostName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcHostName) + + if err != nil { + return err + } + + *o = IpamsvcHostName(varIpamsvcHostName) + + return err +} + type NullableIpamsvcHostName struct { value *IpamsvcHostName isSet bool diff --git a/ipam/model_ipamsvc_ignore_item.go b/ipam/model_ipamsvc_ignore_item.go index 8ee7184..044082a 100644 --- a/ipam/model_ipamsvc_ignore_item.go +++ b/ipam/model_ipamsvc_ignore_item.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcIgnoreItem type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type IpamsvcIgnoreItem struct { Value string `json:"value"` } +type _IpamsvcIgnoreItem IpamsvcIgnoreItem + // NewIpamsvcIgnoreItem instantiates a new IpamsvcIgnoreItem object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o IpamsvcIgnoreItem) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIgnoreItem) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIgnoreItem := _IpamsvcIgnoreItem{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcIgnoreItem) + + if err != nil { + return err + } + + *o = IpamsvcIgnoreItem(varIpamsvcIgnoreItem) + + return err +} + type NullableIpamsvcIgnoreItem struct { value *IpamsvcIgnoreItem isSet bool diff --git a/ipam/model_ipamsvc_ip_space.go b/ipam/model_ipamsvc_ip_space.go index ff974a4..215a152 100644 --- a/ipam/model_ipamsvc_ip_space.go +++ b/ipam/model_ipamsvc_ip_space.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -78,6 +80,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 +1228,43 @@ func (o IpamsvcIPSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIPSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIPSpace := _IpamsvcIPSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcIPSpace) + + if err != nil { + return err + } + + *o = IpamsvcIPSpace(varIpamsvcIPSpace) + + return err +} + type NullableIpamsvcIPSpace struct { value *IpamsvcIPSpace isSet bool diff --git a/ipam/model_ipamsvc_ipam_host.go b/ipam/model_ipamsvc_ipam_host.go index f8463e1..c2acaff 100644 --- a/ipam/model_ipamsvc_ipam_host.go +++ b/ipam/model_ipamsvc_ipam_host.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -40,6 +42,8 @@ type IpamsvcIpamHost struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcIpamHost IpamsvcIpamHost + // NewIpamsvcIpamHost instantiates a new IpamsvcIpamHost object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -376,6 +380,43 @@ func (o IpamsvcIpamHost) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcIpamHost) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcIpamHost := _IpamsvcIpamHost{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcIpamHost) + + if err != nil { + return err + } + + *o = IpamsvcIpamHost(varIpamsvcIpamHost) + + return err +} + type NullableIpamsvcIpamHost struct { value *IpamsvcIpamHost isSet bool diff --git a/ipam/model_ipamsvc_kerberos_key.go b/ipam/model_ipamsvc_kerberos_key.go index 86cb3a8..f1265ba 100644 --- a/ipam/model_ipamsvc_kerberos_key.go +++ b/ipam/model_ipamsvc_kerberos_key.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcKerberosKey type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type IpamsvcKerberosKey struct { Version *int64 `json:"version,omitempty"` } +type _IpamsvcKerberosKey IpamsvcKerberosKey + // NewIpamsvcKerberosKey instantiates a new IpamsvcKerberosKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +268,43 @@ func (o IpamsvcKerberosKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcKerberosKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcKerberosKey := _IpamsvcKerberosKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcKerberosKey) + + if err != nil { + return err + } + + *o = IpamsvcKerberosKey(varIpamsvcKerberosKey) + + return err +} + type NullableIpamsvcKerberosKey struct { value *IpamsvcKerberosKey isSet bool diff --git a/ipam/model_ipamsvc_leases_command.go b/ipam/model_ipamsvc_leases_command.go index b0209ea..c9acd28 100644 --- a/ipam/model_ipamsvc_leases_command.go +++ b/ipam/model_ipamsvc_leases_command.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcLeasesCommand type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type IpamsvcLeasesCommand struct { Subnet []IpamsvcLeaseSubnet `json:"subnet,omitempty"` } +type _IpamsvcLeasesCommand IpamsvcLeasesCommand + // NewIpamsvcLeasesCommand instantiates a new IpamsvcLeasesCommand object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -190,6 +194,43 @@ func (o IpamsvcLeasesCommand) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcLeasesCommand) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "command", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcLeasesCommand := _IpamsvcLeasesCommand{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcLeasesCommand) + + if err != nil { + return err + } + + *o = IpamsvcLeasesCommand(varIpamsvcLeasesCommand) + + return err +} + type NullableIpamsvcLeasesCommand struct { value *IpamsvcLeasesCommand isSet bool diff --git a/ipam/model_ipamsvc_name.go b/ipam/model_ipamsvc_name.go index 4bb67e2..130f772 100644 --- a/ipam/model_ipamsvc_name.go +++ b/ipam/model_ipamsvc_name.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcName type satisfies the MappedNullable interface at compile time @@ -25,6 +27,8 @@ type IpamsvcName struct { Type string `json:"type"` } +type _IpamsvcName IpamsvcName + // NewIpamsvcName instantiates a new IpamsvcName object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -107,6 +111,44 @@ func (o IpamsvcName) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcName := _IpamsvcName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcName) + + if err != nil { + return err + } + + *o = IpamsvcName(varIpamsvcName) + + return err +} + type NullableIpamsvcName struct { value *IpamsvcName isSet bool diff --git a/ipam/model_ipamsvc_option_code.go b/ipam/model_ipamsvc_option_code.go index 79af98e..9174ebc 100644 --- a/ipam/model_ipamsvc_option_code.go +++ b/ipam/model_ipamsvc_option_code.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -42,6 +44,8 @@ type IpamsvcOptionCode struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionCode IpamsvcOptionCode + // NewIpamsvcOptionCode instantiates a new IpamsvcOptionCode object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -386,6 +390,46 @@ func (o IpamsvcOptionCode) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionCode) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "name", + "option_space", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionCode := _IpamsvcOptionCode{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionCode) + + if err != nil { + return err + } + + *o = IpamsvcOptionCode(varIpamsvcOptionCode) + + return err +} + type NullableIpamsvcOptionCode struct { value *IpamsvcOptionCode isSet bool diff --git a/ipam/model_ipamsvc_option_filter.go b/ipam/model_ipamsvc_option_filter.go index 5dabbe5..58f66cb 100644 --- a/ipam/model_ipamsvc_option_filter.go +++ b/ipam/model_ipamsvc_option_filter.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -51,6 +53,8 @@ type IpamsvcOptionFilter struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcOptionFilter IpamsvcOptionFilter + // NewIpamsvcOptionFilter instantiates a new IpamsvcOptionFilter object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -588,6 +592,44 @@ func (o IpamsvcOptionFilter) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionFilter) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "rules", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionFilter := _IpamsvcOptionFilter{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionFilter) + + if err != nil { + return err + } + + *o = IpamsvcOptionFilter(varIpamsvcOptionFilter) + + return err +} + type NullableIpamsvcOptionFilter struct { value *IpamsvcOptionFilter isSet bool diff --git a/ipam/model_ipamsvc_option_filter_rule.go b/ipam/model_ipamsvc_option_filter_rule.go index 7d61417..f04c4d9 100644 --- a/ipam/model_ipamsvc_option_filter_rule.go +++ b/ipam/model_ipamsvc_option_filter_rule.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcOptionFilterRule type satisfies the MappedNullable interface at compile time @@ -29,6 +31,8 @@ type IpamsvcOptionFilterRule struct { SubstringOffset *int64 `json:"substring_offset,omitempty"` } +type _IpamsvcOptionFilterRule IpamsvcOptionFilterRule + // NewIpamsvcOptionFilterRule instantiates a new IpamsvcOptionFilterRule object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -181,6 +185,44 @@ func (o IpamsvcOptionFilterRule) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionFilterRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "compare", + "option_code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionFilterRule := _IpamsvcOptionFilterRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionFilterRule) + + if err != nil { + return err + } + + *o = IpamsvcOptionFilterRule(varIpamsvcOptionFilterRule) + + return err +} + type NullableIpamsvcOptionFilterRule struct { value *IpamsvcOptionFilterRule isSet bool diff --git a/ipam/model_ipamsvc_option_group.go b/ipam/model_ipamsvc_option_group.go index e4f710d..963c730 100644 --- a/ipam/model_ipamsvc_option_group.go +++ b/ipam/model_ipamsvc_option_group.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -38,6 +40,8 @@ type IpamsvcOptionGroup struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionGroup IpamsvcOptionGroup + // NewIpamsvcOptionGroup instantiates a new IpamsvcOptionGroup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -339,6 +343,43 @@ func (o IpamsvcOptionGroup) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionGroup := _IpamsvcOptionGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionGroup) + + if err != nil { + return err + } + + *o = IpamsvcOptionGroup(varIpamsvcOptionGroup) + + return err +} + type NullableIpamsvcOptionGroup struct { value *IpamsvcOptionGroup isSet bool diff --git a/ipam/model_ipamsvc_option_space.go b/ipam/model_ipamsvc_option_space.go index e126876..4d24061 100644 --- a/ipam/model_ipamsvc_option_space.go +++ b/ipam/model_ipamsvc_option_space.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -36,6 +38,8 @@ type IpamsvcOptionSpace struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _IpamsvcOptionSpace IpamsvcOptionSpace + // NewIpamsvcOptionSpace instantiates a new IpamsvcOptionSpace object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -302,6 +306,43 @@ func (o IpamsvcOptionSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcOptionSpace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcOptionSpace := _IpamsvcOptionSpace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcOptionSpace) + + if err != nil { + return err + } + + *o = IpamsvcOptionSpace(varIpamsvcOptionSpace) + + return err +} + type NullableIpamsvcOptionSpace struct { value *IpamsvcOptionSpace isSet bool diff --git a/ipam/model_ipamsvc_range.go b/ipam/model_ipamsvc_range.go index be9f8b4..7d05e51 100644 --- a/ipam/model_ipamsvc_range.go +++ b/ipam/model_ipamsvc_range.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -62,6 +64,8 @@ type IpamsvcRange struct { UtilizationV6 *IpamsvcUtilizationV6 `json:"utilization_v6,omitempty"` } +type _IpamsvcRange IpamsvcRange + // NewIpamsvcRange instantiates a new IpamsvcRange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -844,6 +848,44 @@ func (o IpamsvcRange) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcRange) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "end", + "start", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcRange := _IpamsvcRange{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcRange) + + if err != nil { + return err + } + + *o = IpamsvcRange(varIpamsvcRange) + + return err +} + type NullableIpamsvcRange struct { value *IpamsvcRange isSet bool diff --git a/ipam/model_ipamsvc_server.go b/ipam/model_ipamsvc_server.go index 1dd74ab..3ee6223 100644 --- a/ipam/model_ipamsvc_server.go +++ b/ipam/model_ipamsvc_server.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -94,6 +96,8 @@ type IpamsvcServer struct { VendorSpecificOptionOptionSpace *string `json:"vendor_specific_option_option_space,omitempty"` } +type _IpamsvcServer IpamsvcServer + // NewIpamsvcServer instantiates a new IpamsvcServer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -1410,6 +1414,43 @@ func (o IpamsvcServer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcServer) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcServer := _IpamsvcServer{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcServer) + + if err != nil { + return err + } + + *o = IpamsvcServer(varIpamsvcServer) + + return err +} + type NullableIpamsvcServer struct { value *IpamsvcServer isSet bool diff --git a/ipam/model_ipamsvc_tsig_key.go b/ipam/model_ipamsvc_tsig_key.go index b358da3..2c01473 100644 --- a/ipam/model_ipamsvc_tsig_key.go +++ b/ipam/model_ipamsvc_tsig_key.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcTSIGKey type satisfies the MappedNullable interface at compile time @@ -33,6 +35,8 @@ type IpamsvcTSIGKey struct { Secret *string `json:"secret,omitempty"` } +type _IpamsvcTSIGKey IpamsvcTSIGKey + // NewIpamsvcTSIGKey instantiates a new IpamsvcTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -264,6 +268,43 @@ func (o IpamsvcTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcTSIGKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcTSIGKey := _IpamsvcTSIGKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcTSIGKey) + + if err != nil { + return err + } + + *o = IpamsvcTSIGKey(varIpamsvcTSIGKey) + + return err +} + type NullableIpamsvcTSIGKey struct { value *IpamsvcTSIGKey isSet bool diff --git a/ipam/model_ipamsvc_utilization_threshold.go b/ipam/model_ipamsvc_utilization_threshold.go index c6f492c..960d909 100644 --- a/ipam/model_ipamsvc_utilization_threshold.go +++ b/ipam/model_ipamsvc_utilization_threshold.go @@ -11,7 +11,9 @@ API version: v1 package ipam import ( + "bytes" "encoding/json" + "fmt" ) // checks if the IpamsvcUtilizationThreshold type satisfies the MappedNullable interface at compile time @@ -27,6 +29,8 @@ type IpamsvcUtilizationThreshold struct { Low int64 `json:"low"` } +type _IpamsvcUtilizationThreshold IpamsvcUtilizationThreshold + // NewIpamsvcUtilizationThreshold instantiates a new IpamsvcUtilizationThreshold object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -135,6 +139,45 @@ func (o IpamsvcUtilizationThreshold) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *IpamsvcUtilizationThreshold) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "high", + "low", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIpamsvcUtilizationThreshold := _IpamsvcUtilizationThreshold{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIpamsvcUtilizationThreshold) + + if err != nil { + return err + } + + *o = IpamsvcUtilizationThreshold(varIpamsvcUtilizationThreshold) + + return err +} + type NullableIpamsvcUtilizationThreshold struct { value *IpamsvcUtilizationThreshold isSet bool diff --git a/ipam/utils.go b/ipam/utils.go index 697ec87..9c90f59 100644 --- a/ipam/utils.go +++ b/ipam/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { diff --git a/keys/.openapi-generator/VERSION b/keys/.openapi-generator/VERSION index 73a86b1..8b23b8d 100644 --- a/keys/.openapi-generator/VERSION +++ b/keys/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/keys/README.md b/keys/README.md index cbc0947..7653042 100644 --- a/keys/README.md +++ b/keys/README.md @@ -15,20 +15,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat Install the following dependencies: -```shell +```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` Put the package under your project folder and add the following in import: -```golang +```go import keys "github.com/infobloxopen/bloxone-go-client" ``` To use a proxy, set the environment variable `HTTP_PROXY`: -```golang +```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` @@ -38,17 +38,17 @@ Default configuration comes with `Servers` field that contains server objects as ### Select Server Configuration -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. +For using other server than the one defined on index 0 set context value `keys.ContextServerIndex` of type `int`. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextServerIndex, 1) ``` ### Templated Server URL -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. +Templated server URL is formatted using default variables from configuration or from context value `keys.ContextServerVariables` of type `map[string]string`. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextServerVariables, map[string]string{ "basePath": "v2", }) @@ -60,9 +60,9 @@ Note, enum values are always validated and all unused variables are silently ign Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +Similar rules for overriding default operation server index and variables applies by using `keys.ContextOperationServerIndices` and `keys.ContextOperationServerVariables` context maps. -```golang +```go ctx := context.WithValue(context.Background(), keys.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) @@ -127,11 +127,11 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Example -```golang +```go auth := context.WithValue( context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ + keys.ContextAPIKeys, + map[string]keys.APIKey{ "Authorization": {Key: "API_KEY_STRING"}, }, ) diff --git a/keys/docs/GenerateTsigAPI.md b/keys/docs/GenerateTsigAPI.md index 6f5663a..4293be1 100644 --- a/keys/docs/GenerateTsigAPI.md +++ b/keys/docs/GenerateTsigAPI.md @@ -22,24 +22,24 @@ Generate TSIG key with a random secret. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - algorithm := "algorithm_example" // string | The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm(algorithm).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GenerateTsigAPI.GenerateTsigGenerateTSIG``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateTsigGenerateTSIG`: KeysGenerateTSIGResponse - fmt.Fprintf(os.Stdout, "Response from `GenerateTsigAPI.GenerateTsigGenerateTSIG`: %v\n", resp) + algorithm := "algorithm_example" // string | The TSIG key algorithm. Valid values are: * _hmac_sha256_ * _hmac_sha1_ * _hmac_sha224_ * _hmac_sha384_ * _hmac_sha512_ Defaults to _hmac_sha256_. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GenerateTsigAPI.GenerateTsigGenerateTSIG(context.Background()).Algorithm(algorithm).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GenerateTsigAPI.GenerateTsigGenerateTSIG``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateTsigGenerateTSIG`: KeysGenerateTSIGResponse + fmt.Fprintf(os.Stdout, "Response from `GenerateTsigAPI.GenerateTsigGenerateTSIG`: %v\n", resp) } ``` diff --git a/keys/docs/KerberosAPI.md b/keys/docs/KerberosAPI.md index 4e0fdb4..0442efd 100644 --- a/keys/docs/KerberosAPI.md +++ b/keys/docs/KerberosAPI.md @@ -26,22 +26,22 @@ Delete the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.KerberosAPI.KerberosDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -94,31 +94,31 @@ Retrieve Kerberos keys. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosList`: KeysListKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosList`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosList`: %v\n", resp) } ``` @@ -174,25 +174,25 @@ Retrieve the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosRead`: KeysReadKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosRead`: KeysReadKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosRead`: %v\n", resp) } ``` @@ -246,25 +246,25 @@ Update the Kerberos key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewKerberosKey() // KerberosKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KerberosUpdate`: KeysUpdateKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KerberosUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KerberosUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KerberosUpdate`: KeysUpdateKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KerberosUpdate`: %v\n", resp) } ``` @@ -316,24 +316,24 @@ Name | Type | Description | Notes package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewKerberosKey() // KerberosKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KeysKerberosPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `KeysKerberosPost`: KeysListKerberosKeyResponse - fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KeysKerberosPost`: %v\n", resp) + body := *openapiclient.NewKerberosKey() // KerberosKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KerberosAPI.KeysKerberosPost(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KerberosAPI.KeysKerberosPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `KeysKerberosPost`: KeysListKerberosKeyResponse + fmt.Fprintf(os.Stdout, "Response from `KerberosAPI.KeysKerberosPost`: %v\n", resp) } ``` diff --git a/keys/docs/TsigAPI.md b/keys/docs/TsigAPI.md index 447b8d2..d3d6540 100644 --- a/keys/docs/TsigAPI.md +++ b/keys/docs/TsigAPI.md @@ -26,24 +26,24 @@ Create the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigCreate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigCreate`: KeysCreateTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigCreate`: %v\n", resp) + body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigCreate(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigCreate`: KeysCreateTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigCreate`: %v\n", resp) } ``` @@ -92,22 +92,22 @@ Delete the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } + id := "id_example" // string | An application specific resource identity of a resource + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TsigAPI.TsigDelete(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } } ``` @@ -160,31 +160,31 @@ Retrieve TSIG keys. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) - offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) - limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) - pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) - orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) - tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) - torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigList`: KeysListTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigList`: %v\n", resp) + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + filter := "filter_example" // string | A collection of response resources can be filtered by a logical expression string that includes JSON tag references to values in each resource, literal values, and logical operators. If a resource does not have the specified tag, its value is assumed to be null. Literal values include numbers (integer and floating-point), and quoted (both single- or double-quoted) literal strings, and 'null'. The following operators are commonly used in filter expressions: | Op | Description | | -- | ----------- | | == | Equal | | != | Not Equal | | > | Greater Than | | >= | Greater Than or Equal To | | < | Less Than | | <= | Less Than or Equal To | | and | Logical AND | | ~ | Matches Regex | | !~ | Does Not Match Regex | | or | Logical OR | | not | Logical NOT | | () | Groupping Operators | (optional) + offset := int32(56) // int32 | The integer index (zero-origin) of the offset into a collection of resources. If omitted or null the value is assumed to be '0'. (optional) + limit := int32(56) // int32 | The integer number of resources to be returned in the response. The service may impose maximum value. If omitted the service may impose a default value. (optional) + pageToken := "pageToken_example" // string | The service-defined string used to identify a page of resources. A null value indicates the first page. (optional) + orderBy := "orderBy_example" // string | A collection of response resources can be sorted by their JSON tags. For a 'flat' resource, the tag name is straightforward. If sorting is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, its value is assumed to be null.) Specify this parameter as a comma-separated list of JSON tag names. The sort direction can be specified by a suffix separated by whitespace before the tag name. The suffix 'asc' sorts the data in ascending order. The suffix 'desc' sorts the data in descending order. If no suffix is specified the data is sorted in ascending order. (optional) + tfilter := "tfilter_example" // string | This parameter is used for filtering by tags. (optional) + torderBy := "torderBy_example" // string | This parameter is used for sorting by tags. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigList(context.Background()).Fields(fields).Filter(filter).Offset(offset).Limit(limit).PageToken(pageToken).OrderBy(orderBy).Tfilter(tfilter).TorderBy(torderBy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigList`: KeysListTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigList`: %v\n", resp) } ``` @@ -240,25 +240,25 @@ Retrieve the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigRead``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigRead`: KeysReadTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigRead`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + fields := "fields_example" // string | A collection of response resources can be transformed by specifying a set of JSON tags to be returned. For a “flat” resource, the tag name is straightforward. If field selection is allowed on non-flat hierarchical resources, the service should implement a qualified naming scheme such as dot-qualification to reference data down the hierarchy. If a resource does not have the specified tag, the tag does not appear in the output resource. Specify this parameter as a comma-separated list of JSON tag names. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigRead(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigRead`: KeysReadTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigRead`: %v\n", resp) } ``` @@ -312,25 +312,25 @@ Update the TSIG key. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - id := "id_example" // string | An application specific resource identity of a resource - body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigUpdate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TsigUpdate`: KeysUpdateTSIGKeyResponse - fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigUpdate`: %v\n", resp) + id := "id_example" // string | An application specific resource identity of a resource + body := *openapiclient.NewKeysTSIGKey("Name_example", "Secret_example") // KeysTSIGKey | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TsigAPI.TsigUpdate(context.Background(), id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TsigAPI.TsigUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TsigUpdate`: KeysUpdateTSIGKeyResponse + fmt.Fprintf(os.Stdout, "Response from `TsigAPI.TsigUpdate`: %v\n", resp) } ``` diff --git a/keys/docs/UploadAPI.md b/keys/docs/UploadAPI.md index 00cc161..0170ee0 100644 --- a/keys/docs/UploadAPI.md +++ b/keys/docs/UploadAPI.md @@ -22,24 +22,24 @@ Upload content to the keys service. package main import ( - "context" - "fmt" - "os" - openapiclient "github.com/infobloxopen/bloxone-go-client" + "context" + "fmt" + "os" + openapiclient "github.com/infobloxopen/bloxone-go-client" ) func main() { - body := *openapiclient.NewUploadRequest("Content_example", openapiclient.uploadContentType("UNKNOWN")) // UploadRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.UploadUpload``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UploadUpload`: DdiuploadResponse - fmt.Fprintf(os.Stdout, "Response from `UploadAPI.UploadUpload`: %v\n", resp) + body := *openapiclient.NewUploadRequest("Content_example", openapiclient.uploadContentType("UNKNOWN")) // UploadRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UploadAPI.UploadUpload(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UploadAPI.UploadUpload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UploadUpload`: DdiuploadResponse + fmt.Fprintf(os.Stdout, "Response from `UploadAPI.UploadUpload`: %v\n", resp) } ``` diff --git a/keys/model_keys_tsig_key.go b/keys/model_keys_tsig_key.go index 9ebb444..bb5cb3d 100644 --- a/keys/model_keys_tsig_key.go +++ b/keys/model_keys_tsig_key.go @@ -11,7 +11,9 @@ API version: v1 package keys import ( + "bytes" "encoding/json" + "fmt" "time" ) @@ -40,6 +42,8 @@ type KeysTSIGKey struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` } +type _KeysTSIGKey KeysTSIGKey + // NewKeysTSIGKey instantiates a new KeysTSIGKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -367,6 +371,44 @@ func (o KeysTSIGKey) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *KeysTSIGKey) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "secret", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKeysTSIGKey := _KeysTSIGKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKeysTSIGKey) + + if err != nil { + return err + } + + *o = KeysTSIGKey(varKeysTSIGKey) + + return err +} + type NullableKeysTSIGKey struct { value *KeysTSIGKey isSet bool diff --git a/keys/model_upload_request.go b/keys/model_upload_request.go index bb985e6..4bdedcf 100644 --- a/keys/model_upload_request.go +++ b/keys/model_upload_request.go @@ -11,7 +11,9 @@ API version: v1 package keys import ( + "bytes" "encoding/json" + "fmt" ) // checks if the UploadRequest type satisfies the MappedNullable interface at compile time @@ -29,6 +31,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 +222,44 @@ func (o UploadRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UploadRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "content", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUploadRequest := _UploadRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUploadRequest) + + if err != nil { + return err + } + + *o = UploadRequest(varUploadRequest) + + return err +} + type NullableUploadRequest struct { value *UploadRequest isSet bool diff --git a/keys/utils.go b/keys/utils.go index 54647cd..9d1e0fd 100644 --- a/keys/utils.go +++ b/keys/utils.go @@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error {