team

package
v0.20241111.1164443 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/groups/beta/team Documentation

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

Client Initialization

client := team.NewTeamClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: TeamClient.CreateTeamArchive

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

payload := team.CreateTeamArchiveRequest{
	// ...
}


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

Example Usage: TeamClient.CreateTeamClone

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

payload := team.CreateTeamCloneRequest{
	// ...
}


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

Example Usage: TeamClient.CreateTeamCompleteMigration

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

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

Example Usage: TeamClient.CreateTeamUnarchive

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

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

Example Usage: TeamClient.DeleteTeam

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

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

Example Usage: TeamClient.GetTeam

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

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

Example Usage: TeamClient.SendTeamActivityNotification

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

payload := team.SendTeamActivityNotificationRequest{
	// ...
}


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

Example Usage: TeamClient.SetTeam

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

payload := team.Team{
	// ...
}


read, err := client.SetTeam(ctx, id, payload, team.DefaultSetTeamOperationOptions())
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 CreateTeamArchiveOperationOptions

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

func DefaultCreateTeamArchiveOperationOptions

func DefaultCreateTeamArchiveOperationOptions() CreateTeamArchiveOperationOptions

func (CreateTeamArchiveOperationOptions) ToHeaders

func (CreateTeamArchiveOperationOptions) ToOData

func (CreateTeamArchiveOperationOptions) ToQuery

type CreateTeamArchiveOperationResponse

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

type CreateTeamArchiveRequest

type CreateTeamArchiveRequest struct {
	ShouldSetSpoSiteReadOnlyForMembers nullable.Type[bool] `json:"shouldSetSpoSiteReadOnlyForMembers,omitempty"`
}

type CreateTeamCloneOperationOptions

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

func DefaultCreateTeamCloneOperationOptions

func DefaultCreateTeamCloneOperationOptions() CreateTeamCloneOperationOptions

func (CreateTeamCloneOperationOptions) ToHeaders

func (CreateTeamCloneOperationOptions) ToOData

func (CreateTeamCloneOperationOptions) ToQuery

type CreateTeamCloneOperationResponse

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

type CreateTeamCloneRequest

type CreateTeamCloneRequest struct {
	Classification nullable.Type[string]    `json:"classification,omitempty"`
	Description    nullable.Type[string]    `json:"description,omitempty"`
	DisplayName    nullable.Type[string]    `json:"displayName,omitempty"`
	MailNickname   nullable.Type[string]    `json:"mailNickname,omitempty"`
	PartsToClone   *beta.ClonableTeamParts  `json:"partsToClone,omitempty"`
	Visibility     *beta.TeamVisibilityType `json:"visibility,omitempty"`
}

type CreateTeamCompleteMigrationOperationOptions

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

func DefaultCreateTeamCompleteMigrationOperationOptions

func DefaultCreateTeamCompleteMigrationOperationOptions() CreateTeamCompleteMigrationOperationOptions

func (CreateTeamCompleteMigrationOperationOptions) ToHeaders

func (CreateTeamCompleteMigrationOperationOptions) ToOData

func (CreateTeamCompleteMigrationOperationOptions) ToQuery

type CreateTeamCompleteMigrationOperationResponse

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

type CreateTeamUnarchiveOperationOptions

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

func DefaultCreateTeamUnarchiveOperationOptions

func DefaultCreateTeamUnarchiveOperationOptions() CreateTeamUnarchiveOperationOptions

func (CreateTeamUnarchiveOperationOptions) ToHeaders

func (CreateTeamUnarchiveOperationOptions) ToOData

func (CreateTeamUnarchiveOperationOptions) ToQuery

type CreateTeamUnarchiveOperationResponse

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

type DeleteTeamOperationOptions

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

func DefaultDeleteTeamOperationOptions

func DefaultDeleteTeamOperationOptions() DeleteTeamOperationOptions

func (DeleteTeamOperationOptions) ToHeaders

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

func (DeleteTeamOperationOptions) ToOData

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

func (DeleteTeamOperationOptions) ToQuery

type DeleteTeamOperationResponse

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

type GetTeamOperationOptions

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

func DefaultGetTeamOperationOptions

func DefaultGetTeamOperationOptions() GetTeamOperationOptions

func (GetTeamOperationOptions) ToHeaders

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

func (GetTeamOperationOptions) ToOData

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

func (GetTeamOperationOptions) ToQuery

type GetTeamOperationResponse

type GetTeamOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Team
}

type SendTeamActivityNotificationOperationOptions

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

func DefaultSendTeamActivityNotificationOperationOptions

func DefaultSendTeamActivityNotificationOperationOptions() SendTeamActivityNotificationOperationOptions

func (SendTeamActivityNotificationOperationOptions) ToHeaders

func (SendTeamActivityNotificationOperationOptions) ToOData

func (SendTeamActivityNotificationOperationOptions) ToQuery

type SendTeamActivityNotificationOperationResponse

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

type SendTeamActivityNotificationRequest

type SendTeamActivityNotificationRequest struct {
	ActivityType       nullable.Type[string]               `json:"activityType,omitempty"`
	ChainId            nullable.Type[int64]                `json:"chainId,omitempty"`
	PreviewText        *beta.ItemBody                      `json:"previewText,omitempty"`
	Recipient          *beta.TeamworkNotificationRecipient `json:"recipient,omitempty"`
	TeamsAppId         nullable.Type[string]               `json:"teamsAppId,omitempty"`
	TemplateParameters *[]beta.KeyValuePair                `json:"templateParameters,omitempty"`
	Topic              *beta.TeamworkActivityTopic         `json:"topic,omitempty"`
}

type SetTeamOperationOptions

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

func DefaultSetTeamOperationOptions

func DefaultSetTeamOperationOptions() SetTeamOperationOptions

func (SetTeamOperationOptions) ToHeaders

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

func (SetTeamOperationOptions) ToOData

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

func (SetTeamOperationOptions) ToQuery

type SetTeamOperationResponse

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

type TeamClient

type TeamClient struct {
	Client *msgraph.Client
}

func NewTeamClientWithBaseURI

func NewTeamClientWithBaseURI(sdkApi sdkEnv.Api) (*TeamClient, error)

func (TeamClient) CreateTeamArchive

CreateTeamArchive - Invoke action archive. Archive the specified team. When a team is archived, users can no longer make most changes to the team. For example, users can no longer: send or like messages on any channel in the team; edit the team's name or description; nor edit other settings. However, membership changes to the team continue to be allowed. Archiving is an async operation. A team is archived once the async operation completes successfully, which can occur subsequent to a response from this API. To archive a team, the team and group must have an owner. To restore a team from its archived state, use the API to unarchive.

func (TeamClient) CreateTeamClone

CreateTeamClone - Invoke action clone. Create a copy of a team. This operation also creates a copy of the corresponding group. You can specify which parts of the team to clone: When tabs are cloned, they aren't configured. The tabs are displayed on the tab bar in Microsoft Teams, and the first time a user opens them, they must go through the configuration screen. If the user who opens the tab doesn't have permission to configure apps, they see a message that says that the tab isn't configured. Cloning is a long-running operation. After the POST clone returns, you need to GET the operation returned by the Location: header to see if it's running, succeeded, or failed. You should continue to GET until the status isn't running. The recommended delay between GETs is 5 seconds.

func (TeamClient) CreateTeamCompleteMigration

CreateTeamCompleteMigration - Invoke action completeMigration. Complete the message migration process by removing migration mode from a team. Migration mode is a special state where certain operations are barred, like message POST and membership operations during the data migration process. After a completeMigration request is made, you can't import additional messages into the team. You can add members to the team after the request returns a successful response.

func (TeamClient) CreateTeamUnarchive

CreateTeamUnarchive - Invoke action unarchive. Restore an archived team and restores users' ability to send messages and edit the team, abiding by tenant and team settings. Teams are archived using the archive API. Unarchiving is an async operation. A team is unarchived once the async operation completes successfully, which might occur subsequent to a response from this API.

func (TeamClient) DeleteTeam

DeleteTeam - Delete navigation property team for groups

func (TeamClient) GetTeam

func (c TeamClient) GetTeam(ctx context.Context, id beta.GroupId, options GetTeamOperationOptions) (result GetTeamOperationResponse, err error)

GetTeam - Get team from groups. The team associated with this group.

func (TeamClient) SendTeamActivityNotification

SendTeamActivityNotification - Invoke action sendActivityNotification. Send an activity feed notification in the scope of a team. For more information, see sending Teams activity notifications.

func (TeamClient) SetTeam

func (c TeamClient) SetTeam(ctx context.Context, id beta.GroupId, input beta.Team, options SetTeamOperationOptions) (result SetTeamOperationResponse, err error)

SetTeam - Create team from group. Create a new team from a group. In order to create a team, the group must have a least one owner. If the creation of the team call is delayed, you can retry the call up to three times before you have to wait for 15 minutes due to a propagation delay. If the group was created less than 15 minutes ago, the call might fail with a 404 error code due to replication delays. If the group was created less than 15 minutes ago, it's possible for a call to create a team to fail with a 404 error code, due to ongoing replication delays. The recommended pattern is to retry the Create team call three times, with a 10 second delay between calls.

Jump to

Keyboard shortcuts

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