recommendation

package
v0.20241111.1164443 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/directory/beta/recommendation Documentation

The recommendation SDK allows for interaction with Microsoft Graph directory (API Version beta).

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/microsoft-graph/directory/beta/recommendation"

Client Initialization

client := recommendation.NewRecommendationClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: RecommendationClient.CreateRecommendation

ctx := context.TODO()

payload := recommendation.Recommendation{
	// ...
}


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

Example Usage: RecommendationClient.CreateRecommendationComplete

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

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

Example Usage: RecommendationClient.CreateRecommendationPostpone

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

payload := recommendation.CreateRecommendationPostponeRequest{
	// ...
}


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

Example Usage: RecommendationClient.CreateRecommendationReactivate

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

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

Example Usage: RecommendationClient.DeleteRecommendation

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

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

Example Usage: RecommendationClient.DismissRecommendation

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

payload := recommendation.DismissRecommendationRequest{
	// ...
}


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

Example Usage: RecommendationClient.GetRecommendation

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

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

Example Usage: RecommendationClient.GetRecommendationsCount

ctx := context.TODO()


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

Example Usage: RecommendationClient.ListRecommendations

ctx := context.TODO()


// alternatively `client.ListRecommendations(ctx, recommendation.DefaultListRecommendationsOperationOptions())` can be used to do batched pagination
items, err := client.ListRecommendationsComplete(ctx, recommendation.DefaultListRecommendationsOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: RecommendationClient.UpdateRecommendation

ctx := context.TODO()
id := recommendation.NewDirectoryRecommendationID("recommendationId")

payload := recommendation.Recommendation{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRecommendationCompleteOperationOptions

type CreateRecommendationCompleteOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateRecommendationCompleteOperationOptions

func DefaultCreateRecommendationCompleteOperationOptions() CreateRecommendationCompleteOperationOptions

func (CreateRecommendationCompleteOperationOptions) ToHeaders

func (CreateRecommendationCompleteOperationOptions) ToOData

func (CreateRecommendationCompleteOperationOptions) ToQuery

type CreateRecommendationCompleteOperationResponse

type CreateRecommendationCompleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Recommendation
}

type CreateRecommendationOperationOptions

type CreateRecommendationOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateRecommendationOperationOptions

func DefaultCreateRecommendationOperationOptions() CreateRecommendationOperationOptions

func (CreateRecommendationOperationOptions) ToHeaders

func (CreateRecommendationOperationOptions) ToOData

func (CreateRecommendationOperationOptions) ToQuery

type CreateRecommendationOperationResponse

type CreateRecommendationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Recommendation
}

type CreateRecommendationPostponeOperationOptions

type CreateRecommendationPostponeOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateRecommendationPostponeOperationOptions

func DefaultCreateRecommendationPostponeOperationOptions() CreateRecommendationPostponeOperationOptions

func (CreateRecommendationPostponeOperationOptions) ToHeaders

func (CreateRecommendationPostponeOperationOptions) ToOData

func (CreateRecommendationPostponeOperationOptions) ToQuery

type CreateRecommendationPostponeOperationResponse

type CreateRecommendationPostponeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Recommendation
}

type CreateRecommendationPostponeRequest

type CreateRecommendationPostponeRequest struct {
	PostponeUntilDateTime *string `json:"postponeUntilDateTime,omitempty"`
}

type CreateRecommendationReactivateOperationOptions

type CreateRecommendationReactivateOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateRecommendationReactivateOperationOptions

func DefaultCreateRecommendationReactivateOperationOptions() CreateRecommendationReactivateOperationOptions

func (CreateRecommendationReactivateOperationOptions) ToHeaders

func (CreateRecommendationReactivateOperationOptions) ToOData

func (CreateRecommendationReactivateOperationOptions) ToQuery

type CreateRecommendationReactivateOperationResponse

type CreateRecommendationReactivateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Recommendation
}

type DeleteRecommendationOperationOptions

type DeleteRecommendationOperationOptions struct {
	IfMatch   *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultDeleteRecommendationOperationOptions

func DefaultDeleteRecommendationOperationOptions() DeleteRecommendationOperationOptions

func (DeleteRecommendationOperationOptions) ToHeaders

func (DeleteRecommendationOperationOptions) ToOData

func (DeleteRecommendationOperationOptions) ToQuery

type DeleteRecommendationOperationResponse

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

type DismissRecommendationOperationOptions

type DismissRecommendationOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultDismissRecommendationOperationOptions

func DefaultDismissRecommendationOperationOptions() DismissRecommendationOperationOptions

func (DismissRecommendationOperationOptions) ToHeaders

func (DismissRecommendationOperationOptions) ToOData

func (DismissRecommendationOperationOptions) ToQuery

type DismissRecommendationOperationResponse

type DismissRecommendationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Recommendation
}

type DismissRecommendationRequest

type DismissRecommendationRequest struct {
	DismissReason nullable.Type[string] `json:"dismissReason,omitempty"`
}

type GetRecommendationOperationOptions

type GetRecommendationOperationOptions struct {
	Expand    *odata.Expand
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Select    *[]string
}

func DefaultGetRecommendationOperationOptions

func DefaultGetRecommendationOperationOptions() GetRecommendationOperationOptions

func (GetRecommendationOperationOptions) ToHeaders

func (GetRecommendationOperationOptions) ToOData

func (GetRecommendationOperationOptions) ToQuery

type GetRecommendationOperationResponse

type GetRecommendationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Recommendation
}

type GetRecommendationsCountOperationOptions

type GetRecommendationsCountOperationOptions struct {
	Filter    *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Search    *string
}

func DefaultGetRecommendationsCountOperationOptions

func DefaultGetRecommendationsCountOperationOptions() GetRecommendationsCountOperationOptions

func (GetRecommendationsCountOperationOptions) ToHeaders

func (GetRecommendationsCountOperationOptions) ToOData

func (GetRecommendationsCountOperationOptions) ToQuery

type GetRecommendationsCountOperationResponse

type GetRecommendationsCountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]byte
}

type ListRecommendationsCompleteResult

type ListRecommendationsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.Recommendation
}

type ListRecommendationsCustomPager

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

type ListRecommendationsOperationOptions

type ListRecommendationsOperationOptions struct {
	Count     *bool
	Expand    *odata.Expand
	Filter    *string
	Metadata  *odata.Metadata
	OrderBy   *odata.OrderBy
	RetryFunc client.RequestRetryFunc
	Search    *string
	Select    *[]string
	Skip      *int64
	Top       *int64
}

func DefaultListRecommendationsOperationOptions

func DefaultListRecommendationsOperationOptions() ListRecommendationsOperationOptions

func (ListRecommendationsOperationOptions) ToHeaders

func (ListRecommendationsOperationOptions) ToOData

func (ListRecommendationsOperationOptions) ToQuery

type ListRecommendationsOperationResponse

type ListRecommendationsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.Recommendation
}

type RecommendationClient

type RecommendationClient struct {
	Client *msgraph.Client
}

func NewRecommendationClientWithBaseURI

func NewRecommendationClientWithBaseURI(sdkApi sdkEnv.Api) (*RecommendationClient, error)

func (RecommendationClient) CreateRecommendation

CreateRecommendation - Create new navigation property to recommendations for directory

func (RecommendationClient) CreateRecommendationComplete

CreateRecommendationComplete - Invoke action complete. Complete a recommendation object and update its status to completedByUser.

func (RecommendationClient) CreateRecommendationPostpone

CreateRecommendationPostpone - Invoke action postpone. Postpone action on a recommendation object to a specified future date and time by marking its status as postponed. On the date and time provided, Microsoft Entra ID will automatically update the status of the recommendation object to active again.

func (RecommendationClient) CreateRecommendationReactivate

CreateRecommendationReactivate - Invoke action reactivate. Reactivate a completed, dismissed, or postponed recommendation object. This action updates the status of the recommendation to active. This method only works when the status of the recommendation is completedByUser, dismissed, or postponed.

func (RecommendationClient) DeleteRecommendation

DeleteRecommendation - Delete navigation property recommendations for directory

func (RecommendationClient) DismissRecommendation

DismissRecommendation - Invoke action dismiss. Dismiss a recommendation object that you consider to be inapplicable to your tenant and update its status to dismissed .

func (RecommendationClient) GetRecommendation

GetRecommendation - Get recommendation. Read the properties and relationships of a recommendation object.

func (RecommendationClient) GetRecommendationsCount

GetRecommendationsCount - Get the number of the resource

func (RecommendationClient) ListRecommendations

ListRecommendations - List recommendations. Get a list of the recommendation objects and their properties.

func (RecommendationClient) ListRecommendationsComplete

ListRecommendationsComplete retrieves all the results into a single object

func (RecommendationClient) ListRecommendationsCompleteMatchingPredicate

func (c RecommendationClient) ListRecommendationsCompleteMatchingPredicate(ctx context.Context, options ListRecommendationsOperationOptions, predicate RecommendationOperationPredicate) (result ListRecommendationsCompleteResult, err error)

ListRecommendationsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RecommendationClient) UpdateRecommendation

UpdateRecommendation - Update the navigation property recommendations in directory

type RecommendationOperationPredicate

type RecommendationOperationPredicate struct {
}

func (RecommendationOperationPredicate) Matches

type UpdateRecommendationOperationOptions

type UpdateRecommendationOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultUpdateRecommendationOperationOptions

func DefaultUpdateRecommendationOperationOptions() UpdateRecommendationOperationOptions

func (UpdateRecommendationOperationOptions) ToHeaders

func (UpdateRecommendationOperationOptions) ToOData

func (UpdateRecommendationOperationOptions) ToQuery

type UpdateRecommendationOperationResponse

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

Jump to

Keyboard shortcuts

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