Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ran latest generator with version 7.3.0 and ran make fmt #24

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dns_config/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.1
7.3.0
24 changes: 12 additions & 12 deletions dns_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```

Expand All @@ -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",
})
Expand All @@ -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,
})
Expand Down Expand Up @@ -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"},
},
)
Expand Down
164 changes: 82 additions & 82 deletions dns_config/docs/AclAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
```

Expand Down Expand Up @@ -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)
}
}
```

Expand Down Expand Up @@ -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)
}
```

Expand Down Expand Up @@ -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)
}
```

Expand Down Expand Up @@ -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)
}
```

Expand Down
Loading
Loading