Skip to content

Commit

Permalink
Sync OpenAPI; fixes to token create methods (#192)
Browse files Browse the repository at this point in the history
From hashicorp/vault#18556

Changes auth methods:
- TokenCreate
- TokenCreateAgainstRole
- TokenCreateOrphan
  • Loading branch information
maxb authored Jul 11, 2023
1 parent 0b57517 commit 21d51ea
Show file tree
Hide file tree
Showing 9 changed files with 183 additions and 137 deletions.
12 changes: 3 additions & 9 deletions api_auth.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions docs/AuthApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -14134,11 +14134,9 @@ func main() {
}

request := schema.NewTokenCreateRequestWithDefaults()
format := "format_example" // string | Return json formatted output
resp, err := client.Auth.TokenCreate(
context.Background(),
request,
format,
vault.WithToken("my-token"),
)
if err != nil {
Expand All @@ -14159,7 +14157,6 @@ func main() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenCreateRequest** | [**TokenCreateRequest**](TokenCreateRequest.md) | |
**format** | **string** | Return json formatted output |

(empty response body)

Expand Down Expand Up @@ -14196,12 +14193,10 @@ func main() {

roleName := "roleName_example" // string | Name of the role
request := schema.NewTokenCreateAgainstRoleRequestWithDefaults()
format := "format_example" // string | Return json formatted output
resp, err := client.Auth.TokenCreateAgainstRole(
context.Background(),
roleName,
request,
format,
vault.WithToken("my-token"),
)
if err != nil {
Expand All @@ -14227,7 +14222,6 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------

**tokenCreateAgainstRoleRequest** | [**TokenCreateAgainstRoleRequest**](TokenCreateAgainstRoleRequest.md) | |
**format** | **string** | Return json formatted output |

(empty response body)

Expand Down Expand Up @@ -14263,11 +14257,9 @@ func main() {
}

request := schema.NewTokenCreateOrphanRequestWithDefaults()
format := "format_example" // string | Return json formatted output
resp, err := client.Auth.TokenCreateOrphan(
context.Background(),
request,
format,
vault.WithToken("my-token"),
)
if err != nil {
Expand All @@ -14288,7 +14280,6 @@ func main() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenCreateOrphanRequest** | [**TokenCreateOrphanRequest**](TokenCreateOrphanRequest.md) | |
**format** | **string** | Return json formatted output |

(empty response body)

Expand Down
58 changes: 44 additions & 14 deletions docs/TokenCreateAgainstRoleRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ Name | Type | Description | Notes
**EntityAlias** | Pointer to **string** | Name of the entity alias to associate with this token | [optional]
**ExplicitMaxTtl** | Pointer to **string** | Explicit Max TTL of this token | [optional]
**Id** | Pointer to **string** | Value for the token | [optional]
**Metadata** | Pointer to **map[string]interface{}** | Arbitrary key=value metadata to associate with the token | [optional]
**Lease** | Pointer to **string** | Use 'ttl' instead | [optional]
**Meta** | Pointer to **map[string]interface{}** | Arbitrary key=value metadata to associate with the token | [optional]
**NoDefaultPolicy** | Pointer to **bool** | Do not include default policy for this token | [optional]
**NoParent** | Pointer to **bool** | Create the token with no parent | [optional]
**NumUses** | Pointer to **int32** | Max number of uses for this token | [optional]
**Period** | Pointer to **string** | Renew period | [optional]
**Policies** | Pointer to **[]string** | List of policies for the token | [optional]
**Renewable** | Pointer to **bool** | Allow token to be renewed past its initial TTL up to system/mount maximum TTL | [optional]
**Renewable** | Pointer to **bool** | Allow token to be renewed past its initial TTL up to system/mount maximum TTL | [optional] [default to true]
**Ttl** | Pointer to **string** | Time to live for this token | [optional]
**Type** | Pointer to **string** | Token type | [optional]

Expand Down Expand Up @@ -158,31 +159,60 @@ HasId returns a boolean if a field has been set.



### GetMetadata
### GetLease

`func (o *TokenCreateAgainstRoleRequest) GetMetadata() map[string]interface{}`
`func (o *TokenCreateAgainstRoleRequest) GetLease() string`

GetMetadata returns the Metadata field if non-nil, zero value otherwise.
GetLease returns the Lease field if non-nil, zero value otherwise.

### GetMetadataOk
### GetLeaseOk

`func (o *TokenCreateAgainstRoleRequest) GetMetadataOk() (*map[string]interface{}, bool)`
`func (o *TokenCreateAgainstRoleRequest) GetLeaseOk() (*string, bool)`

GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise
GetLeaseOk returns a tuple with the Lease field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMetadata
### SetLease

`func (o *TokenCreateAgainstRoleRequest) SetMetadata(v map[string]interface{})`
`func (o *TokenCreateAgainstRoleRequest) SetLease(v string)`

SetMetadata sets Metadata field to given value.
SetLease sets Lease field to given value.


### HasMetadata
### HasLease

`func (o *TokenCreateAgainstRoleRequest) HasMetadata() bool`
`func (o *TokenCreateAgainstRoleRequest) HasLease() bool`

HasMetadata returns a boolean if a field has been set.
HasLease returns a boolean if a field has been set.




### GetMeta

`func (o *TokenCreateAgainstRoleRequest) GetMeta() map[string]interface{}`

GetMeta returns the Meta field if non-nil, zero value otherwise.

### GetMetaOk

`func (o *TokenCreateAgainstRoleRequest) GetMetaOk() (*map[string]interface{}, bool)`

GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMeta

`func (o *TokenCreateAgainstRoleRequest) SetMeta(v map[string]interface{})`

SetMeta sets Meta field to given value.


### HasMeta

`func (o *TokenCreateAgainstRoleRequest) HasMeta() bool`

HasMeta returns a boolean if a field has been set.



Expand Down
88 changes: 44 additions & 44 deletions docs/TokenCreateOrphanRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Name | Type | Description | Notes
**EntityAlias** | Pointer to **string** | Name of the entity alias to associate with this token | [optional]
**ExplicitMaxTtl** | Pointer to **string** | Explicit Max TTL of this token | [optional]
**Id** | Pointer to **string** | Value for the token | [optional]
**Metadata** | Pointer to **map[string]interface{}** | Arbitrary key=value metadata to associate with the token | [optional]
**Lease** | Pointer to **string** | Use 'ttl' instead | [optional]
**Meta** | Pointer to **map[string]interface{}** | Arbitrary key=value metadata to associate with the token | [optional]
**NoDefaultPolicy** | Pointer to **bool** | Do not include default policy for this token | [optional]
**NoParent** | Pointer to **bool** | Create the token with no parent | [optional]
**NumUses** | Pointer to **int32** | Max number of uses for this token | [optional]
**Period** | Pointer to **string** | Renew period | [optional]
**Policies** | Pointer to **[]string** | List of policies for the token | [optional]
**Renewable** | Pointer to **bool** | Allow token to be renewed past its initial TTL up to system/mount maximum TTL | [optional]
**RoleName** | Pointer to **string** | Name of the role | [optional]
**Renewable** | Pointer to **bool** | Allow token to be renewed past its initial TTL up to system/mount maximum TTL | [optional] [default to true]
**Ttl** | Pointer to **string** | Time to live for this token | [optional]
**Type** | Pointer to **string** | Token type | [optional]

Expand Down Expand Up @@ -159,31 +159,60 @@ HasId returns a boolean if a field has been set.



### GetMetadata
### GetLease

`func (o *TokenCreateOrphanRequest) GetMetadata() map[string]interface{}`
`func (o *TokenCreateOrphanRequest) GetLease() string`

GetMetadata returns the Metadata field if non-nil, zero value otherwise.
GetLease returns the Lease field if non-nil, zero value otherwise.

### GetMetadataOk
### GetLeaseOk

`func (o *TokenCreateOrphanRequest) GetMetadataOk() (*map[string]interface{}, bool)`
`func (o *TokenCreateOrphanRequest) GetLeaseOk() (*string, bool)`

GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise
GetLeaseOk returns a tuple with the Lease field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMetadata
### SetLease

`func (o *TokenCreateOrphanRequest) SetMetadata(v map[string]interface{})`
`func (o *TokenCreateOrphanRequest) SetLease(v string)`

SetMetadata sets Metadata field to given value.
SetLease sets Lease field to given value.


### HasMetadata
### HasLease

`func (o *TokenCreateOrphanRequest) HasMetadata() bool`
`func (o *TokenCreateOrphanRequest) HasLease() bool`

HasMetadata returns a boolean if a field has been set.
HasLease returns a boolean if a field has been set.




### GetMeta

`func (o *TokenCreateOrphanRequest) GetMeta() map[string]interface{}`

GetMeta returns the Meta field if non-nil, zero value otherwise.

### GetMetaOk

`func (o *TokenCreateOrphanRequest) GetMetaOk() (*map[string]interface{}, bool)`

GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMeta

`func (o *TokenCreateOrphanRequest) SetMeta(v map[string]interface{})`

SetMeta sets Meta field to given value.


### HasMeta

`func (o *TokenCreateOrphanRequest) HasMeta() bool`

HasMeta returns a boolean if a field has been set.



Expand Down Expand Up @@ -362,35 +391,6 @@ HasRenewable returns a boolean if a field has been set.



### GetRoleName

`func (o *TokenCreateOrphanRequest) GetRoleName() string`

GetRoleName returns the RoleName field if non-nil, zero value otherwise.

### GetRoleNameOk

`func (o *TokenCreateOrphanRequest) GetRoleNameOk() (*string, bool)`

GetRoleNameOk returns a tuple with the RoleName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetRoleName

`func (o *TokenCreateOrphanRequest) SetRoleName(v string)`

SetRoleName sets RoleName field to given value.


### HasRoleName

`func (o *TokenCreateOrphanRequest) HasRoleName() bool`

HasRoleName returns a boolean if a field has been set.




### GetTtl

`func (o *TokenCreateOrphanRequest) GetTtl() string`
Expand Down
Loading

0 comments on commit 21d51ea

Please sign in to comment.