github.com/yaegashi/msgraph.go@v0.1.4/beta/RequestIntune.go (about)

     1  // Code generated by msgraph.go/gen DO NOT EDIT.
     2  
     3  package msgraph
     4  
     5  import "context"
     6  
     7  // IntuneBrandingProfileRequestBuilder is request builder for IntuneBrandingProfile
     8  type IntuneBrandingProfileRequestBuilder struct{ BaseRequestBuilder }
     9  
    10  // Request returns IntuneBrandingProfileRequest
    11  func (b *IntuneBrandingProfileRequestBuilder) Request() *IntuneBrandingProfileRequest {
    12  	return &IntuneBrandingProfileRequest{
    13  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
    14  	}
    15  }
    16  
    17  // IntuneBrandingProfileRequest is request for IntuneBrandingProfile
    18  type IntuneBrandingProfileRequest struct{ BaseRequest }
    19  
    20  // Get performs GET request for IntuneBrandingProfile
    21  func (r *IntuneBrandingProfileRequest) Get(ctx context.Context) (resObj *IntuneBrandingProfile, 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 IntuneBrandingProfile
    31  func (r *IntuneBrandingProfileRequest) Update(ctx context.Context, reqObj *IntuneBrandingProfile) error {
    32  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
    33  }
    34  
    35  // Delete performs DELETE request for IntuneBrandingProfile
    36  func (r *IntuneBrandingProfileRequest) Delete(ctx context.Context) error {
    37  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
    38  }
    39  
    40  // IntuneBrandingProfileAssignmentRequestBuilder is request builder for IntuneBrandingProfileAssignment
    41  type IntuneBrandingProfileAssignmentRequestBuilder struct{ BaseRequestBuilder }
    42  
    43  // Request returns IntuneBrandingProfileAssignmentRequest
    44  func (b *IntuneBrandingProfileAssignmentRequestBuilder) Request() *IntuneBrandingProfileAssignmentRequest {
    45  	return &IntuneBrandingProfileAssignmentRequest{
    46  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
    47  	}
    48  }
    49  
    50  // IntuneBrandingProfileAssignmentRequest is request for IntuneBrandingProfileAssignment
    51  type IntuneBrandingProfileAssignmentRequest struct{ BaseRequest }
    52  
    53  // Get performs GET request for IntuneBrandingProfileAssignment
    54  func (r *IntuneBrandingProfileAssignmentRequest) Get(ctx context.Context) (resObj *IntuneBrandingProfileAssignment, err error) {
    55  	var query string
    56  	if r.query != nil {
    57  		query = "?" + r.query.Encode()
    58  	}
    59  	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
    60  	return
    61  }
    62  
    63  // Update performs PATCH request for IntuneBrandingProfileAssignment
    64  func (r *IntuneBrandingProfileAssignmentRequest) Update(ctx context.Context, reqObj *IntuneBrandingProfileAssignment) error {
    65  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
    66  }
    67  
    68  // Delete performs DELETE request for IntuneBrandingProfileAssignment
    69  func (r *IntuneBrandingProfileAssignmentRequest) Delete(ctx context.Context) error {
    70  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
    71  }
    72  
    73  //
    74  type IntuneBrandingProfileAssignRequestBuilder struct{ BaseRequestBuilder }
    75  
    76  // Assign action undocumented
    77  func (b *IntuneBrandingProfileRequestBuilder) Assign(reqObj *IntuneBrandingProfileAssignRequestParameter) *IntuneBrandingProfileAssignRequestBuilder {
    78  	bb := &IntuneBrandingProfileAssignRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
    79  	bb.BaseRequestBuilder.baseURL += "/assign"
    80  	bb.BaseRequestBuilder.requestObject = reqObj
    81  	return bb
    82  }
    83  
    84  //
    85  type IntuneBrandingProfileAssignRequest struct{ BaseRequest }
    86  
    87  //
    88  func (b *IntuneBrandingProfileAssignRequestBuilder) Request() *IntuneBrandingProfileAssignRequest {
    89  	return &IntuneBrandingProfileAssignRequest{
    90  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
    91  	}
    92  }
    93  
    94  //
    95  func (r *IntuneBrandingProfileAssignRequest) Post(ctx context.Context) error {
    96  	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
    97  }