-
Notifications
You must be signed in to change notification settings - Fork 31
/
policy_binding_delta.go
46 lines (35 loc) · 1.06 KB
/
policy_binding_delta.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
/*
Copyright © 2022 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: MPL-2.0
*/
package iammodel
import (
"github.com/go-openapi/swag"
)
// VmwareTanzuCoreV1alpha1PolicyBindingDelta Used for modify policy apis.
//
// swagger:model vmware.tanzu.core.v1alpha1.policy.BindingDelta
type VmwareTanzuCoreV1alpha1PolicyBindingDelta struct {
// Type of operation.
Op *VmwareTanzuCoreV1alpha1PolicyBindingDeltaOpType `json:"op,omitempty"`
// Role for binding.
Role string `json:"role,omitempty"`
// Subject of rolebinding.
Subject *VmwareTanzuCoreV1alpha1PolicySubject `json:"subject,omitempty"`
}
// MarshalBinary interface implementation.
func (m *VmwareTanzuCoreV1alpha1PolicyBindingDelta) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation.
func (m *VmwareTanzuCoreV1alpha1PolicyBindingDelta) UnmarshalBinary(b []byte) error {
var res VmwareTanzuCoreV1alpha1PolicyBindingDelta
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}