-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d367d68
commit f61cf97
Showing
24 changed files
with
5,265 additions
and
2,401 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...auditlog/streams/item/with_stream_escaped_put_request_body_escaped_stream_escaped_type.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package item | ||
// The audit log streaming provider. The name is case sensitive. | ||
type WithStream_PutRequestBody_stream_type int | ||
|
||
const ( | ||
AZUREBLOBSTORAGE_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE WithStream_PutRequestBody_stream_type = iota | ||
AZUREEVENTHUBS_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
AMAZONS3_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
SPLUNK_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
HTTPSEVENTCOLLECTOR_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
GOOGLECLOUDSTORAGE_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
DATADOG_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
) | ||
|
||
func (i WithStream_PutRequestBody_stream_type) String() string { | ||
return []string{"Azure Blob Storage", "Azure Event Hubs", "Amazon S3", "Splunk", "HTTPS Event Collector", "Google Cloud Storage", "Datadog"}[i] | ||
} | ||
func ParseWithStream_PutRequestBody_stream_type(v string) (any, error) { | ||
result := AZUREBLOBSTORAGE_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
switch v { | ||
case "Azure Blob Storage": | ||
result = AZUREBLOBSTORAGE_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
case "Azure Event Hubs": | ||
result = AZUREEVENTHUBS_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
case "Amazon S3": | ||
result = AMAZONS3_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
case "Splunk": | ||
result = SPLUNK_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
case "HTTPS Event Collector": | ||
result = HTTPSEVENTCOLLECTOR_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
case "Google Cloud Storage": | ||
result = GOOGLECLOUDSTORAGE_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
case "Datadog": | ||
result = DATADOG_WITHSTREAM_PUTREQUESTBODY_STREAM_TYPE | ||
default: | ||
return nil, nil | ||
} | ||
return &result, nil | ||
} | ||
func SerializeWithStream_PutRequestBody_stream_type(values []WithStream_PutRequestBody_stream_type) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i WithStream_PutRequestBody_stream_type) isMultiValue() bool { | ||
return false | ||
} |
49 changes: 49 additions & 0 deletions
49
...nterprises/item/auditlog/streams/streams_post_request_body_escaped_stream_escaped_type.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package streams | ||
// The audit log streaming provider. The name is case sensitive. | ||
type StreamsPostRequestBody_stream_type int | ||
|
||
const ( | ||
AZUREBLOBSTORAGE_STREAMSPOSTREQUESTBODY_STREAM_TYPE StreamsPostRequestBody_stream_type = iota | ||
AZUREEVENTHUBS_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
AMAZONS3_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
SPLUNK_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
HTTPSEVENTCOLLECTOR_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
GOOGLECLOUDSTORAGE_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
DATADOG_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
) | ||
|
||
func (i StreamsPostRequestBody_stream_type) String() string { | ||
return []string{"Azure Blob Storage", "Azure Event Hubs", "Amazon S3", "Splunk", "HTTPS Event Collector", "Google Cloud Storage", "Datadog"}[i] | ||
} | ||
func ParseStreamsPostRequestBody_stream_type(v string) (any, error) { | ||
result := AZUREBLOBSTORAGE_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
switch v { | ||
case "Azure Blob Storage": | ||
result = AZUREBLOBSTORAGE_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
case "Azure Event Hubs": | ||
result = AZUREEVENTHUBS_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
case "Amazon S3": | ||
result = AMAZONS3_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
case "Splunk": | ||
result = SPLUNK_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
case "HTTPS Event Collector": | ||
result = HTTPSEVENTCOLLECTOR_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
case "Google Cloud Storage": | ||
result = GOOGLECLOUDSTORAGE_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
case "Datadog": | ||
result = DATADOG_STREAMSPOSTREQUESTBODY_STREAM_TYPE | ||
default: | ||
return nil, nil | ||
} | ||
return &result, nil | ||
} | ||
func SerializeStreamsPostRequestBody_stream_type(values []StreamsPostRequestBody_stream_type) []string { | ||
result := make([]string, len(values)) | ||
for i, v := range values { | ||
result[i] = v.String() | ||
} | ||
return result | ||
} | ||
func (i StreamsPostRequestBody_stream_type) isMultiValue() bool { | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
pkg/github/enterprises/item_audit_log_stream_key_request_builder.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package enterprises | ||
|
||
import ( | ||
"context" | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d "github.com/octokit/go-sdk-enterprise-cloud/pkg/github/models" | ||
) | ||
|
||
// ItemAuditLogStreamKeyRequestBuilder builds and executes requests for operations under \enterprises\{enterprise}\audit-log\stream-key | ||
type ItemAuditLogStreamKeyRequestBuilder struct { | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder | ||
} | ||
// NewItemAuditLogStreamKeyRequestBuilderInternal instantiates a new ItemAuditLogStreamKeyRequestBuilder and sets the default values. | ||
func NewItemAuditLogStreamKeyRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuditLogStreamKeyRequestBuilder) { | ||
m := &ItemAuditLogStreamKeyRequestBuilder{ | ||
BaseRequestBuilder: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewBaseRequestBuilder(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/stream-key", pathParameters), | ||
} | ||
return m | ||
} | ||
// NewItemAuditLogStreamKeyRequestBuilder instantiates a new ItemAuditLogStreamKeyRequestBuilder and sets the default values. | ||
func NewItemAuditLogStreamKeyRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*ItemAuditLogStreamKeyRequestBuilder) { | ||
urlParams := make(map[string]string) | ||
urlParams["request-raw-url"] = rawUrl | ||
return NewItemAuditLogStreamKeyRequestBuilderInternal(urlParams, requestAdapter) | ||
} | ||
// Get retrieves the audit log streaming public key for encrypting secrets.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." | ||
// returns a AuditLogStreamKeyable when successful | ||
// [API method documentation] | ||
// | ||
// [API method documentation]: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#get-the-audit-log-stream-key-for-encrypting-secrets | ||
func (m *ItemAuditLogStreamKeyRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogStreamKeyable, error) { | ||
requestInfo, err := m.ToGetRequestInformation(ctx, requestConfiguration); | ||
if err != nil { | ||
return nil, err | ||
} | ||
res, err := m.BaseRequestBuilder.RequestAdapter.Send(ctx, requestInfo, i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.CreateAuditLogStreamKeyFromDiscriminatorValue, nil) | ||
if err != nil { | ||
return nil, err | ||
} | ||
if res == nil { | ||
return nil, nil | ||
} | ||
return res.(i65c45deea5ef786561f9cd3a81f83eacee03df1f39b7b57e269c7f0477b77b5d.AuditLogStreamKeyable), nil | ||
} | ||
// ToGetRequestInformation retrieves the audit log streaming public key for encrypting secrets.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." | ||
// returns a *RequestInformation when successful | ||
func (m *ItemAuditLogStreamKeyRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) { | ||
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters) | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ConfigureRequestInformation(requestInfo, requestConfiguration) | ||
requestInfo.Headers.TryAdd("Accept", "application/json") | ||
return requestInfo, nil | ||
} | ||
// WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. | ||
// returns a *ItemAuditLogStreamKeyRequestBuilder when successful | ||
func (m *ItemAuditLogStreamKeyRequestBuilder) WithUrl(rawUrl string)(*ItemAuditLogStreamKeyRequestBuilder) { | ||
return NewItemAuditLogStreamKeyRequestBuilder(rawUrl, m.BaseRequestBuilder.RequestAdapter); | ||
} |
94 changes: 94 additions & 0 deletions
94
pkg/github/enterprises/item_audit_log_streams_item_get_audit_log_stream_config422_error.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
package enterprises | ||
|
||
import ( | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" | ||
) | ||
|
||
type ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error struct { | ||
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError | ||
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
additionalData map[string]any | ||
// The errors property | ||
errors []string | ||
} | ||
// NewItemAuditLogStreamsItemGetAuditLogStreamConfig422Error instantiates a new ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error and sets the default values. | ||
func NewItemAuditLogStreamsItemGetAuditLogStreamConfig422Error()(*ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) { | ||
m := &ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error{ | ||
ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), | ||
} | ||
m.SetAdditionalData(make(map[string]any)) | ||
return m | ||
} | ||
// CreateItemAuditLogStreamsItemGetAuditLogStreamConfig422ErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value | ||
// returns a Parsable when successful | ||
func CreateItemAuditLogStreamsItemGetAuditLogStreamConfig422ErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { | ||
return NewItemAuditLogStreamsItemGetAuditLogStreamConfig422Error(), nil | ||
} | ||
// Error the primary error message. | ||
// returns a string when successful | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) Error()(string) { | ||
return m.ApiError.Error() | ||
} | ||
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
// returns a map[string]any when successful | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) GetAdditionalData()(map[string]any) { | ||
return m.additionalData | ||
} | ||
// GetErrors gets the errors property value. The errors property | ||
// returns a []string when successful | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) GetErrors()([]string) { | ||
return m.errors | ||
} | ||
// GetFieldDeserializers the deserialization information for the current model | ||
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { | ||
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) | ||
res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { | ||
val, err := n.GetCollectionOfPrimitiveValues("string") | ||
if err != nil { | ||
return err | ||
} | ||
if val != nil { | ||
res := make([]string, len(val)) | ||
for i, v := range val { | ||
if v != nil { | ||
res[i] = *(v.(*string)) | ||
} | ||
} | ||
m.SetErrors(res) | ||
} | ||
return nil | ||
} | ||
return res | ||
} | ||
// Serialize serializes information the current object | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { | ||
if m.GetErrors() != nil { | ||
err := writer.WriteCollectionOfStringValues("errors", m.GetErrors()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
{ | ||
err := writer.WriteAdditionalData(m.GetAdditionalData()) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
return nil | ||
} | ||
// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) SetAdditionalData(value map[string]any)() { | ||
m.additionalData = value | ||
} | ||
// SetErrors sets the errors property value. The errors property | ||
func (m *ItemAuditLogStreamsItemGetAuditLogStreamConfig422Error) SetErrors(value []string)() { | ||
m.errors = value | ||
} | ||
type ItemAuditLogStreamsItemGetAuditLogStreamConfig422Errorable interface { | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder | ||
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable | ||
GetErrors()([]string) | ||
SetErrors(value []string)() | ||
} |
Oops, something went wrong.