-
-
Notifications
You must be signed in to change notification settings - Fork 339
/
ory_access_control_policy.go
61 lines (47 loc) · 1.89 KB
/
ory_access_control_policy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// OryAccessControlPolicy oryAccessControlPolicy specifies an ORY Access Policy document.
//
// swagger:model oryAccessControlPolicy
type OryAccessControlPolicy struct {
// Actions is an array representing all the actions this ORY Access Policy applies to.
Actions []string `json:"actions"`
// Conditions represents a keyed object of conditions under which this ORY Access Policy is active.
Conditions map[string]interface{} `json:"conditions,omitempty"`
// Description is an optional, human-readable description.
Description string `json:"description,omitempty"`
// Effect is the effect of this ORY Access Policy. It can be "allow" or "deny".
Effect string `json:"effect,omitempty"`
// ID is the unique identifier of the ORY Access Policy. It is used to query, update, and remove the ORY Access Policy.
ID string `json:"id,omitempty"`
// Resources is an array representing all the resources this ORY Access Policy applies to.
Resources []string `json:"resources"`
// Subjects is an array representing all the subjects this ORY Access Policy applies to.
Subjects []string `json:"subjects"`
}
// Validate validates this ory access control policy
func (m *OryAccessControlPolicy) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *OryAccessControlPolicy) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OryAccessControlPolicy) UnmarshalBinary(b []byte) error {
var res OryAccessControlPolicy
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}