Skip to content

Commit 3eb108e

Browse files
committed
add mappedNullable helper.
1 parent 7937005 commit 3eb108e

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

models/model_invite_statement.go

+10-21
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
1-
/*
2-
Authress
3-
4-
<p> <h2>Introduction</h2> <p>Welcome to the Authress Authorization API. <br>The Authress REST API provides the operations and resources necessary to create records, assign permissions, and verify any user in your platform.</p> <p><ul> <li>Manage multitenant platforms and create user tenants for SSO connections.</li> <li>Create records to assign roles and resources to grant access for users.</li> <li>Check user access control by calling the authorization API at the right time.</li> <li>Configure service clients to securely access services in your platform.</li> </ul></p> <p>For more in-depth scenarios check out the <a href=\"https://authress.io/knowledge-base\" target=\"_blank\">Authress knowledge base</a>.</p> </p>
5-
6-
API version: v1
7-
8-
*/
9-
10-
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
11-
121
package models
132

143
import (
15-
"encoding/json"
164
"bytes"
5+
"encoding/json"
176
"fmt"
7+
8+
. "github.com/authress/authress-sdk.go/utilities"
189
)
1910

2011
// checks if the Statement type satisfies the MappedNullable interface at compile time
2112
var _ MappedNullable = &InviteStatement{}
2213

23-
// Statement struct for Statement
14+
// InviteStatement struct for InviteStatement
2415
type InviteStatement struct {
25-
Roles []string `json:"roles"`
16+
Roles []string `json:"roles"`
2617
Resources []Resource `json:"resources"`
2718
}
2819

2920
type _InviteStatement InviteStatement
3021

31-
// NewStatement instantiates a new Statement object
22+
// NewInviteStatement instantiates a new InviteStatement object
3223
// This constructor will assign default values to properties that have it defined,
3324
// and makes sure properties required by API are set, but the set of arguments
3425
// will change when the set of required properties is changed
@@ -39,7 +30,7 @@ func NewInviteStatement(roles []string, resources []Resource) *InviteStatement {
3930
return &this
4031
}
4132

42-
// NewStatementWithDefaults instantiates a new Statement object
33+
// NewInviteStatementWithDefaults instantiates a new InviteStatement object
4334
// This constructor will only assign default values to properties that have it defined,
4435
// but it doesn't guarantee that properties required by API are set
4536
func NewInviteStatementWithDefaults() *InviteStatement {
@@ -96,7 +87,7 @@ func (o *InviteStatement) SetResources(v []Resource) {
9687
}
9788

9889
func (o InviteStatement) MarshalJSON() ([]byte, error) {
99-
toSerialize,err := o.ToMap()
90+
toSerialize, err := o.ToMap()
10091
if err != nil {
10192
return []byte{}, err
10293
}
@@ -124,10 +115,10 @@ func (o *InviteStatement) UnmarshalJSON(data []byte) (err error) {
124115
err = json.Unmarshal(data, &allProperties)
125116

126117
if err != nil {
127-
return err;
118+
return err
128119
}
129120

130-
for _, requiredProperty := range(requiredProperties) {
121+
for _, requiredProperty := range requiredProperties {
131122
if _, exists := allProperties[requiredProperty]; !exists {
132123
return fmt.Errorf("no value given for required property %v", requiredProperty)
133124
}
@@ -183,5 +174,3 @@ func (v *NullableInviteStatement) UnmarshalJSON(src []byte) error {
183174
v.isSet = true
184175
return json.Unmarshal(src, &v.value)
185176
}
186-
187-

0 commit comments

Comments
 (0)