site

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := site.NewSiteClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: SiteClient.AddSites

ctx := context.TODO()
id := site.NewGroupID("groupId")

payload := site.AddSitesRequest{
	// ...
}


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

Example Usage: SiteClient.GetSite

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

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

Example Usage: SiteClient.GetSitesCount

ctx := context.TODO()
id := site.NewGroupID("groupId")

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

Example Usage: SiteClient.ListSites

ctx := context.TODO()
id := site.NewGroupID("groupId")

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

Example Usage: SiteClient.RemoveSites

ctx := context.TODO()
id := site.NewGroupID("groupId")

payload := site.RemoveSitesRequest{
	// ...
}


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

Example Usage: SiteClient.UpdateSite

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

payload := site.Site{
	// ...
}


read, err := client.UpdateSite(ctx, id, payload, site.DefaultUpdateSiteOperationOptions())
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 AddSitesCompleteResult

type AddSitesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Site
}

type AddSitesCustomPager

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

type AddSitesOperationOptions

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

func DefaultAddSitesOperationOptions

func DefaultAddSitesOperationOptions() AddSitesOperationOptions

func (AddSitesOperationOptions) ToHeaders

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

func (AddSitesOperationOptions) ToOData

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

func (AddSitesOperationOptions) ToQuery

type AddSitesOperationResponse

type AddSitesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Site
}

type AddSitesRequest

type AddSitesRequest struct {
	Value *[]stable.Site `json:"value,omitempty"`
}

type GetSiteOperationOptions

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

func DefaultGetSiteOperationOptions

func DefaultGetSiteOperationOptions() GetSiteOperationOptions

func (GetSiteOperationOptions) ToHeaders

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

func (GetSiteOperationOptions) ToOData

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

func (GetSiteOperationOptions) ToQuery

type GetSiteOperationResponse

type GetSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *stable.Site
}

type GetSitesCountOperationOptions

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

func DefaultGetSitesCountOperationOptions

func DefaultGetSitesCountOperationOptions() GetSitesCountOperationOptions

func (GetSitesCountOperationOptions) ToHeaders

func (GetSitesCountOperationOptions) ToOData

func (GetSitesCountOperationOptions) ToQuery

type GetSitesCountOperationResponse

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

type ListSitesCompleteResult

type ListSitesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Site
}

type ListSitesCustomPager

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

type ListSitesOperationOptions

type ListSitesOperationOptions 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 DefaultListSitesOperationOptions

func DefaultListSitesOperationOptions() ListSitesOperationOptions

func (ListSitesOperationOptions) ToHeaders

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

func (ListSitesOperationOptions) ToOData

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

func (ListSitesOperationOptions) ToQuery

type ListSitesOperationResponse

type ListSitesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Site
}

type RemoveSitesCompleteResult

type RemoveSitesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Site
}

type RemoveSitesCustomPager

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

type RemoveSitesOperationOptions

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

func DefaultRemoveSitesOperationOptions

func DefaultRemoveSitesOperationOptions() RemoveSitesOperationOptions

func (RemoveSitesOperationOptions) ToHeaders

func (RemoveSitesOperationOptions) ToOData

func (RemoveSitesOperationOptions) ToQuery

type RemoveSitesOperationResponse

type RemoveSitesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Site
}

type RemoveSitesRequest

type RemoveSitesRequest struct {
	Value *[]stable.Site `json:"value,omitempty"`
}

type SiteClient

type SiteClient struct {
	Client *msgraph.Client
}

func NewSiteClientWithBaseURI

func NewSiteClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteClient, error)

func (SiteClient) AddSites

AddSites - Invoke action add. Follow a user's site or multiple sites.

func (SiteClient) AddSitesComplete

AddSitesComplete retrieves all the results into a single object

func (SiteClient) AddSitesCompleteMatchingPredicate

func (c SiteClient) AddSitesCompleteMatchingPredicate(ctx context.Context, id stable.GroupId, input AddSitesRequest, options AddSitesOperationOptions, predicate SiteOperationPredicate) (result AddSitesCompleteResult, err error)

AddSitesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SiteClient) GetSite

GetSite - Get sites from groups. The list of SharePoint sites in this group. Access the default site with /sites/root.

func (SiteClient) GetSitesCount

GetSitesCount - Get the number of the resource

func (SiteClient) ListSites

ListSites - Get sites from groups. The list of SharePoint sites in this group. Access the default site with /sites/root.

func (SiteClient) ListSitesComplete

ListSitesComplete retrieves all the results into a single object

func (SiteClient) ListSitesCompleteMatchingPredicate

func (c SiteClient) ListSitesCompleteMatchingPredicate(ctx context.Context, id stable.GroupId, options ListSitesOperationOptions, predicate SiteOperationPredicate) (result ListSitesCompleteResult, err error)

ListSitesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SiteClient) RemoveSites

RemoveSites - Invoke action remove. Unfollow a user's site or multiple sites.

func (SiteClient) RemoveSitesComplete

RemoveSitesComplete retrieves all the results into a single object

func (SiteClient) RemoveSitesCompleteMatchingPredicate

func (c SiteClient) RemoveSitesCompleteMatchingPredicate(ctx context.Context, id stable.GroupId, input RemoveSitesRequest, options RemoveSitesOperationOptions, predicate SiteOperationPredicate) (result RemoveSitesCompleteResult, err error)

RemoveSitesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SiteClient) UpdateSite

UpdateSite - Update the navigation property sites in groups

type SiteOperationPredicate

type SiteOperationPredicate struct {
}

func (SiteOperationPredicate) Matches

func (p SiteOperationPredicate) Matches(input stable.Site) bool

type UpdateSiteOperationOptions

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

func DefaultUpdateSiteOperationOptions

func DefaultUpdateSiteOperationOptions() UpdateSiteOperationOptions

func (UpdateSiteOperationOptions) ToHeaders

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

func (UpdateSiteOperationOptions) ToOData

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

func (UpdateSiteOperationOptions) ToQuery

type UpdateSiteOperationResponse

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