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

     1  // Code generated by msgraph.go/gen DO NOT EDIT.
     2  
     3  package msgraph
     4  
     5  import "context"
     6  
     7  // WindowsInformationProtectionRequestBuilder is request builder for WindowsInformationProtection
     8  type WindowsInformationProtectionRequestBuilder struct{ BaseRequestBuilder }
     9  
    10  // Request returns WindowsInformationProtectionRequest
    11  func (b *WindowsInformationProtectionRequestBuilder) Request() *WindowsInformationProtectionRequest {
    12  	return &WindowsInformationProtectionRequest{
    13  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
    14  	}
    15  }
    16  
    17  // WindowsInformationProtectionRequest is request for WindowsInformationProtection
    18  type WindowsInformationProtectionRequest struct{ BaseRequest }
    19  
    20  // Get performs GET request for WindowsInformationProtection
    21  func (r *WindowsInformationProtectionRequest) Get(ctx context.Context) (resObj *WindowsInformationProtection, 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 WindowsInformationProtection
    31  func (r *WindowsInformationProtectionRequest) Update(ctx context.Context, reqObj *WindowsInformationProtection) error {
    32  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
    33  }
    34  
    35  // Delete performs DELETE request for WindowsInformationProtection
    36  func (r *WindowsInformationProtectionRequest) Delete(ctx context.Context) error {
    37  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
    38  }
    39  
    40  // WindowsInformationProtectionAppLearningSummaryRequestBuilder is request builder for WindowsInformationProtectionAppLearningSummary
    41  type WindowsInformationProtectionAppLearningSummaryRequestBuilder struct{ BaseRequestBuilder }
    42  
    43  // Request returns WindowsInformationProtectionAppLearningSummaryRequest
    44  func (b *WindowsInformationProtectionAppLearningSummaryRequestBuilder) Request() *WindowsInformationProtectionAppLearningSummaryRequest {
    45  	return &WindowsInformationProtectionAppLearningSummaryRequest{
    46  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
    47  	}
    48  }
    49  
    50  // WindowsInformationProtectionAppLearningSummaryRequest is request for WindowsInformationProtectionAppLearningSummary
    51  type WindowsInformationProtectionAppLearningSummaryRequest struct{ BaseRequest }
    52  
    53  // Get performs GET request for WindowsInformationProtectionAppLearningSummary
    54  func (r *WindowsInformationProtectionAppLearningSummaryRequest) Get(ctx context.Context) (resObj *WindowsInformationProtectionAppLearningSummary, 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 WindowsInformationProtectionAppLearningSummary
    64  func (r *WindowsInformationProtectionAppLearningSummaryRequest) Update(ctx context.Context, reqObj *WindowsInformationProtectionAppLearningSummary) error {
    65  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
    66  }
    67  
    68  // Delete performs DELETE request for WindowsInformationProtectionAppLearningSummary
    69  func (r *WindowsInformationProtectionAppLearningSummaryRequest) Delete(ctx context.Context) error {
    70  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
    71  }
    72  
    73  // WindowsInformationProtectionAppLockerFileRequestBuilder is request builder for WindowsInformationProtectionAppLockerFile
    74  type WindowsInformationProtectionAppLockerFileRequestBuilder struct{ BaseRequestBuilder }
    75  
    76  // Request returns WindowsInformationProtectionAppLockerFileRequest
    77  func (b *WindowsInformationProtectionAppLockerFileRequestBuilder) Request() *WindowsInformationProtectionAppLockerFileRequest {
    78  	return &WindowsInformationProtectionAppLockerFileRequest{
    79  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
    80  	}
    81  }
    82  
    83  // WindowsInformationProtectionAppLockerFileRequest is request for WindowsInformationProtectionAppLockerFile
    84  type WindowsInformationProtectionAppLockerFileRequest struct{ BaseRequest }
    85  
    86  // Get performs GET request for WindowsInformationProtectionAppLockerFile
    87  func (r *WindowsInformationProtectionAppLockerFileRequest) Get(ctx context.Context) (resObj *WindowsInformationProtectionAppLockerFile, err error) {
    88  	var query string
    89  	if r.query != nil {
    90  		query = "?" + r.query.Encode()
    91  	}
    92  	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
    93  	return
    94  }
    95  
    96  // Update performs PATCH request for WindowsInformationProtectionAppLockerFile
    97  func (r *WindowsInformationProtectionAppLockerFileRequest) Update(ctx context.Context, reqObj *WindowsInformationProtectionAppLockerFile) error {
    98  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
    99  }
   100  
   101  // Delete performs DELETE request for WindowsInformationProtectionAppLockerFile
   102  func (r *WindowsInformationProtectionAppLockerFileRequest) Delete(ctx context.Context) error {
   103  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
   104  }
   105  
   106  // WindowsInformationProtectionNetworkLearningSummaryRequestBuilder is request builder for WindowsInformationProtectionNetworkLearningSummary
   107  type WindowsInformationProtectionNetworkLearningSummaryRequestBuilder struct{ BaseRequestBuilder }
   108  
   109  // Request returns WindowsInformationProtectionNetworkLearningSummaryRequest
   110  func (b *WindowsInformationProtectionNetworkLearningSummaryRequestBuilder) Request() *WindowsInformationProtectionNetworkLearningSummaryRequest {
   111  	return &WindowsInformationProtectionNetworkLearningSummaryRequest{
   112  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
   113  	}
   114  }
   115  
   116  // WindowsInformationProtectionNetworkLearningSummaryRequest is request for WindowsInformationProtectionNetworkLearningSummary
   117  type WindowsInformationProtectionNetworkLearningSummaryRequest struct{ BaseRequest }
   118  
   119  // Get performs GET request for WindowsInformationProtectionNetworkLearningSummary
   120  func (r *WindowsInformationProtectionNetworkLearningSummaryRequest) Get(ctx context.Context) (resObj *WindowsInformationProtectionNetworkLearningSummary, err error) {
   121  	var query string
   122  	if r.query != nil {
   123  		query = "?" + r.query.Encode()
   124  	}
   125  	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
   126  	return
   127  }
   128  
   129  // Update performs PATCH request for WindowsInformationProtectionNetworkLearningSummary
   130  func (r *WindowsInformationProtectionNetworkLearningSummaryRequest) Update(ctx context.Context, reqObj *WindowsInformationProtectionNetworkLearningSummary) error {
   131  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
   132  }
   133  
   134  // Delete performs DELETE request for WindowsInformationProtectionNetworkLearningSummary
   135  func (r *WindowsInformationProtectionNetworkLearningSummaryRequest) Delete(ctx context.Context) error {
   136  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
   137  }
   138  
   139  // WindowsInformationProtectionPolicyRequestBuilder is request builder for WindowsInformationProtectionPolicy
   140  type WindowsInformationProtectionPolicyRequestBuilder struct{ BaseRequestBuilder }
   141  
   142  // Request returns WindowsInformationProtectionPolicyRequest
   143  func (b *WindowsInformationProtectionPolicyRequestBuilder) Request() *WindowsInformationProtectionPolicyRequest {
   144  	return &WindowsInformationProtectionPolicyRequest{
   145  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
   146  	}
   147  }
   148  
   149  // WindowsInformationProtectionPolicyRequest is request for WindowsInformationProtectionPolicy
   150  type WindowsInformationProtectionPolicyRequest struct{ BaseRequest }
   151  
   152  // Get performs GET request for WindowsInformationProtectionPolicy
   153  func (r *WindowsInformationProtectionPolicyRequest) Get(ctx context.Context) (resObj *WindowsInformationProtectionPolicy, err error) {
   154  	var query string
   155  	if r.query != nil {
   156  		query = "?" + r.query.Encode()
   157  	}
   158  	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
   159  	return
   160  }
   161  
   162  // Update performs PATCH request for WindowsInformationProtectionPolicy
   163  func (r *WindowsInformationProtectionPolicyRequest) Update(ctx context.Context, reqObj *WindowsInformationProtectionPolicy) error {
   164  	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
   165  }
   166  
   167  // Delete performs DELETE request for WindowsInformationProtectionPolicy
   168  func (r *WindowsInformationProtectionPolicyRequest) Delete(ctx context.Context) error {
   169  	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
   170  }
   171  
   172  //
   173  type WindowsInformationProtectionAssignRequestBuilder struct{ BaseRequestBuilder }
   174  
   175  // Assign action undocumented
   176  func (b *WindowsInformationProtectionRequestBuilder) Assign(reqObj *WindowsInformationProtectionAssignRequestParameter) *WindowsInformationProtectionAssignRequestBuilder {
   177  	bb := &WindowsInformationProtectionAssignRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
   178  	bb.BaseRequestBuilder.baseURL += "/assign"
   179  	bb.BaseRequestBuilder.requestObject = reqObj
   180  	return bb
   181  }
   182  
   183  //
   184  type WindowsInformationProtectionAssignRequest struct{ BaseRequest }
   185  
   186  //
   187  func (b *WindowsInformationProtectionAssignRequestBuilder) Request() *WindowsInformationProtectionAssignRequest {
   188  	return &WindowsInformationProtectionAssignRequest{
   189  		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
   190  	}
   191  }
   192  
   193  //
   194  func (r *WindowsInformationProtectionAssignRequest) Post(ctx context.Context) error {
   195  	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
   196  }