/
model_audit_log_entry_listing_rep.go
665 lines (565 loc) · 41.9 KB
/
model_audit_log_entry_listing_rep.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
/*
LaunchDarkly REST API
# Overview ## Authentication All REST API resources are authenticated with either [personal or service access tokens](https://docs.launchdarkly.com/home/account-security/api-access-tokens), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [Account settings](https://app.launchdarkly.com/settings/tokens) page. LaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and client-side SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations (fetching feature flag settings). | Auth mechanism | Allowed resources | Use cases | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | [Personal access tokens](https://docs.launchdarkly.com/home/account-security/api-access-tokens) | Can be customized on a per-token basis | Building scripts, custom integrations, data export | | SDK keys | Can only access read-only SDK-specific resources and the firehose, restricted to a single environment | Server-side SDKs, Firehose API | | Mobile keys | Can only access read-only mobile SDK-specific resources, restricted to a single environment | Mobile SDKs | | Client-side ID | Single environment, only flags marked available to client-side | Client-side JavaScript | > #### Keep your access tokens and SDK keys private > > Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [Account Settings](https://app.launchdarkly.com/settings#/tokens) page. > > The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript. ### Via request header The preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token. Manage personal access tokens from the [Account Settings](https://app.launchdarkly.com/settings/tokens) page. ### Via session cookie For testing purposes, you can make API calls directly from your web browser. If you're logged in to the application, the API will use your existing session to authenticate calls. If you have a [role](https://docs.launchdarkly.com/home/team/built-in-roles) other than Admin, or have a [custom role](https://docs.launchdarkly.com/home/team/custom-roles) defined, you may not have permission to perform some API calls. You will receive a `401` response code in that case. > ### Modifying the Origin header causes an error > > LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`. > > If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly. > > Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail. > > To prevent this error, do not modify your Origin header. > > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage. ## Representations All resources expect and return JSON response bodies. Error responses will also send a JSON body. Read [Errors](#section/Errors) for a more detailed description of the error format used by the API. In practice this means that you always get a response with a `Content-Type` header set to `application/json`. In addition, request bodies for `PUT`, `POST`, `REPORT` and `PATCH` requests must be encoded as JSON with a `Content-Type` header set to `application/json`. ### Summary and detailed representations When you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource (for example, a single feature flag), you receive a _detailed representation_ containing all of the attributes of the resource. The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation. ### Links and addressability The best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links: - Links to other resources within the API are encapsulated in a `_links` object. - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link. Each link has two attributes: an href (the URL) and a type (the content type). For example, a feature resource might return the following: ```json { \"_links\": { \"parent\": { \"href\": \"/api/features\", \"type\": \"application/json\" }, \"self\": { \"href\": \"/api/features/sort.order\", \"type\": \"application/json\" } }, \"_site\": { \"href\": \"/features/sort.order\", \"type\": \"text/html\" } } ``` From this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link. Collections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level. Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection. ## Updates Resources that accept partial updates use the `PATCH` verb, and support the [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) format. Some resources also support the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) format. In addition, some resources support optional comments that can be submitted with updates. Comments appear in outgoing webhooks, the audit log, and other integrations. ### Updates via JSON Patch [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. For example, in this feature flag representation: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"description\": \"This is the description\", ... } ``` You can change the feature flag's description with the following patch document: ```json [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }] ``` JSON Patch documents are always arrays. You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch: ```json [ { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 }, { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" } ] ``` The above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description. Attributes that aren't editable, like a resource's `_links`, have names that start with an underscore. ### Updates via JSON Merge Patch The API also supports the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) format, as well as the [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) resource. JSON Merge Patch is less expressive than JSON Patch but in many cases, it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document: ```json { \"description\": \"New flag description\" } ``` ### Updates with comments You can submit optional comments with `PATCH` changes. The [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) resource supports comments. To submit a comment along with a JSON Patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }] } ``` To submit a comment along with a JSON Merge Patch document, use the following format: ```json { \"comment\": \"This is a comment string\", \"merge\": { \"description\": \"New flag description\" } } ``` ### Updates via semantic patches The API also supports the Semantic patch format. A semantic `PATCH` is a way to specify the modifications to perform on a resource as a set of executable instructions. JSON Patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. Semantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, semantic patch instructions can also be defined independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date. For example, in this feature flag configuration in environment Production: ```json { \"name\": \"Alternate sort order\", \"kind\": \"boolean\", \"key\": \"sort.order\", ... \"environments\": { \"production\": { \"on\": true, \"archived\": false, \"salt\": \"c29ydC5vcmRlcg==\", \"sel\": \"8de1085cb7354b0ab41c0e778376dfd3\", \"lastModified\": 1469131558260, \"version\": 81, \"targets\": [ { \"values\": [ \"Gerhard.Little@yahoo.com\" ], \"variation\": 0 }, { \"values\": [ \"1461797806429-33-861961230\", \"438580d8-02ee-418d-9eec-0085cab2bdf0\" ], \"variation\": 1 } ], \"rules\": [], \"fallthrough\": { \"variation\": 0 }, \"offVariation\": 1, \"prerequisites\": [], \"_site\": { \"href\": \"/default/production/features/sort.order\", \"type\": \"text/html\" } } } } ``` You can add a date you want a user to be removed from the feature flag's user targets. For example, “remove user 1461797806429-33-861961230 from the user target for variation 0 on the Alternate sort order flag in the production environment on Wed Jul 08 2020 at 15:27:41 pm”. This is done using the following: ```json { \"comment\": \"update expiring user targets\", \"instructions\": [ { \"kind\": \"removeExpireUserTargetDate\", \"userKey\": \"userKey\", \"variationId\": \"978d53f9-7fe3-4a63-992d-97bcb4535dc8\" }, { \"kind\": \"updateExpireUserTargetDate\", \"userKey\": \"userKey2\", \"variationId\": \"978d53f9-7fe3-4a63-992d-97bcb4535dc8\", \"value\": 1587582000000 }, { \"kind\": \"addExpireUserTargetDate\", \"userKey\": \"userKey3\", \"variationId\": \"978d53f9-7fe3-4a63-992d-97bcb4535dc8\", \"value\": 1594247266386 } ] } ``` Here is another example. In this feature flag configuration: ```json { \"name\": \"New recommendations engine\", \"key\": \"engine.enable\", \"environments\": { \"test\": { \"on\": true } } } ``` You can change the feature flag's description with the following patch document as a set of executable instructions. For example, “add user X to targets for variation Y and remove user A from targets for variation B for test flag”: ```json { \"comment\": \"\", \"instructions\": [ { \"kind\": \"removeUserTargets\", \"values\": [\"438580d8-02ee-418d-9eec-0085cab2bdf0\"], \"variationId\": \"852cb784-54ff-46b9-8c35-5498d2e4f270\" }, { \"kind\": \"addUserTargets\", \"values\": [\"438580d8-02ee-418d-9eec-0085cab2bdf0\"], \"variationId\": \"1bb18465-33b6-49aa-a3bd-eeb6650b33ad\" } ] } ``` > ### Supported semantic patch API endpoints > > - [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) > - [Update expiring user targets on feature flag](/tag/Feature-flags#operation/patchExpiringUserTargets) > - [Update expiring user target for flags](/tag/User-settings#operation/patchExpiringFlagsForUser) > - [Update expiring user targets on segment](/tag/Segments#operation/patchExpiringUserTargetsForSegment) ## Errors The API always returns errors in a common format. Here's an example: ```json { \"code\": \"invalid_request\", \"message\": \"A feature with that key already exists\", \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\" } ``` The general class of error is indicated by the `code`. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly support to debug a problem with a specific API call. ### HTTP Status - Error Response Codes | Code | Definition | Desc. | Possible Solution | | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | 400 | Bad Request | A request that fails may return this HTTP response code. | Ensure JSON syntax in request body is correct. | | 401 | Unauthorized | User doesn't have permission to an API call. | Ensure your SDK key is good. | | 403 | Forbidden | User does not have permission for operation. | Ensure that the user or access token has proper permissions set. | | 409 | Conflict | The API request could not be completed because it conflicted with a concurrent API request. | Retry your request. | | 429 | Too many requests | See [Rate limiting](/#section/Rate-limiting). | Wait and try again later. | ## CORS The LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise, a wildcard is returned: `Access-Control-Allow-Origin: *`. For more information on CORS, see the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like: ```http Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH Access-Control-Allow-Origin: * Access-Control-Max-Age: 300 ``` You can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](#section/Authentication). If you’re using session auth, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted users. ## Rate limiting We use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs will return a `429` status code. Calls to our APIs will include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below. > ### Rate limiting and SDKs > > LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs. > > The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript. ### Global rate limits Authenticated requests are subject to a global limit. This is the maximum number of calls that can be made to the API per ten seconds. All personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits will return the headers below: | Header name | Description | | ------------------------------ | -------------------------------------------------------------------------------- | | `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | We do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit. ### Route-level rate limits Some authenticated routes have custom rate limits. These also reset every ten seconds. Any access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits will return the headers below: | Header name | Description | | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. | | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. | A _route_ represents a specific URL pattern and verb. For example, the [Delete environment](/tag/Environments#operation/deleteEnvironment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route. We do not publicly document the specific number of calls that can be made to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits. ### IP-based rate limiting We also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again. ## OpenAPI (Swagger) We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API. You can use this specification to generate client libraries to interact with our REST API in your language of choice. This specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to ease use in navigating the APIs in the tooling. ## Client libraries We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit [GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). ## Method Overriding Some firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `PUT`, `PATCH`, and `DELETE` verbs will be inaccessible. To avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to \"tunnel\" `PUT`, `PATCH`, and `DELETE` requests via a `POST` request. For example, if you wish to call one of our `PATCH` resources via a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header. ## Beta resources We sometimes release new API resources in **beta** status before we release them with general availability. Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible. We try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes. We mark beta resources with a \"Beta\" callout in our documentation, pictured below: > ### This feature is in beta > > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Beta-resources). ### Using beta resources To use a beta resource, you must include a header in the request. If you call a beta resource without this header, you'll receive a `403` response. Use this header: ``` LD-API-Version: beta ``` ## Versioning We try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly. Updates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace. ### Setting the API version per request You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below: ``` LD-API-Version: 20210729 ``` The header value is the version number of the API version you'd like to request. The number for each version corresponds to the date the version was released in yyyymmdd format. In the example above the version `20210729` corresponds to July 29, 2021. ### Setting the API version per access token When creating an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes. Tokens created before versioning was released have their version set to `20160426` (the version of the API that existed before versioning) so that they continue working the same way they did before versioning. If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above. > ### Best practice: Set the header for every client or integration > > We recommend that you set the API version header explicitly in any client or integration you build. > > Only rely on the access token API version during manual testing. ### API version changelog | Version | Changes | |---|---| | `20210729` | <ul><li>Changed the [create approval request](/tag/Approvals#operation/postApprovalRequest) return value. It now returns HTTP Status Code `201` instead of `200`.</li><li> Changed the [get users](/tag/Users#operation/getUser) return value. It now returns a user record, not a user. </li><li> Added additional optional fields to environment, segments, flags, members, and segments, including the ability to create Big Segments. </li><li> Added default values for flag variations when new environments are created. </li><li> Added filtering and pagination for getting flags and members, including `limit`, `number`, `filter`, and `sort` query parameters. </li><li> Added endpoints for expiring user targets for flags and segments, scheduled changes, access tokens, Relay Proxy configuration, integrations and subscriptions, and approvals. </li></ul> | | `20191212` | <ul><li>[List feature flags](/tag/Feature-flags#operation/getFeatureFlags) now defaults to sending summaries of feature flag configurations, equivalent to setting the query parameter `summary=true`. Summaries omit flag targeting rules and individual user targets from the payload. </li><li> Added endpoints for flags, flag status, projects, environments, users, audit logs, members, users, custom roles, segments, usage, streams, events, and data export. </li></ul> | | `20160426` | <ul><li>Initial versioning of API. Tokens created before versioning have their version set to this.</li></ul> |
API version: 2.0
Contact: support@launchdarkly.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package ldapi
import (
"encoding/json"
)
// AuditLogEntryListingRep struct for AuditLogEntryListingRep
type AuditLogEntryListingRep struct {
Links map[string]Link `json:"_links"`
Id string `json:"_id"`
AccountId string `json:"_accountId"`
Date int64 `json:"date"`
Accesses []ResourceAccess `json:"accesses"`
Kind string `json:"kind"`
Name string `json:"name"`
Description string `json:"description"`
ShortDescription string `json:"shortDescription"`
Comment *string `json:"comment,omitempty"`
Subject *SubjectDataRep `json:"subject,omitempty"`
Member *MemberDataRep `json:"member,omitempty"`
Token *TokenDataRep `json:"token,omitempty"`
App *AuthorizedAppDataRep `json:"app,omitempty"`
TitleVerb *string `json:"titleVerb,omitempty"`
Title *string `json:"title,omitempty"`
Target *TargetResourceRep `json:"target,omitempty"`
Parent *ParentResourceRep `json:"parent,omitempty"`
}
// NewAuditLogEntryListingRep instantiates a new AuditLogEntryListingRep object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAuditLogEntryListingRep(links map[string]Link, id string, accountId string, date int64, accesses []ResourceAccess, kind string, name string, description string, shortDescription string) *AuditLogEntryListingRep {
this := AuditLogEntryListingRep{}
this.Links = links
this.Id = id
this.AccountId = accountId
this.Date = date
this.Accesses = accesses
this.Kind = kind
this.Name = name
this.Description = description
this.ShortDescription = shortDescription
return &this
}
// NewAuditLogEntryListingRepWithDefaults instantiates a new AuditLogEntryListingRep object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAuditLogEntryListingRepWithDefaults() *AuditLogEntryListingRep {
this := AuditLogEntryListingRep{}
return &this
}
// GetLinks returns the Links field value
func (o *AuditLogEntryListingRep) GetLinks() map[string]Link {
if o == nil {
var ret map[string]Link
return ret
}
return o.Links
}
// GetLinksOk returns a tuple with the Links field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetLinksOk() (*map[string]Link, bool) {
if o == nil {
return nil, false
}
return &o.Links, true
}
// SetLinks sets field value
func (o *AuditLogEntryListingRep) SetLinks(v map[string]Link) {
o.Links = v
}
// GetId returns the Id field value
func (o *AuditLogEntryListingRep) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *AuditLogEntryListingRep) SetId(v string) {
o.Id = v
}
// GetAccountId returns the AccountId field value
func (o *AuditLogEntryListingRep) GetAccountId() string {
if o == nil {
var ret string
return ret
}
return o.AccountId
}
// GetAccountIdOk returns a tuple with the AccountId field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetAccountIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AccountId, true
}
// SetAccountId sets field value
func (o *AuditLogEntryListingRep) SetAccountId(v string) {
o.AccountId = v
}
// GetDate returns the Date field value
func (o *AuditLogEntryListingRep) GetDate() int64 {
if o == nil {
var ret int64
return ret
}
return o.Date
}
// GetDateOk returns a tuple with the Date field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetDateOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Date, true
}
// SetDate sets field value
func (o *AuditLogEntryListingRep) SetDate(v int64) {
o.Date = v
}
// GetAccesses returns the Accesses field value
func (o *AuditLogEntryListingRep) GetAccesses() []ResourceAccess {
if o == nil {
var ret []ResourceAccess
return ret
}
return o.Accesses
}
// GetAccessesOk returns a tuple with the Accesses field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetAccessesOk() (*[]ResourceAccess, bool) {
if o == nil {
return nil, false
}
return &o.Accesses, true
}
// SetAccesses sets field value
func (o *AuditLogEntryListingRep) SetAccesses(v []ResourceAccess) {
o.Accesses = v
}
// GetKind returns the Kind field value
func (o *AuditLogEntryListingRep) GetKind() string {
if o == nil {
var ret string
return ret
}
return o.Kind
}
// GetKindOk returns a tuple with the Kind field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetKindOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Kind, true
}
// SetKind sets field value
func (o *AuditLogEntryListingRep) SetKind(v string) {
o.Kind = v
}
// GetName returns the Name field value
func (o *AuditLogEntryListingRep) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *AuditLogEntryListingRep) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value
func (o *AuditLogEntryListingRep) GetDescription() string {
if o == nil {
var ret string
return ret
}
return o.Description
}
// GetDescriptionOk returns a tuple with the Description field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Description, true
}
// SetDescription sets field value
func (o *AuditLogEntryListingRep) SetDescription(v string) {
o.Description = v
}
// GetShortDescription returns the ShortDescription field value
func (o *AuditLogEntryListingRep) GetShortDescription() string {
if o == nil {
var ret string
return ret
}
return o.ShortDescription
}
// GetShortDescriptionOk returns a tuple with the ShortDescription field value
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetShortDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ShortDescription, true
}
// SetShortDescription sets field value
func (o *AuditLogEntryListingRep) SetShortDescription(v string) {
o.ShortDescription = v
}
// GetComment returns the Comment field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetComment() string {
if o == nil || o.Comment == nil {
var ret string
return ret
}
return *o.Comment
}
// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetCommentOk() (*string, bool) {
if o == nil || o.Comment == nil {
return nil, false
}
return o.Comment, true
}
// HasComment returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasComment() bool {
if o != nil && o.Comment != nil {
return true
}
return false
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *AuditLogEntryListingRep) SetComment(v string) {
o.Comment = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetSubject() SubjectDataRep {
if o == nil || o.Subject == nil {
var ret SubjectDataRep
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetSubjectOk() (*SubjectDataRep, bool) {
if o == nil || o.Subject == nil {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasSubject() bool {
if o != nil && o.Subject != nil {
return true
}
return false
}
// SetSubject gets a reference to the given SubjectDataRep and assigns it to the Subject field.
func (o *AuditLogEntryListingRep) SetSubject(v SubjectDataRep) {
o.Subject = &v
}
// GetMember returns the Member field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetMember() MemberDataRep {
if o == nil || o.Member == nil {
var ret MemberDataRep
return ret
}
return *o.Member
}
// GetMemberOk returns a tuple with the Member field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetMemberOk() (*MemberDataRep, bool) {
if o == nil || o.Member == nil {
return nil, false
}
return o.Member, true
}
// HasMember returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasMember() bool {
if o != nil && o.Member != nil {
return true
}
return false
}
// SetMember gets a reference to the given MemberDataRep and assigns it to the Member field.
func (o *AuditLogEntryListingRep) SetMember(v MemberDataRep) {
o.Member = &v
}
// GetToken returns the Token field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetToken() TokenDataRep {
if o == nil || o.Token == nil {
var ret TokenDataRep
return ret
}
return *o.Token
}
// GetTokenOk returns a tuple with the Token field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetTokenOk() (*TokenDataRep, bool) {
if o == nil || o.Token == nil {
return nil, false
}
return o.Token, true
}
// HasToken returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasToken() bool {
if o != nil && o.Token != nil {
return true
}
return false
}
// SetToken gets a reference to the given TokenDataRep and assigns it to the Token field.
func (o *AuditLogEntryListingRep) SetToken(v TokenDataRep) {
o.Token = &v
}
// GetApp returns the App field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetApp() AuthorizedAppDataRep {
if o == nil || o.App == nil {
var ret AuthorizedAppDataRep
return ret
}
return *o.App
}
// GetAppOk returns a tuple with the App field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetAppOk() (*AuthorizedAppDataRep, bool) {
if o == nil || o.App == nil {
return nil, false
}
return o.App, true
}
// HasApp returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasApp() bool {
if o != nil && o.App != nil {
return true
}
return false
}
// SetApp gets a reference to the given AuthorizedAppDataRep and assigns it to the App field.
func (o *AuditLogEntryListingRep) SetApp(v AuthorizedAppDataRep) {
o.App = &v
}
// GetTitleVerb returns the TitleVerb field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetTitleVerb() string {
if o == nil || o.TitleVerb == nil {
var ret string
return ret
}
return *o.TitleVerb
}
// GetTitleVerbOk returns a tuple with the TitleVerb field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetTitleVerbOk() (*string, bool) {
if o == nil || o.TitleVerb == nil {
return nil, false
}
return o.TitleVerb, true
}
// HasTitleVerb returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasTitleVerb() bool {
if o != nil && o.TitleVerb != nil {
return true
}
return false
}
// SetTitleVerb gets a reference to the given string and assigns it to the TitleVerb field.
func (o *AuditLogEntryListingRep) SetTitleVerb(v string) {
o.TitleVerb = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetTitle() string {
if o == nil || o.Title == nil {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetTitleOk() (*string, bool) {
if o == nil || o.Title == nil {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasTitle() bool {
if o != nil && o.Title != nil {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *AuditLogEntryListingRep) SetTitle(v string) {
o.Title = &v
}
// GetTarget returns the Target field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetTarget() TargetResourceRep {
if o == nil || o.Target == nil {
var ret TargetResourceRep
return ret
}
return *o.Target
}
// GetTargetOk returns a tuple with the Target field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetTargetOk() (*TargetResourceRep, bool) {
if o == nil || o.Target == nil {
return nil, false
}
return o.Target, true
}
// HasTarget returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasTarget() bool {
if o != nil && o.Target != nil {
return true
}
return false
}
// SetTarget gets a reference to the given TargetResourceRep and assigns it to the Target field.
func (o *AuditLogEntryListingRep) SetTarget(v TargetResourceRep) {
o.Target = &v
}
// GetParent returns the Parent field value if set, zero value otherwise.
func (o *AuditLogEntryListingRep) GetParent() ParentResourceRep {
if o == nil || o.Parent == nil {
var ret ParentResourceRep
return ret
}
return *o.Parent
}
// GetParentOk returns a tuple with the Parent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AuditLogEntryListingRep) GetParentOk() (*ParentResourceRep, bool) {
if o == nil || o.Parent == nil {
return nil, false
}
return o.Parent, true
}
// HasParent returns a boolean if a field has been set.
func (o *AuditLogEntryListingRep) HasParent() bool {
if o != nil && o.Parent != nil {
return true
}
return false
}
// SetParent gets a reference to the given ParentResourceRep and assigns it to the Parent field.
func (o *AuditLogEntryListingRep) SetParent(v ParentResourceRep) {
o.Parent = &v
}
func (o AuditLogEntryListingRep) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["_links"] = o.Links
}
if true {
toSerialize["_id"] = o.Id
}
if true {
toSerialize["_accountId"] = o.AccountId
}
if true {
toSerialize["date"] = o.Date
}
if true {
toSerialize["accesses"] = o.Accesses
}
if true {
toSerialize["kind"] = o.Kind
}
if true {
toSerialize["name"] = o.Name
}
if true {
toSerialize["description"] = o.Description
}
if true {
toSerialize["shortDescription"] = o.ShortDescription
}
if o.Comment != nil {
toSerialize["comment"] = o.Comment
}
if o.Subject != nil {
toSerialize["subject"] = o.Subject
}
if o.Member != nil {
toSerialize["member"] = o.Member
}
if o.Token != nil {
toSerialize["token"] = o.Token
}
if o.App != nil {
toSerialize["app"] = o.App
}
if o.TitleVerb != nil {
toSerialize["titleVerb"] = o.TitleVerb
}
if o.Title != nil {
toSerialize["title"] = o.Title
}
if o.Target != nil {
toSerialize["target"] = o.Target
}
if o.Parent != nil {
toSerialize["parent"] = o.Parent
}
return json.Marshal(toSerialize)
}
type NullableAuditLogEntryListingRep struct {
value *AuditLogEntryListingRep
isSet bool
}
func (v NullableAuditLogEntryListingRep) Get() *AuditLogEntryListingRep {
return v.value
}
func (v *NullableAuditLogEntryListingRep) Set(val *AuditLogEntryListingRep) {
v.value = val
v.isSet = true
}
func (v NullableAuditLogEntryListingRep) IsSet() bool {
return v.isSet
}
func (v *NullableAuditLogEntryListingRep) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuditLogEntryListingRep(val *AuditLogEntryListingRep) *NullableAuditLogEntryListingRep {
return &NullableAuditLogEntryListingRep{value: val, isSet: true}
}
func (v NullableAuditLogEntryListingRep) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuditLogEntryListingRep) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}