sitecontenttype

package
v0.20241126.2320 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/groups/beta/sitecontenttype Documentation

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

Client Initialization

client := sitecontenttype.NewSiteContentTypeClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: SiteContentTypeClient.AddSiteContentTypesCopy

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

payload := sitecontenttype.AddSiteContentTypesCopyRequest{
	// ...
}


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

Example Usage: SiteContentTypeClient.AddSiteContentTypesCopyFromHub

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

payload := sitecontenttype.AddSiteContentTypesCopyFromHubRequest{
	// ...
}


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

Example Usage: SiteContentTypeClient.CopySiteContentTypeToDefaultContentLocation

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

payload := sitecontenttype.CopySiteContentTypeToDefaultContentLocationRequest{
	// ...
}


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

Example Usage: SiteContentTypeClient.CreateSiteContentType

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

payload := sitecontenttype.ContentType{
	// ...
}


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

Example Usage: SiteContentTypeClient.CreateSiteContentTypeAssociateWithHubSite

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

payload := sitecontenttype.CreateSiteContentTypeAssociateWithHubSiteRequest{
	// ...
}


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

Example Usage: SiteContentTypeClient.CreateSiteContentTypePublish

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

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

Example Usage: SiteContentTypeClient.CreateSiteContentTypeUnpublish

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

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

Example Usage: SiteContentTypeClient.DeleteSiteContentType

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

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

Example Usage: SiteContentTypeClient.GetSiteContentType

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

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

Example Usage: SiteContentTypeClient.GetSiteContentTypesCount

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

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

Example Usage: SiteContentTypeClient.ListSiteContentTypes

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

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

Example Usage: SiteContentTypeClient.UpdateSiteContentType

ctx := context.TODO()
id := sitecontenttype.NewGroupIdSiteIdContentTypeID("groupId", "siteId", "contentTypeId")

payload := sitecontenttype.ContentType{
	// ...
}


read, err := client.UpdateSiteContentType(ctx, id, payload, sitecontenttype.DefaultUpdateSiteContentTypeOperationOptions())
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 AddSiteContentTypesCopyFromHubOperationOptions

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

func DefaultAddSiteContentTypesCopyFromHubOperationOptions

func DefaultAddSiteContentTypesCopyFromHubOperationOptions() AddSiteContentTypesCopyFromHubOperationOptions

func (AddSiteContentTypesCopyFromHubOperationOptions) ToHeaders

func (AddSiteContentTypesCopyFromHubOperationOptions) ToOData

func (AddSiteContentTypesCopyFromHubOperationOptions) ToQuery

type AddSiteContentTypesCopyFromHubOperationResponse

type AddSiteContentTypesCopyFromHubOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ContentType
}

type AddSiteContentTypesCopyFromHubRequest

type AddSiteContentTypesCopyFromHubRequest struct {
	ContentTypeId *string `json:"contentTypeId,omitempty"`
}

type AddSiteContentTypesCopyOperationOptions

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

func DefaultAddSiteContentTypesCopyOperationOptions

func DefaultAddSiteContentTypesCopyOperationOptions() AddSiteContentTypesCopyOperationOptions

func (AddSiteContentTypesCopyOperationOptions) ToHeaders

func (AddSiteContentTypesCopyOperationOptions) ToOData

func (AddSiteContentTypesCopyOperationOptions) ToQuery

type AddSiteContentTypesCopyOperationResponse

type AddSiteContentTypesCopyOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ContentType
}

type AddSiteContentTypesCopyRequest

type AddSiteContentTypesCopyRequest struct {
	ContentType *string `json:"contentType,omitempty"`
}

type ContentTypeOperationPredicate

type ContentTypeOperationPredicate struct {
}

func (ContentTypeOperationPredicate) Matches

type CopySiteContentTypeToDefaultContentLocationOperationOptions

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

func (CopySiteContentTypeToDefaultContentLocationOperationOptions) ToHeaders

func (CopySiteContentTypeToDefaultContentLocationOperationOptions) ToOData

func (CopySiteContentTypeToDefaultContentLocationOperationOptions) ToQuery

type CopySiteContentTypeToDefaultContentLocationOperationResponse

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

type CopySiteContentTypeToDefaultContentLocationRequest

type CopySiteContentTypeToDefaultContentLocationRequest struct {
	DestinationFileName nullable.Type[string] `json:"destinationFileName,omitempty"`
	SourceFile          *beta.ItemReference   `json:"sourceFile,omitempty"`
}

type CreateSiteContentTypeAssociateWithHubSiteOperationOptions

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

func (CreateSiteContentTypeAssociateWithHubSiteOperationOptions) ToHeaders

func (CreateSiteContentTypeAssociateWithHubSiteOperationOptions) ToOData

func (CreateSiteContentTypeAssociateWithHubSiteOperationOptions) ToQuery

type CreateSiteContentTypeAssociateWithHubSiteOperationResponse

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

type CreateSiteContentTypeAssociateWithHubSiteRequest

type CreateSiteContentTypeAssociateWithHubSiteRequest struct {
	HubSiteUrls              *[]string           `json:"hubSiteUrls,omitempty"`
	PropagateToExistingLists nullable.Type[bool] `json:"propagateToExistingLists,omitempty"`
}

type CreateSiteContentTypeOperationOptions

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

func DefaultCreateSiteContentTypeOperationOptions

func DefaultCreateSiteContentTypeOperationOptions() CreateSiteContentTypeOperationOptions

func (CreateSiteContentTypeOperationOptions) ToHeaders

func (CreateSiteContentTypeOperationOptions) ToOData

func (CreateSiteContentTypeOperationOptions) ToQuery

type CreateSiteContentTypeOperationResponse

type CreateSiteContentTypeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ContentType
}

type CreateSiteContentTypePublishOperationOptions

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

func DefaultCreateSiteContentTypePublishOperationOptions

func DefaultCreateSiteContentTypePublishOperationOptions() CreateSiteContentTypePublishOperationOptions

func (CreateSiteContentTypePublishOperationOptions) ToHeaders

func (CreateSiteContentTypePublishOperationOptions) ToOData

func (CreateSiteContentTypePublishOperationOptions) ToQuery

type CreateSiteContentTypePublishOperationResponse

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

type CreateSiteContentTypeUnpublishOperationOptions

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

func DefaultCreateSiteContentTypeUnpublishOperationOptions

func DefaultCreateSiteContentTypeUnpublishOperationOptions() CreateSiteContentTypeUnpublishOperationOptions

func (CreateSiteContentTypeUnpublishOperationOptions) ToHeaders

func (CreateSiteContentTypeUnpublishOperationOptions) ToOData

func (CreateSiteContentTypeUnpublishOperationOptions) ToQuery

type CreateSiteContentTypeUnpublishOperationResponse

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

type DeleteSiteContentTypeOperationOptions

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

func DefaultDeleteSiteContentTypeOperationOptions

func DefaultDeleteSiteContentTypeOperationOptions() DeleteSiteContentTypeOperationOptions

func (DeleteSiteContentTypeOperationOptions) ToHeaders

func (DeleteSiteContentTypeOperationOptions) ToOData

func (DeleteSiteContentTypeOperationOptions) ToQuery

type DeleteSiteContentTypeOperationResponse

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

type GetSiteContentTypeOperationOptions

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

func DefaultGetSiteContentTypeOperationOptions

func DefaultGetSiteContentTypeOperationOptions() GetSiteContentTypeOperationOptions

func (GetSiteContentTypeOperationOptions) ToHeaders

func (GetSiteContentTypeOperationOptions) ToOData

func (GetSiteContentTypeOperationOptions) ToQuery

type GetSiteContentTypeOperationResponse

type GetSiteContentTypeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ContentType
}

type GetSiteContentTypesCountOperationOptions

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

func DefaultGetSiteContentTypesCountOperationOptions

func DefaultGetSiteContentTypesCountOperationOptions() GetSiteContentTypesCountOperationOptions

func (GetSiteContentTypesCountOperationOptions) ToHeaders

func (GetSiteContentTypesCountOperationOptions) ToOData

func (GetSiteContentTypesCountOperationOptions) ToQuery

type GetSiteContentTypesCountOperationResponse

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

type ListSiteContentTypesCompleteResult

type ListSiteContentTypesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.ContentType
}

type ListSiteContentTypesCustomPager

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

type ListSiteContentTypesOperationOptions

type ListSiteContentTypesOperationOptions 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 DefaultListSiteContentTypesOperationOptions

func DefaultListSiteContentTypesOperationOptions() ListSiteContentTypesOperationOptions

func (ListSiteContentTypesOperationOptions) ToHeaders

func (ListSiteContentTypesOperationOptions) ToOData

func (ListSiteContentTypesOperationOptions) ToQuery

type ListSiteContentTypesOperationResponse

type ListSiteContentTypesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.ContentType
}

type SiteContentTypeClient

type SiteContentTypeClient struct {
	Client *msgraph.Client
}

func NewSiteContentTypeClientWithBaseURI

func NewSiteContentTypeClientWithBaseURI(sdkApi sdkEnv.Api) (*SiteContentTypeClient, error)

func (SiteContentTypeClient) AddSiteContentTypesCopy

AddSiteContentTypesCopy - Invoke action addCopy

func (SiteContentTypeClient) AddSiteContentTypesCopyFromHub

AddSiteContentTypesCopyFromHub - Invoke action addCopyFromContentTypeHub. Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021.

func (SiteContentTypeClient) CopySiteContentTypeToDefaultContentLocation

CopySiteContentTypeToDefaultContentLocation - Invoke action copyToDefaultContentLocation

func (SiteContentTypeClient) CreateSiteContentType

CreateSiteContentType - Create new navigation property to contentTypes for groups

func (SiteContentTypeClient) CreateSiteContentTypeAssociateWithHubSite

CreateSiteContentTypeAssociateWithHubSite - Invoke action associateWithHubSites

func (SiteContentTypeClient) CreateSiteContentTypePublish

CreateSiteContentTypePublish - Invoke action publish

func (SiteContentTypeClient) CreateSiteContentTypeUnpublish

CreateSiteContentTypeUnpublish - Invoke action unpublish

func (SiteContentTypeClient) DeleteSiteContentType

DeleteSiteContentType - Delete navigation property contentTypes for groups

func (SiteContentTypeClient) GetSiteContentType

GetSiteContentType - Get contentTypes from groups. The collection of content types defined for this site.

func (SiteContentTypeClient) GetSiteContentTypesCount

GetSiteContentTypesCount - Get the number of the resource

func (SiteContentTypeClient) ListSiteContentTypes

ListSiteContentTypes - Get contentTypes from groups. The collection of content types defined for this site.

func (SiteContentTypeClient) ListSiteContentTypesComplete

ListSiteContentTypesComplete retrieves all the results into a single object

func (SiteContentTypeClient) ListSiteContentTypesCompleteMatchingPredicate

func (c SiteContentTypeClient) ListSiteContentTypesCompleteMatchingPredicate(ctx context.Context, id beta.GroupIdSiteId, options ListSiteContentTypesOperationOptions, predicate ContentTypeOperationPredicate) (result ListSiteContentTypesCompleteResult, err error)

ListSiteContentTypesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SiteContentTypeClient) UpdateSiteContentType

UpdateSiteContentType - Update the navigation property contentTypes in groups

type UpdateSiteContentTypeOperationOptions

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

func DefaultUpdateSiteContentTypeOperationOptions

func DefaultUpdateSiteContentTypeOperationOptions() UpdateSiteContentTypeOperationOptions

func (UpdateSiteContentTypeOperationOptions) ToHeaders

func (UpdateSiteContentTypeOperationOptions) ToOData

func (UpdateSiteContentTypeOperationOptions) ToQuery

type UpdateSiteContentTypeOperationResponse

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