Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 0ab4780

Browse files
authored
Merge pull request #91 from microsoftgraph/v1.0/pipelinebuild/105464
Generated v1.0 models and request builders using Kiota
2 parents 1950c9f + 1d243ce commit 0ab4780

File tree

19,088 files changed

+1481241
-1375183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

19,088 files changed

+1481241
-1375183
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
## [0.15.0] - 2023-02-09
15+
16+
### Changed
17+
18+
- Changed the module declaration so the package also work with Rails import logic.
19+
1420
## [0.14.0] - 2023-02-07
1521

1622
### Changed

lib/admin/admin.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
module MicrosoftGraph::Admin
2-
end

lib/admin/admin_request_builder.rb

Lines changed: 145 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -5,161 +5,163 @@
55
require_relative './admin'
66
require_relative './service_announcement/service_announcement_request_builder'
77

8-
module MicrosoftGraph::Admin
9-
##
10-
# Provides operations to manage the admin singleton.
11-
class AdminRequestBuilder
12-
8+
module MicrosoftGraph
9+
module Admin
1310
##
14-
# Path parameters for the request
15-
@path_parameters
16-
##
17-
# The request adapter to use to execute the requests.
18-
@request_adapter
19-
##
20-
# Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity.
21-
def service_announcement()
22-
return MicrosoftGraph::Admin::ServiceAnnouncement::ServiceAnnouncementRequestBuilder.new(@path_parameters, @request_adapter)
23-
end
24-
##
25-
# Url template to use to build the URL for the current request builder
26-
@url_template
27-
##
28-
## Instantiates a new AdminRequestBuilder and sets the default values.
29-
## @param pathParameters Path parameters for the request
30-
## @param requestAdapter The request adapter to use to execute the requests.
31-
## @return a void
32-
##
33-
def initialize(path_parameters, request_adapter)
34-
raise StandardError, 'path_parameters cannot be null' if path_parameters.nil?
35-
raise StandardError, 'request_adapter cannot be null' if request_adapter.nil?
36-
@url_template = "{+baseurl}/admin{?%24select,%24expand}"
37-
@request_adapter = request_adapter
38-
path_parameters = { "request-raw-url" => path_parameters } if path_parameters.is_a? String
39-
@path_parameters = path_parameters if path_parameters.is_a? Hash
40-
end
41-
##
42-
## Get admin
43-
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
44-
## @return a Fiber of admin
45-
##
46-
def get(request_configuration=nil)
47-
request_info = self.to_get_request_information(
48-
request_configuration
49-
)
50-
error_mapping = Hash.new
51-
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
52-
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
53-
return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Admin.create_from_discriminator_value(pn) }, error_mapping)
54-
end
55-
##
56-
## Update admin
57-
## @param body The request body
58-
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
59-
## @return a Fiber of admin
60-
##
61-
def patch(body, request_configuration=nil)
62-
raise StandardError, 'body cannot be null' if body.nil?
63-
request_info = self.to_patch_request_information(
64-
body, request_configuration
65-
)
66-
error_mapping = Hash.new
67-
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
68-
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
69-
return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Admin.create_from_discriminator_value(pn) }, error_mapping)
70-
end
71-
##
72-
## Get admin
73-
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
74-
## @return a request_information
75-
##
76-
def to_get_request_information(request_configuration=nil)
77-
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
78-
request_info.url_template = @url_template
79-
request_info.path_parameters = @path_parameters
80-
request_info.http_method = :GET
81-
request_info.headers.add('Accept', 'application/json')
82-
unless request_configuration.nil?
83-
request_info.add_headers_from_raw_object(request_configuration.headers)
84-
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
85-
request_info.add_request_options(request_configuration.options)
11+
# Provides operations to manage the admin singleton.
12+
class AdminRequestBuilder
13+
14+
##
15+
# Path parameters for the request
16+
@path_parameters
17+
##
18+
# The request adapter to use to execute the requests.
19+
@request_adapter
20+
##
21+
# Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity.
22+
def service_announcement()
23+
return MicrosoftGraph::Admin::ServiceAnnouncement::ServiceAnnouncementRequestBuilder.new(@path_parameters, @request_adapter)
8624
end
87-
return request_info
88-
end
89-
##
90-
## Update admin
91-
## @param body The request body
92-
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
93-
## @return a request_information
94-
##
95-
def to_patch_request_information(body, request_configuration=nil)
96-
raise StandardError, 'body cannot be null' if body.nil?
97-
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
98-
request_info.url_template = @url_template
99-
request_info.path_parameters = @path_parameters
100-
request_info.http_method = :PATCH
101-
request_info.headers.add('Accept', 'application/json')
102-
unless request_configuration.nil?
103-
request_info.add_headers_from_raw_object(request_configuration.headers)
104-
request_info.add_request_options(request_configuration.options)
25+
##
26+
# Url template to use to build the URL for the current request builder
27+
@url_template
28+
##
29+
## Instantiates a new AdminRequestBuilder and sets the default values.
30+
## @param pathParameters Path parameters for the request
31+
## @param requestAdapter The request adapter to use to execute the requests.
32+
## @return a void
33+
##
34+
def initialize(path_parameters, request_adapter)
35+
raise StandardError, 'path_parameters cannot be null' if path_parameters.nil?
36+
raise StandardError, 'request_adapter cannot be null' if request_adapter.nil?
37+
@url_template = "{+baseurl}/admin{?%24select,%24expand}"
38+
@request_adapter = request_adapter
39+
path_parameters = { "request-raw-url" => path_parameters } if path_parameters.is_a? String
40+
@path_parameters = path_parameters if path_parameters.is_a? Hash
10541
end
106-
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
107-
return request_info
108-
end
109-
110-
##
111-
# Get admin
112-
class AdminRequestBuilderGetQueryParameters
113-
11442
##
115-
# Expand related entities
116-
attr_accessor :expand
117-
##
118-
# Select properties to be returned
119-
attr_accessor :select
120-
##
121-
## Maps the query parameters names to their encoded names for the URI template parsing.
122-
## @param originalName The original query parameter name in the class.
123-
## @return a string
124-
##
125-
def get_query_parameter(original_name)
126-
raise StandardError, 'original_name cannot be null' if original_name.nil?
127-
case original_name
128-
when "expand"
129-
return "%24expand"
130-
when "select"
131-
return "%24select"
132-
else
133-
return original_name
43+
## Get admin
44+
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
45+
## @return a Fiber of admin
46+
##
47+
def get(request_configuration=nil)
48+
request_info = self.to_get_request_information(
49+
request_configuration
50+
)
51+
error_mapping = Hash.new
52+
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
53+
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
54+
return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Admin.create_from_discriminator_value(pn) }, error_mapping)
55+
end
56+
##
57+
## Update admin
58+
## @param body The request body
59+
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
60+
## @return a Fiber of admin
61+
##
62+
def patch(body, request_configuration=nil)
63+
raise StandardError, 'body cannot be null' if body.nil?
64+
request_info = self.to_patch_request_information(
65+
body, request_configuration
66+
)
67+
error_mapping = Hash.new
68+
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
69+
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
70+
return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Admin.create_from_discriminator_value(pn) }, error_mapping)
71+
end
72+
##
73+
## Get admin
74+
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
75+
## @return a request_information
76+
##
77+
def to_get_request_information(request_configuration=nil)
78+
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
79+
request_info.url_template = @url_template
80+
request_info.path_parameters = @path_parameters
81+
request_info.http_method = :GET
82+
request_info.headers.add('Accept', 'application/json')
83+
unless request_configuration.nil?
84+
request_info.add_headers_from_raw_object(request_configuration.headers)
85+
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
86+
request_info.add_request_options(request_configuration.options)
13487
end
88+
return request_info
13589
end
136-
end
137-
138-
##
139-
# Configuration for the request such as headers, query parameters, and middleware options.
140-
class AdminRequestBuilderGetRequestConfiguration
141-
14290
##
143-
# Request headers
144-
attr_accessor :headers
91+
## Update admin
92+
## @param body The request body
93+
## @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
94+
## @return a request_information
14595
##
146-
# Request options
147-
attr_accessor :options
96+
def to_patch_request_information(body, request_configuration=nil)
97+
raise StandardError, 'body cannot be null' if body.nil?
98+
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
99+
request_info.url_template = @url_template
100+
request_info.path_parameters = @path_parameters
101+
request_info.http_method = :PATCH
102+
request_info.headers.add('Accept', 'application/json')
103+
unless request_configuration.nil?
104+
request_info.add_headers_from_raw_object(request_configuration.headers)
105+
request_info.add_request_options(request_configuration.options)
106+
end
107+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
108+
return request_info
109+
end
110+
148111
##
149-
# Request query parameters
150-
attr_accessor :query_parameters
151-
end
112+
# Get admin
113+
class AdminRequestBuilderGetQueryParameters
114+
115+
##
116+
# Expand related entities
117+
attr_accessor :expand
118+
##
119+
# Select properties to be returned
120+
attr_accessor :select
121+
##
122+
## Maps the query parameters names to their encoded names for the URI template parsing.
123+
## @param originalName The original query parameter name in the class.
124+
## @return a string
125+
##
126+
def get_query_parameter(original_name)
127+
raise StandardError, 'original_name cannot be null' if original_name.nil?
128+
case original_name
129+
when "expand"
130+
return "%24expand"
131+
when "select"
132+
return "%24select"
133+
else
134+
return original_name
135+
end
136+
end
137+
end
152138

153-
##
154-
# Configuration for the request such as headers, query parameters, and middleware options.
155-
class AdminRequestBuilderPatchRequestConfiguration
156-
157139
##
158-
# Request headers
159-
attr_accessor :headers
140+
# Configuration for the request such as headers, query parameters, and middleware options.
141+
class AdminRequestBuilderGetRequestConfiguration
142+
143+
##
144+
# Request headers
145+
attr_accessor :headers
146+
##
147+
# Request options
148+
attr_accessor :options
149+
##
150+
# Request query parameters
151+
attr_accessor :query_parameters
152+
end
153+
160154
##
161-
# Request options
162-
attr_accessor :options
155+
# Configuration for the request such as headers, query parameters, and middleware options.
156+
class AdminRequestBuilderPatchRequestConfiguration
157+
158+
##
159+
# Request headers
160+
attr_accessor :headers
161+
##
162+
# Request options
163+
attr_accessor :options
164+
end
163165
end
164166
end
165167
end
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
module MicrosoftGraph::Admin::ServiceAnnouncement::HealthOverviews::Count
2-
end

0 commit comments

Comments
 (0)