github.com/yaegashi/msgraph.go@v0.1.4/v1.0/RequestParticipant.go (about)

     1  // Code generated by msgraph.go/gen DO NOT EDIT.
     2  
     3  package msgraph
     4  
     5  import "context"
     6  
     7  // ParticipantRequestBuilder is request builder for Participant
     8  type ParticipantRequestBuilder struct{ BaseRequestBuilder }
     9  
    10  // Request returns ParticipantRequest
    11  func (b *ParticipantRequestBuilder) Request() *ParticipantRequest {
    12  	return &ParticipantRequest{
    13  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
    14  	}
    15  }
    16  
    17  // ParticipantRequest is request for Participant
    18  type ParticipantRequest struct{ BaseRequest }
    19  
    20  // Get performs GET request for Participant
    21  func (r *ParticipantRequest) Get(ctx context.Context) (resObj *Participant, err error) {
    22  	var query string
    23  	if r.query != nil {
    24  		query = "?" + r.query.Encode()
    25  	}
    26  	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
    27  	return
    28  }
    29  
    30  // Update performs PATCH request for Participant
    31  func (r *ParticipantRequest) Update(ctx context.Context, reqObj *Participant) error {
    32  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
    33  }
    34  
    35  // Delete performs DELETE request for Participant
    36  func (r *ParticipantRequest) Delete(ctx context.Context) error {
    37  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
    38  }
    39  
    40  //
    41  type ParticipantCollectionInviteRequestBuilder struct{ BaseRequestBuilder }
    42  
    43  // Invite action undocumented
    44  func (b *CallParticipantsCollectionRequestBuilder) Invite(reqObj *ParticipantCollectionInviteRequestParameter) *ParticipantCollectionInviteRequestBuilder {
    45  	bb := &ParticipantCollectionInviteRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
    46  	bb.BaseRequestBuilder.baseURL += "/invite"
    47  	bb.BaseRequestBuilder.requestObject = reqObj
    48  	return bb
    49  }
    50  
    51  //
    52  type ParticipantCollectionInviteRequest struct{ BaseRequest }
    53  
    54  //
    55  func (b *ParticipantCollectionInviteRequestBuilder) Request() *ParticipantCollectionInviteRequest {
    56  	return &ParticipantCollectionInviteRequest{
    57  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
    58  	}
    59  }
    60  
    61  //
    62  func (r *ParticipantCollectionInviteRequest) Post(ctx context.Context) (resObj *InviteParticipantsOperation, err error) {
    63  	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
    64  	return
    65  }
    66  
    67  //
    68  type ParticipantMuteRequestBuilder struct{ BaseRequestBuilder }
    69  
    70  // Mute action undocumented
    71  func (b *ParticipantRequestBuilder) Mute(reqObj *ParticipantMuteRequestParameter) *ParticipantMuteRequestBuilder {
    72  	bb := &ParticipantMuteRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
    73  	bb.BaseRequestBuilder.baseURL += "/mute"
    74  	bb.BaseRequestBuilder.requestObject = reqObj
    75  	return bb
    76  }
    77  
    78  //
    79  type ParticipantMuteRequest struct{ BaseRequest }
    80  
    81  //
    82  func (b *ParticipantMuteRequestBuilder) Request() *ParticipantMuteRequest {
    83  	return &ParticipantMuteRequest{
    84  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
    85  	}
    86  }
    87  
    88  //
    89  func (r *ParticipantMuteRequest) Post(ctx context.Context) (resObj *MuteParticipantOperation, err error) {
    90  	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
    91  	return
    92  }