sitepermission

package
v0.20241104.1140654 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MPL-2.0 Imports: 8 Imported by: 1

README

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

The sitepermission 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/sitepermission"

Client Initialization

client := sitepermission.NewSitePermissionClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: SitePermissionClient.CreateSitePermission

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteID("groupId", "siteId")

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


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

Example Usage: SitePermissionClient.DeleteSitePermission

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteIdPermissionID("groupId", "siteId", "permissionId")

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

Example Usage: SitePermissionClient.GetSitePermission

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteIdPermissionID("groupId", "siteId", "permissionId")

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

Example Usage: SitePermissionClient.GetSitePermissionsCount

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteID("groupId", "siteId")

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

Example Usage: SitePermissionClient.ListSitePermissionGrants

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteIdPermissionID("groupId", "siteId", "permissionId")

payload := sitepermission.ListSitePermissionGrantsRequest{
	// ...
}


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

Example Usage: SitePermissionClient.ListSitePermissions

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteID("groupId", "siteId")

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

Example Usage: SitePermissionClient.UpdateSitePermission

ctx := context.TODO()
id := sitepermission.NewGroupIdSiteIdPermissionID("groupId", "siteId", "permissionId")

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


read, err := client.UpdateSitePermission(ctx, id, payload, sitepermission.DefaultUpdateSitePermissionOperationOptions())
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 CreateSitePermissionOperationOptions

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

func DefaultCreateSitePermissionOperationOptions

func DefaultCreateSitePermissionOperationOptions() CreateSitePermissionOperationOptions

func (CreateSitePermissionOperationOptions) ToHeaders

func (CreateSitePermissionOperationOptions) ToOData

func (CreateSitePermissionOperationOptions) ToQuery

type CreateSitePermissionOperationResponse

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

type DeleteSitePermissionOperationOptions

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

func DefaultDeleteSitePermissionOperationOptions

func DefaultDeleteSitePermissionOperationOptions() DeleteSitePermissionOperationOptions

func (DeleteSitePermissionOperationOptions) ToHeaders

func (DeleteSitePermissionOperationOptions) ToOData

func (DeleteSitePermissionOperationOptions) ToQuery

type DeleteSitePermissionOperationResponse

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

type GetSitePermissionOperationOptions

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

func DefaultGetSitePermissionOperationOptions

func DefaultGetSitePermissionOperationOptions() GetSitePermissionOperationOptions

func (GetSitePermissionOperationOptions) ToHeaders

func (GetSitePermissionOperationOptions) ToOData

func (GetSitePermissionOperationOptions) ToQuery

type GetSitePermissionOperationResponse

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

type GetSitePermissionsCountOperationOptions

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

func DefaultGetSitePermissionsCountOperationOptions

func DefaultGetSitePermissionsCountOperationOptions() GetSitePermissionsCountOperationOptions

func (GetSitePermissionsCountOperationOptions) ToHeaders

func (GetSitePermissionsCountOperationOptions) ToOData

func (GetSitePermissionsCountOperationOptions) ToQuery

type GetSitePermissionsCountOperationResponse

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

type ListSitePermissionGrantsCompleteResult

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

type ListSitePermissionGrantsCustomPager

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

type ListSitePermissionGrantsOperationOptions

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

func DefaultListSitePermissionGrantsOperationOptions

func DefaultListSitePermissionGrantsOperationOptions() ListSitePermissionGrantsOperationOptions

func (ListSitePermissionGrantsOperationOptions) ToHeaders

func (ListSitePermissionGrantsOperationOptions) ToOData

func (ListSitePermissionGrantsOperationOptions) ToQuery

type ListSitePermissionGrantsOperationResponse

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

type ListSitePermissionGrantsRequest

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

type ListSitePermissionsCompleteResult

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

type ListSitePermissionsCustomPager

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

type ListSitePermissionsOperationOptions

type ListSitePermissionsOperationOptions 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 DefaultListSitePermissionsOperationOptions

func DefaultListSitePermissionsOperationOptions() ListSitePermissionsOperationOptions

func (ListSitePermissionsOperationOptions) ToHeaders

func (ListSitePermissionsOperationOptions) ToOData

func (ListSitePermissionsOperationOptions) ToQuery

type ListSitePermissionsOperationResponse

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

type PermissionOperationPredicate

type PermissionOperationPredicate struct {
}

func (PermissionOperationPredicate) Matches

type SitePermissionClient

type SitePermissionClient struct {
	Client *msgraph.Client
}

func NewSitePermissionClientWithBaseURI

func NewSitePermissionClientWithBaseURI(sdkApi sdkEnv.Api) (*SitePermissionClient, error)

func (SitePermissionClient) CreateSitePermission

CreateSitePermission - Create new navigation property to permissions for groups

func (SitePermissionClient) DeleteSitePermission

DeleteSitePermission - Delete navigation property permissions for groups

func (SitePermissionClient) GetSitePermission

GetSitePermission - Get permissions from groups. The permissions associated with the site. Nullable.

func (SitePermissionClient) GetSitePermissionsCount

GetSitePermissionsCount - Get the number of the resource

func (SitePermissionClient) ListSitePermissionGrants

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

func (SitePermissionClient) ListSitePermissionGrantsComplete

ListSitePermissionGrantsComplete retrieves all the results into a single object

func (SitePermissionClient) ListSitePermissionGrantsCompleteMatchingPredicate

ListSitePermissionGrantsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SitePermissionClient) ListSitePermissions

ListSitePermissions - Get permissions from groups. The permissions associated with the site. Nullable.

func (SitePermissionClient) ListSitePermissionsComplete

ListSitePermissionsComplete retrieves all the results into a single object

func (SitePermissionClient) ListSitePermissionsCompleteMatchingPredicate

func (c SitePermissionClient) ListSitePermissionsCompleteMatchingPredicate(ctx context.Context, id stable.GroupIdSiteId, options ListSitePermissionsOperationOptions, predicate PermissionOperationPredicate) (result ListSitePermissionsCompleteResult, err error)

ListSitePermissionsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SitePermissionClient) UpdateSitePermission

UpdateSitePermission - Update the navigation property permissions in groups

type UpdateSitePermissionOperationOptions

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

func DefaultUpdateSitePermissionOperationOptions

func DefaultUpdateSitePermissionOperationOptions() UpdateSitePermissionOperationOptions

func (UpdateSitePermissionOperationOptions) ToHeaders

func (UpdateSitePermissionOperationOptions) ToOData

func (UpdateSitePermissionOperationOptions) ToQuery

type UpdateSitePermissionOperationResponse

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