-
Notifications
You must be signed in to change notification settings - Fork 2
/
apppopulationreport.go
112 lines (97 loc) · 2.85 KB
/
apppopulationreport.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
// 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"
)
// State - The state field tracks the state of the AppPopulationReport. This state field can be one of REPORT_STATE_PENDING, REPORT_STATE_UNSPECIFIED, REPORT_STATE_OK, REPORT_STATE_ERROR.
type State string
const (
StateReportStateUnspecified State = "REPORT_STATE_UNSPECIFIED"
StateReportStatePending State = "REPORT_STATE_PENDING"
StateReportStateOk State = "REPORT_STATE_OK"
StateReportStateError State = "REPORT_STATE_ERROR"
)
func (e State) ToPointer() *State {
return &e
}
func (e *State) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "REPORT_STATE_UNSPECIFIED":
fallthrough
case "REPORT_STATE_PENDING":
fallthrough
case "REPORT_STATE_OK":
fallthrough
case "REPORT_STATE_ERROR":
*e = State(v)
return nil
default:
return fmt.Errorf("invalid value for State: %v", v)
}
}
// The AppPopulationReport is a generated report for a specific app that gives details about the app's users. These details include what groups, roles, and other entitlements the users have access to.
type AppPopulationReport struct {
// The appId is the Id of the app which the report is generated for.
AppID *string `json:"appId,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
// The downloadUrl is the url used for downloading the AppPopulationReport.
DownloadURL *string `json:"downloadUrl,omitempty"`
// The hashes field contains the file hashes of the report.
Hashes map[string]string `json:"hashes,omitempty"`
// The id field.
ID *string `json:"id,omitempty"`
// The state field tracks the state of the AppPopulationReport. This state field can be one of REPORT_STATE_PENDING, REPORT_STATE_UNSPECIFIED, REPORT_STATE_OK, REPORT_STATE_ERROR.
State *State `json:"state,omitempty"`
}
func (a AppPopulationReport) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *AppPopulationReport) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil {
return err
}
return nil
}
func (o *AppPopulationReport) GetAppID() *string {
if o == nil {
return nil
}
return o.AppID
}
func (o *AppPopulationReport) GetCreatedAt() *time.Time {
if o == nil {
return nil
}
return o.CreatedAt
}
func (o *AppPopulationReport) GetDownloadURL() *string {
if o == nil {
return nil
}
return o.DownloadURL
}
func (o *AppPopulationReport) GetHashes() map[string]string {
if o == nil {
return nil
}
return o.Hashes
}
func (o *AppPopulationReport) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *AppPopulationReport) GetState() *State {
if o == nil {
return nil
}
return o.State
}