driveitempermission

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: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/groups/stable/driveitempermission Documentation

The driveitempermission SDK allows for interaction with Microsoft Graph groups (API Version stable).

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/groups/stable/driveitempermission"

Client Initialization

client := driveitempermission.NewDriveItemPermissionClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: DriveItemPermissionClient.CreateDriveItemPermission

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemID("groupId", "driveId", "driveItemId")

payload := driveitempermission.Permission{
	// ...
}


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

Example Usage: DriveItemPermissionClient.DeleteDriveItemPermission

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemIdPermissionID("groupId", "driveId", "driveItemId", "permissionId")

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

Example Usage: DriveItemPermissionClient.GetDriveItemPermission

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemIdPermissionID("groupId", "driveId", "driveItemId", "permissionId")

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

Example Usage: DriveItemPermissionClient.GetDriveItemPermissionsCount

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemID("groupId", "driveId", "driveItemId")

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

Example Usage: DriveItemPermissionClient.ListDriveItemPermissionGrants

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemIdPermissionID("groupId", "driveId", "driveItemId", "permissionId")

payload := driveitempermission.ListDriveItemPermissionGrantsRequest{
	// ...
}


// alternatively `client.ListDriveItemPermissionGrants(ctx, id, payload, driveitempermission.DefaultListDriveItemPermissionGrantsOperationOptions())` can be used to do batched pagination
items, err := client.ListDriveItemPermissionGrantsComplete(ctx, id, payload, driveitempermission.DefaultListDriveItemPermissionGrantsOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DriveItemPermissionClient.ListDriveItemPermissions

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemID("groupId", "driveId", "driveItemId")

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

Example Usage: DriveItemPermissionClient.UpdateDriveItemPermission

ctx := context.TODO()
id := driveitempermission.NewGroupIdDriveIdItemIdPermissionID("groupId", "driveId", "driveItemId", "permissionId")

payload := driveitempermission.Permission{
	// ...
}


read, err := client.UpdateDriveItemPermission(ctx, id, payload, driveitempermission.DefaultUpdateDriveItemPermissionOperationOptions())
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 CreateDriveItemPermissionOperationOptions

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

func DefaultCreateDriveItemPermissionOperationOptions

func DefaultCreateDriveItemPermissionOperationOptions() CreateDriveItemPermissionOperationOptions

func (CreateDriveItemPermissionOperationOptions) ToHeaders

func (CreateDriveItemPermissionOperationOptions) ToOData

func (CreateDriveItemPermissionOperationOptions) ToQuery

type CreateDriveItemPermissionOperationResponse

type CreateDriveItemPermissionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *stable.Permission
}

type DeleteDriveItemPermissionOperationOptions

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

func DefaultDeleteDriveItemPermissionOperationOptions

func DefaultDeleteDriveItemPermissionOperationOptions() DeleteDriveItemPermissionOperationOptions

func (DeleteDriveItemPermissionOperationOptions) ToHeaders

func (DeleteDriveItemPermissionOperationOptions) ToOData

func (DeleteDriveItemPermissionOperationOptions) ToQuery

type DeleteDriveItemPermissionOperationResponse

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

type DriveItemPermissionClient

type DriveItemPermissionClient struct {
	Client *msgraph.Client
}

func NewDriveItemPermissionClientWithBaseURI

func NewDriveItemPermissionClientWithBaseURI(sdkApi sdkEnv.Api) (*DriveItemPermissionClient, error)

func (DriveItemPermissionClient) CreateDriveItemPermission

CreateDriveItemPermission - Create new navigation property to permissions for groups

func (DriveItemPermissionClient) DeleteDriveItemPermission

DeleteDriveItemPermission - Delete navigation property permissions for groups

func (DriveItemPermissionClient) GetDriveItemPermission

GetDriveItemPermission - Get permissions from groups. The set of permissions for the item. Read-only. Nullable.

func (DriveItemPermissionClient) GetDriveItemPermissionsCount

GetDriveItemPermissionsCount - Get the number of the resource

func (DriveItemPermissionClient) ListDriveItemPermissionGrants

ListDriveItemPermissionGrants - Invoke action grant. Grant users access to a link represented by a permission.

func (DriveItemPermissionClient) ListDriveItemPermissionGrantsComplete

ListDriveItemPermissionGrantsComplete retrieves all the results into a single object

func (DriveItemPermissionClient) ListDriveItemPermissionGrantsCompleteMatchingPredicate

ListDriveItemPermissionGrantsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DriveItemPermissionClient) ListDriveItemPermissions

ListDriveItemPermissions - Get permissions from groups. The set of permissions for the item. Read-only. Nullable.

func (DriveItemPermissionClient) ListDriveItemPermissionsComplete

ListDriveItemPermissionsComplete retrieves all the results into a single object

func (DriveItemPermissionClient) ListDriveItemPermissionsCompleteMatchingPredicate

ListDriveItemPermissionsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DriveItemPermissionClient) UpdateDriveItemPermission

UpdateDriveItemPermission - Update the navigation property permissions in groups

type GetDriveItemPermissionOperationOptions

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

func DefaultGetDriveItemPermissionOperationOptions

func DefaultGetDriveItemPermissionOperationOptions() GetDriveItemPermissionOperationOptions

func (GetDriveItemPermissionOperationOptions) ToHeaders

func (GetDriveItemPermissionOperationOptions) ToOData

func (GetDriveItemPermissionOperationOptions) ToQuery

type GetDriveItemPermissionOperationResponse

type GetDriveItemPermissionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *stable.Permission
}

type GetDriveItemPermissionsCountOperationOptions

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

func DefaultGetDriveItemPermissionsCountOperationOptions

func DefaultGetDriveItemPermissionsCountOperationOptions() GetDriveItemPermissionsCountOperationOptions

func (GetDriveItemPermissionsCountOperationOptions) ToHeaders

func (GetDriveItemPermissionsCountOperationOptions) ToOData

func (GetDriveItemPermissionsCountOperationOptions) ToQuery

type GetDriveItemPermissionsCountOperationResponse

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

type ListDriveItemPermissionGrantsCompleteResult

type ListDriveItemPermissionGrantsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Permission
}

type ListDriveItemPermissionGrantsCustomPager

type ListDriveItemPermissionGrantsCustomPager struct {
	NextLink *odata.Link `json:"@odata.nextLink"`
}

type ListDriveItemPermissionGrantsOperationOptions

type ListDriveItemPermissionGrantsOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Skip      *int64
	Top       *int64
}

func DefaultListDriveItemPermissionGrantsOperationOptions

func DefaultListDriveItemPermissionGrantsOperationOptions() ListDriveItemPermissionGrantsOperationOptions

func (ListDriveItemPermissionGrantsOperationOptions) ToHeaders

func (ListDriveItemPermissionGrantsOperationOptions) ToOData

func (ListDriveItemPermissionGrantsOperationOptions) ToQuery

type ListDriveItemPermissionGrantsOperationResponse

type ListDriveItemPermissionGrantsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Permission
}

type ListDriveItemPermissionGrantsRequest

type ListDriveItemPermissionGrantsRequest struct {
	Recipients *[]stable.DriveRecipient `json:"recipients,omitempty"`
	Roles      *[]string                `json:"roles,omitempty"`
}

type ListDriveItemPermissionsCompleteResult

type ListDriveItemPermissionsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Permission
}

type ListDriveItemPermissionsCustomPager

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

type ListDriveItemPermissionsOperationOptions

type ListDriveItemPermissionsOperationOptions 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 DefaultListDriveItemPermissionsOperationOptions

func DefaultListDriveItemPermissionsOperationOptions() ListDriveItemPermissionsOperationOptions

func (ListDriveItemPermissionsOperationOptions) ToHeaders

func (ListDriveItemPermissionsOperationOptions) ToOData

func (ListDriveItemPermissionsOperationOptions) ToQuery

type ListDriveItemPermissionsOperationResponse

type ListDriveItemPermissionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Permission
}

type PermissionOperationPredicate

type PermissionOperationPredicate struct {
}

func (PermissionOperationPredicate) Matches

type UpdateDriveItemPermissionOperationOptions

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

func DefaultUpdateDriveItemPermissionOperationOptions

func DefaultUpdateDriveItemPermissionOperationOptions() UpdateDriveItemPermissionOperationOptions

func (UpdateDriveItemPermissionOperationOptions) ToHeaders

func (UpdateDriveItemPermissionOperationOptions) ToOData

func (UpdateDriveItemPermissionOperationOptions) ToQuery

type UpdateDriveItemPermissionOperationResponse

type UpdateDriveItemPermissionOperationResponse 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