summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/yaegashi/msgraph.go/beta/RequestDomain.go
blob: 37a926acb8a8ad52719e743fba0061fbd36068d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// Code generated by msgraph-generate.go DO NOT EDIT.

package msgraph

import "context"

// DomainRequestBuilder is request builder for Domain
type DomainRequestBuilder struct{ BaseRequestBuilder }

// Request returns DomainRequest
func (b *DomainRequestBuilder) Request() *DomainRequest {
	return &DomainRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// DomainRequest is request for Domain
type DomainRequest struct{ BaseRequest }

// Get performs GET request for Domain
func (r *DomainRequest) Get(ctx context.Context) (resObj *Domain, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for Domain
func (r *DomainRequest) Update(ctx context.Context, reqObj *Domain) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for Domain
func (r *DomainRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

// DomainDNSRecordRequestBuilder is request builder for DomainDNSRecord
type DomainDNSRecordRequestBuilder struct{ BaseRequestBuilder }

// Request returns DomainDNSRecordRequest
func (b *DomainDNSRecordRequestBuilder) Request() *DomainDNSRecordRequest {
	return &DomainDNSRecordRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// DomainDNSRecordRequest is request for DomainDNSRecord
type DomainDNSRecordRequest struct{ BaseRequest }

// Get performs GET request for DomainDNSRecord
func (r *DomainDNSRecordRequest) Get(ctx context.Context) (resObj *DomainDNSRecord, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for DomainDNSRecord
func (r *DomainDNSRecordRequest) Update(ctx context.Context, reqObj *DomainDNSRecord) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for DomainDNSRecord
func (r *DomainDNSRecordRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

// DomainSecurityProfileRequestBuilder is request builder for DomainSecurityProfile
type DomainSecurityProfileRequestBuilder struct{ BaseRequestBuilder }

// Request returns DomainSecurityProfileRequest
func (b *DomainSecurityProfileRequestBuilder) Request() *DomainSecurityProfileRequest {
	return &DomainSecurityProfileRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// DomainSecurityProfileRequest is request for DomainSecurityProfile
type DomainSecurityProfileRequest struct{ BaseRequest }

// Get performs GET request for DomainSecurityProfile
func (r *DomainSecurityProfileRequest) Get(ctx context.Context) (resObj *DomainSecurityProfile, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for DomainSecurityProfile
func (r *DomainSecurityProfileRequest) Update(ctx context.Context, reqObj *DomainSecurityProfile) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for DomainSecurityProfile
func (r *DomainSecurityProfileRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

//
type DomainForceDeleteRequestBuilder struct{ BaseRequestBuilder }

// ForceDelete action undocumented
func (b *DomainRequestBuilder) ForceDelete(reqObj *DomainForceDeleteRequestParameter) *DomainForceDeleteRequestBuilder {
	bb := &DomainForceDeleteRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/forceDelete"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type DomainForceDeleteRequest struct{ BaseRequest }

//
func (b *DomainForceDeleteRequestBuilder) Request() *DomainForceDeleteRequest {
	return &DomainForceDeleteRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *DomainForceDeleteRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type DomainVerifyRequestBuilder struct{ BaseRequestBuilder }

// Verify action undocumented
func (b *DomainRequestBuilder) Verify(reqObj *DomainVerifyRequestParameter) *DomainVerifyRequestBuilder {
	bb := &DomainVerifyRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/verify"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type DomainVerifyRequest struct{ BaseRequest }

//
func (b *DomainVerifyRequestBuilder) Request() *DomainVerifyRequest {
	return &DomainVerifyRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *DomainVerifyRequest) Post(ctx context.Context) (resObj *Domain, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}