intent

package
v0.20241126.1723 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/devicemanagement/beta/intent Documentation

The intent SDK allows for interaction with Microsoft Graph devicemanagement (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/devicemanagement/beta/intent"

Client Initialization

client := intent.NewIntentClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: IntentClient.AssignIntent

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

payload := intent.AssignIntentRequest{
	// ...
}


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

Example Usage: IntentClient.CreateIntent

ctx := context.TODO()

payload := intent.DeviceManagementIntent{
	// ...
}


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

Example Usage: IntentClient.CreateIntentCopy

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

payload := intent.CreateIntentCopyRequest{
	// ...
}


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

Example Usage: IntentClient.CreateIntentMigrateToTemplate

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

payload := intent.CreateIntentMigrateToTemplateRequest{
	// ...
}


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

Example Usage: IntentClient.DeleteIntent

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

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

Example Usage: IntentClient.GetIntent

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

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

Example Usage: IntentClient.GetIntentsCount

ctx := context.TODO()


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

Example Usage: IntentClient.ListIntents

ctx := context.TODO()


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

Example Usage: IntentClient.UpdateIntent

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

payload := intent.DeviceManagementIntent{
	// ...
}


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

Example Usage: IntentClient.UpdateIntentSettings

ctx := context.TODO()
id := intent.NewDeviceManagementIntentID("deviceManagementIntentId")

payload := intent.UpdateIntentSettingsRequest{
	// ...
}


read, err := client.UpdateIntentSettings(ctx, id, payload, intent.DefaultUpdateIntentSettingsOperationOptions())
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 AssignIntentOperationOptions

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

func DefaultAssignIntentOperationOptions

func DefaultAssignIntentOperationOptions() AssignIntentOperationOptions

func (AssignIntentOperationOptions) ToHeaders

func (AssignIntentOperationOptions) ToOData

func (AssignIntentOperationOptions) ToQuery

type AssignIntentOperationResponse

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

type AssignIntentRequest

type AssignIntentRequest struct {
	Assignments *[]beta.DeviceManagementIntentAssignment `json:"assignments,omitempty"`
}

type CreateIntentCopyOperationOptions

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

func DefaultCreateIntentCopyOperationOptions

func DefaultCreateIntentCopyOperationOptions() CreateIntentCopyOperationOptions

func (CreateIntentCopyOperationOptions) ToHeaders

func (CreateIntentCopyOperationOptions) ToOData

func (CreateIntentCopyOperationOptions) ToQuery

type CreateIntentCopyOperationResponse

type CreateIntentCopyOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.DeviceManagementIntent
}

type CreateIntentCopyRequest

type CreateIntentCopyRequest struct {
	Description nullable.Type[string] `json:"description,omitempty"`
	DisplayName nullable.Type[string] `json:"displayName,omitempty"`
}

type CreateIntentMigrateToTemplateOperationOptions

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

func DefaultCreateIntentMigrateToTemplateOperationOptions

func DefaultCreateIntentMigrateToTemplateOperationOptions() CreateIntentMigrateToTemplateOperationOptions

func (CreateIntentMigrateToTemplateOperationOptions) ToHeaders

func (CreateIntentMigrateToTemplateOperationOptions) ToOData

func (CreateIntentMigrateToTemplateOperationOptions) ToQuery

type CreateIntentMigrateToTemplateOperationResponse

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

type CreateIntentMigrateToTemplateRequest

type CreateIntentMigrateToTemplateRequest struct {
	NewTemplateId        nullable.Type[string] `json:"newTemplateId,omitempty"`
	PreserveCustomValues *bool                 `json:"preserveCustomValues,omitempty"`
}

type CreateIntentOperationOptions

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

func DefaultCreateIntentOperationOptions

func DefaultCreateIntentOperationOptions() CreateIntentOperationOptions

func (CreateIntentOperationOptions) ToHeaders

func (CreateIntentOperationOptions) ToOData

func (CreateIntentOperationOptions) ToQuery

type CreateIntentOperationResponse

type CreateIntentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.DeviceManagementIntent
}

type DeleteIntentOperationOptions

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

func DefaultDeleteIntentOperationOptions

func DefaultDeleteIntentOperationOptions() DeleteIntentOperationOptions

func (DeleteIntentOperationOptions) ToHeaders

func (DeleteIntentOperationOptions) ToOData

func (DeleteIntentOperationOptions) ToQuery

type DeleteIntentOperationResponse

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

type DeviceManagementIntentOperationPredicate

type DeviceManagementIntentOperationPredicate struct {
}

func (DeviceManagementIntentOperationPredicate) Matches

type GetIntentOperationOptions

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

func DefaultGetIntentOperationOptions

func DefaultGetIntentOperationOptions() GetIntentOperationOptions

func (GetIntentOperationOptions) ToHeaders

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

func (GetIntentOperationOptions) ToOData

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

func (GetIntentOperationOptions) ToQuery

type GetIntentOperationResponse

type GetIntentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.DeviceManagementIntent
}

type GetIntentsCountOperationOptions

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

func DefaultGetIntentsCountOperationOptions

func DefaultGetIntentsCountOperationOptions() GetIntentsCountOperationOptions

func (GetIntentsCountOperationOptions) ToHeaders

func (GetIntentsCountOperationOptions) ToOData

func (GetIntentsCountOperationOptions) ToQuery

type GetIntentsCountOperationResponse

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

type IntentClient

type IntentClient struct {
	Client *msgraph.Client
}

func NewIntentClientWithBaseURI

func NewIntentClientWithBaseURI(sdkApi sdkEnv.Api) (*IntentClient, error)

func (IntentClient) AssignIntent

AssignIntent - Invoke action assign

func (IntentClient) CreateIntent

CreateIntent - Create new navigation property to intents for deviceManagement

func (IntentClient) CreateIntentCopy

CreateIntentCopy - Invoke action createCopy

func (IntentClient) CreateIntentMigrateToTemplate

CreateIntentMigrateToTemplate - Invoke action migrateToTemplate

func (IntentClient) DeleteIntent

DeleteIntent - Delete navigation property intents for deviceManagement

func (IntentClient) GetIntent

GetIntent - Get intents from deviceManagement. The device management intents

func (IntentClient) GetIntentsCount

GetIntentsCount - Get the number of the resource

func (IntentClient) ListIntents

ListIntents - Get intents from deviceManagement. The device management intents

func (IntentClient) ListIntentsComplete

ListIntentsComplete retrieves all the results into a single object

func (IntentClient) ListIntentsCompleteMatchingPredicate

func (c IntentClient) ListIntentsCompleteMatchingPredicate(ctx context.Context, options ListIntentsOperationOptions, predicate DeviceManagementIntentOperationPredicate) (result ListIntentsCompleteResult, err error)

ListIntentsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (IntentClient) UpdateIntent

UpdateIntent - Update the navigation property intents in deviceManagement

func (IntentClient) UpdateIntentSettings

UpdateIntentSettings - Invoke action updateSettings

type ListIntentsCompleteResult

type ListIntentsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.DeviceManagementIntent
}

type ListIntentsCustomPager

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

type ListIntentsOperationOptions

type ListIntentsOperationOptions 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 DefaultListIntentsOperationOptions

func DefaultListIntentsOperationOptions() ListIntentsOperationOptions

func (ListIntentsOperationOptions) ToHeaders

func (ListIntentsOperationOptions) ToOData

func (ListIntentsOperationOptions) ToQuery

type ListIntentsOperationResponse

type ListIntentsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.DeviceManagementIntent
}

type UpdateIntentOperationOptions

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

func DefaultUpdateIntentOperationOptions

func DefaultUpdateIntentOperationOptions() UpdateIntentOperationOptions

func (UpdateIntentOperationOptions) ToHeaders

func (UpdateIntentOperationOptions) ToOData

func (UpdateIntentOperationOptions) ToQuery

type UpdateIntentOperationResponse

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

type UpdateIntentSettingsOperationOptions

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

func DefaultUpdateIntentSettingsOperationOptions

func DefaultUpdateIntentSettingsOperationOptions() UpdateIntentSettingsOperationOptions

func (UpdateIntentSettingsOperationOptions) ToHeaders

func (UpdateIntentSettingsOperationOptions) ToOData

func (UpdateIntentSettingsOperationOptions) ToQuery

type UpdateIntentSettingsOperationResponse

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

type UpdateIntentSettingsRequest

type UpdateIntentSettingsRequest struct {
	Settings *[]beta.DeviceManagementSettingInstance `json:"settings,omitempty"`
}

Jump to

Keyboard shortcuts

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