incidentcomments

package
v0.20241212.1154051 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/incidentcomments Documentation

The incidentcomments SDK allows for interaction with Azure Resource Manager securityinsights (API Version 2023-12-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/incidentcomments"

Client Initialization

client := incidentcomments.NewIncidentCommentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: IncidentCommentsClient.CreateOrUpdate

ctx := context.TODO()
id := incidentcomments.NewIncidentCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "incidentId", "incidentCommentId")

payload := incidentcomments.IncidentComment{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: IncidentCommentsClient.Delete

ctx := context.TODO()
id := incidentcomments.NewIncidentCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "incidentId", "incidentCommentId")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: IncidentCommentsClient.Get

ctx := context.TODO()
id := incidentcomments.NewIncidentCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "incidentId", "incidentCommentId")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: IncidentCommentsClient.List

ctx := context.TODO()
id := incidentcomments.NewIncidentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "incidentIdentifier")

// alternatively `client.List(ctx, id, incidentcomments.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, incidentcomments.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateIncidentCommentID

func ValidateIncidentCommentID(input interface{}, key string) (warnings []string, errors []error)

ValidateIncidentCommentID checks that 'input' can be parsed as a Incident Comment ID

func ValidateIncidentID

func ValidateIncidentID(input interface{}, key string) (warnings []string, errors []error)

ValidateIncidentID checks that 'input' can be parsed as a Incident ID

Types

type ClientInfo

type ClientInfo struct {
	Email             *string `json:"email,omitempty"`
	Name              *string `json:"name,omitempty"`
	ObjectId          *string `json:"objectId,omitempty"`
	UserPrincipalName *string `json:"userPrincipalName,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IncidentComment
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *IncidentComment
}

type IncidentComment

type IncidentComment struct {
	Etag       *string                    `json:"etag,omitempty"`
	Id         *string                    `json:"id,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *IncidentCommentProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData     `json:"systemData,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type IncidentCommentId

type IncidentCommentId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	IncidentId        string
	IncidentCommentId string
}

IncidentCommentId is a struct representing the Resource ID for a Incident Comment

func NewIncidentCommentID

func NewIncidentCommentID(subscriptionId string, resourceGroupName string, workspaceName string, incidentId string, incidentCommentId string) IncidentCommentId

NewIncidentCommentID returns a new IncidentCommentId struct

func ParseIncidentCommentID

func ParseIncidentCommentID(input string) (*IncidentCommentId, error)

ParseIncidentCommentID parses 'input' into a IncidentCommentId

func ParseIncidentCommentIDInsensitively

func ParseIncidentCommentIDInsensitively(input string) (*IncidentCommentId, error)

ParseIncidentCommentIDInsensitively parses 'input' case-insensitively into a IncidentCommentId note: this method should only be used for API response data and not user input

func (*IncidentCommentId) FromParseResult

func (id *IncidentCommentId) FromParseResult(input resourceids.ParseResult) error

func (IncidentCommentId) ID

func (id IncidentCommentId) ID() string

ID returns the formatted Incident Comment ID

func (IncidentCommentId) Segments

func (id IncidentCommentId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Incident Comment ID

func (IncidentCommentId) String

func (id IncidentCommentId) String() string

String returns a human-readable description of this Incident Comment ID

type IncidentCommentOperationPredicate

type IncidentCommentOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (IncidentCommentOperationPredicate) Matches

type IncidentCommentProperties

type IncidentCommentProperties struct {
	Author              *ClientInfo `json:"author,omitempty"`
	CreatedTimeUtc      *string     `json:"createdTimeUtc,omitempty"`
	LastModifiedTimeUtc *string     `json:"lastModifiedTimeUtc,omitempty"`
	Message             string      `json:"message"`
}

func (*IncidentCommentProperties) GetCreatedTimeUtcAsTime

func (o *IncidentCommentProperties) GetCreatedTimeUtcAsTime() (*time.Time, error)

func (*IncidentCommentProperties) GetLastModifiedTimeUtcAsTime

func (o *IncidentCommentProperties) GetLastModifiedTimeUtcAsTime() (*time.Time, error)

func (*IncidentCommentProperties) SetCreatedTimeUtcAsTime

func (o *IncidentCommentProperties) SetCreatedTimeUtcAsTime(input time.Time)

func (*IncidentCommentProperties) SetLastModifiedTimeUtcAsTime

func (o *IncidentCommentProperties) SetLastModifiedTimeUtcAsTime(input time.Time)

type IncidentCommentsClient

type IncidentCommentsClient struct {
	Client *resourcemanager.Client
}

func NewIncidentCommentsClientWithBaseURI

func NewIncidentCommentsClientWithBaseURI(sdkApi sdkEnv.Api) (*IncidentCommentsClient, error)

func (IncidentCommentsClient) CreateOrUpdate

CreateOrUpdate ...

func (IncidentCommentsClient) Delete

Delete ...

func (IncidentCommentsClient) Get

Get ...

func (IncidentCommentsClient) List

List ...

func (IncidentCommentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (IncidentCommentsClient) ListCompleteMatchingPredicate

func (c IncidentCommentsClient) ListCompleteMatchingPredicate(ctx context.Context, id IncidentId, options ListOperationOptions, predicate IncidentCommentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type IncidentId

type IncidentId struct {
	SubscriptionId     string
	ResourceGroupName  string
	WorkspaceName      string
	IncidentIdentifier string
}

IncidentId is a struct representing the Resource ID for a Incident

func NewIncidentID

func NewIncidentID(subscriptionId string, resourceGroupName string, workspaceName string, incidentIdentifier string) IncidentId

NewIncidentID returns a new IncidentId struct

func ParseIncidentID

func ParseIncidentID(input string) (*IncidentId, error)

ParseIncidentID parses 'input' into a IncidentId

func ParseIncidentIDInsensitively

func ParseIncidentIDInsensitively(input string) (*IncidentId, error)

ParseIncidentIDInsensitively parses 'input' case-insensitively into a IncidentId note: this method should only be used for API response data and not user input

func (*IncidentId) FromParseResult

func (id *IncidentId) FromParseResult(input resourceids.ParseResult) error

func (IncidentId) ID

func (id IncidentId) ID() string

ID returns the formatted Incident ID

func (IncidentId) Segments

func (id IncidentId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Incident ID

func (IncidentId) String

func (id IncidentId) String() string

String returns a human-readable description of this Incident ID

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []IncidentComment
}

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]IncidentComment
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL