-
Notifications
You must be signed in to change notification settings - Fork 31
/
policy_subject.go
43 lines (33 loc) · 995 Bytes
/
policy_subject.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
/*
Copyright © 2022 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: MPL-2.0
*/
package iammodel
import (
"github.com/go-openapi/swag"
)
// VmwareTanzuCoreV1alpha1PolicySubject Representation of a subject in resource manager.
//
// swagger:model vmware.tanzu.core.v1alpha1.policy.Subject
type VmwareTanzuCoreV1alpha1PolicySubject struct {
// Subject type.
Kind *VmwareTanzuCoreV1alpha1PolicySubjectKind `json:"kind,omitempty"`
// Subject name - allow max characters for email - 320.
Name string `json:"name,omitempty"`
}
// MarshalBinary interface implementation.
func (m *VmwareTanzuCoreV1alpha1PolicySubject) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation.
func (m *VmwareTanzuCoreV1alpha1PolicySubject) UnmarshalBinary(b []byte) error {
var res VmwareTanzuCoreV1alpha1PolicySubject
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}