Skip to content

Commit

Permalink
add mappedNullable helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Oct 29, 2024
1 parent 7937005 commit 3eb108e
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions models/model_invite_statement.go
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
/*
Authress
<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>
API version: v1
Contact: support@authress.io
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package models

import (
"encoding/json"
"bytes"
"encoding/json"
"fmt"

. "github.com/authress/authress-sdk.go/utilities"
)

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

// Statement struct for Statement
// InviteStatement struct for InviteStatement
type InviteStatement struct {
Roles []string `json:"roles"`
Roles []string `json:"roles"`
Resources []Resource `json:"resources"`
}

type _InviteStatement InviteStatement

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

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

func (o InviteStatement) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
Expand Down Expand Up @@ -124,10 +115,10 @@ func (o *InviteStatement) UnmarshalJSON(data []byte) (err error) {
err = json.Unmarshal(data, &allProperties)

if err != nil {
return err;
return err
}

for _, requiredProperty := range(requiredProperties) {
for _, requiredProperty := range requiredProperties {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
Expand Down Expand Up @@ -183,5 +174,3 @@ func (v *NullableInviteStatement) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}


0 comments on commit 3eb108e

Please sign in to comment.