incidentcomments

package
v0.20240208.1160128 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The incidentcomments SDK allows for interaction with the Azure Resource Manager Service securityinsights (API Version 2021-09-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/2021-09-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.NewCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "incidentCommentIdValue")

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.NewCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "incidentCommentIdValue")

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.NewCommentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "incidentIdValue", "incidentCommentIdValue")

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", "workspaceValue", "incidentIdValue")

// 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 ValidateCommentID

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

ValidateCommentID checks that 'input' can be parsed as a 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 CommentId

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

CommentId is a struct representing the Resource ID for a Comment

func NewCommentID

func NewCommentID(subscriptionId string, resourceGroupName string, workspaceName string, incidentId string, incidentCommentId string) CommentId

NewCommentID returns a new CommentId struct

func ParseCommentID

func ParseCommentID(input string) (*CommentId, error)

ParseCommentID parses 'input' into a CommentId

func ParseCommentIDInsensitively

func ParseCommentIDInsensitively(input string) (*CommentId, error)

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

func (*CommentId) FromParseResult

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

func (CommentId) ID

func (id CommentId) ID() string

ID returns the formatted Comment ID

func (CommentId) Segments

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

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

func (CommentId) String

func (id CommentId) String() string

String returns a human-readable description of this Comment ID

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	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 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 autorest.Client
	// contains filtered or unexported fields
}

func NewIncidentCommentsClientWithBaseURI

func NewIncidentCommentsClientWithBaseURI(endpoint string) IncidentCommentsClient

func (IncidentCommentsClient) CreateOrUpdate

CreateOrUpdate ...

func (IncidentCommentsClient) Delete

Delete ...

func (IncidentCommentsClient) Get

Get ...

func (IncidentCommentsClient) List

List ...

func (IncidentCommentsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (IncidentCommentsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type IncidentId

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

IncidentId is a struct representing the Resource ID for a Incident

func NewIncidentID

func NewIncidentID(subscriptionId string, resourceGroupName string, workspaceName string, incidentId 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 {
	Items []IncidentComment
}

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]IncidentComment
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

Jump to

Keyboard shortcuts

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