-
Notifications
You must be signed in to change notification settings - Fork 2
/
tasktypecertify.go
133 lines (116 loc) · 3.18 KB
/
tasktypecertify.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package shared
import (
"encoding/json"
"fmt"
"github.com/conductorone/conductorone-sdk-go/pkg/utils"
"time"
)
// Outcome - The outcome of the certification.
type Outcome string
const (
OutcomeCertifyOutcomeUnspecified Outcome = "CERTIFY_OUTCOME_UNSPECIFIED"
OutcomeCertifyOutcomeCertified Outcome = "CERTIFY_OUTCOME_CERTIFIED"
OutcomeCertifyOutcomeDecertified Outcome = "CERTIFY_OUTCOME_DECERTIFIED"
OutcomeCertifyOutcomeError Outcome = "CERTIFY_OUTCOME_ERROR"
OutcomeCertifyOutcomeCancelled Outcome = "CERTIFY_OUTCOME_CANCELLED"
)
func (e Outcome) ToPointer() *Outcome {
return &e
}
func (e *Outcome) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "CERTIFY_OUTCOME_UNSPECIFIED":
fallthrough
case "CERTIFY_OUTCOME_CERTIFIED":
fallthrough
case "CERTIFY_OUTCOME_DECERTIFIED":
fallthrough
case "CERTIFY_OUTCOME_ERROR":
fallthrough
case "CERTIFY_OUTCOME_CANCELLED":
*e = Outcome(v)
return nil
default:
return fmt.Errorf("invalid value for Outcome: %v", v)
}
}
// The TaskTypeCertify message indicates that a task is a certify task and all related details.
type TaskTypeCertify struct {
// The ID of the access review.
AccessReviewID *string `json:"accessReviewId,omitempty"`
// The ID of the specific access review object that owns this certify task. This is also set on a revoke task if the revoke task is created from the denied outcome of a certify task.
AccessReviewSelection *string `json:"accessReviewSelection,omitempty"`
// The ID of the app entitlement.
AppEntitlementID *string `json:"appEntitlementId,omitempty"`
// The ID of the app.
AppID *string `json:"appId,omitempty"`
// The ID of the app user.
AppUserID *string `json:"appUserId,omitempty"`
// The ID of the user.
IdentityUserID *string `json:"identityUserId,omitempty"`
// The outcome of the certification.
Outcome *Outcome `json:"outcome,omitempty"`
OutcomeTime *time.Time `json:"outcomeTime,omitempty"`
}
func (t TaskTypeCertify) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(t, "", false)
}
func (t *TaskTypeCertify) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil {
return err
}
return nil
}
func (o *TaskTypeCertify) GetAccessReviewID() *string {
if o == nil {
return nil
}
return o.AccessReviewID
}
func (o *TaskTypeCertify) GetAccessReviewSelection() *string {
if o == nil {
return nil
}
return o.AccessReviewSelection
}
func (o *TaskTypeCertify) GetAppEntitlementID() *string {
if o == nil {
return nil
}
return o.AppEntitlementID
}
func (o *TaskTypeCertify) GetAppID() *string {
if o == nil {
return nil
}
return o.AppID
}
func (o *TaskTypeCertify) GetAppUserID() *string {
if o == nil {
return nil
}
return o.AppUserID
}
func (o *TaskTypeCertify) GetIdentityUserID() *string {
if o == nil {
return nil
}
return o.IdentityUserID
}
func (o *TaskTypeCertify) GetOutcome() *Outcome {
if o == nil {
return nil
}
return o.Outcome
}
func (o *TaskTypeCertify) GetOutcomeTime() *time.Time {
if o == nil {
return nil
}
return o.OutcomeTime
}