Skip to content

Commit b02dc1b

Browse files
authored
Merge pull request #105 from microsoftgraph/v1.0/pipelinebuild/112255
Generated models and request builders
2 parents abc8251 + dbe42a4 commit b02dc1b

File tree

4,134 files changed

+16728
-4414
lines changed

Some content is hidden

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

4,134 files changed

+16728
-4414
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.21.0] - 2023-04-06
15+
16+
### Changed
17+
18+
- Weekly generation.
19+
1420
## [0.20.0] - 2023-03-28
1521

1622
### Changed

lib/admin/admin_request_builder.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_relative '../models/admin'
44
require_relative '../models/o_data_errors/o_data_error'
55
require_relative './admin'
6+
require_relative './edge/edge_request_builder'
67
require_relative './service_announcement/service_announcement_request_builder'
78

89
module MicrosoftGraph
@@ -11,6 +12,11 @@ module Admin
1112
# Provides operations to manage the admin singleton.
1213
class AdminRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder
1314

15+
##
16+
# Provides operations to manage the edge property of the microsoft.graph.admin entity.
17+
def edge()
18+
return MicrosoftGraph::Admin::Edge::EdgeRequestBuilder.new(@path_parameters, @request_adapter)
19+
end
1420
##
1521
# Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity.
1622
def service_announcement()
@@ -90,7 +96,7 @@ def to_patch_request_information(body, request_configuration=nil)
9096
request_info.add_headers_from_raw_object(request_configuration.headers)
9197
request_info.add_request_options(request_configuration.options)
9298
end
93-
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
99+
request_info.set_content_from_parsable(@request_adapter, "application/json", body)
94100
return request_info
95101
end
96102

lib/admin/edge/edge.rb

Whitespace-only changes.
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
require 'microsoft_kiota_abstractions'
2+
require_relative '../../microsoft_graph'
3+
require_relative '../../models/edge'
4+
require_relative '../../models/o_data_errors/o_data_error'
5+
require_relative '../admin'
6+
require_relative './edge'
7+
require_relative './internet_explorer_mode/internet_explorer_mode_request_builder'
8+
9+
module MicrosoftGraph
10+
module Admin
11+
module Edge
12+
##
13+
# Provides operations to manage the edge property of the microsoft.graph.admin entity.
14+
class EdgeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder
15+
16+
##
17+
# Provides operations to manage the internetExplorerMode property of the microsoft.graph.edge entity.
18+
def internet_explorer_mode()
19+
return MicrosoftGraph::Admin::Edge::InternetExplorerMode::InternetExplorerModeRequestBuilder.new(@path_parameters, @request_adapter)
20+
end
21+
##
22+
## Instantiates a new EdgeRequestBuilder and sets the default values.
23+
## @param path_parameters Path parameters for the request
24+
## @param request_adapter The request adapter to use to execute the requests.
25+
## @return a void
26+
##
27+
def initialize(path_parameters, request_adapter)
28+
super(path_parameters, request_adapter, "{+baseurl}/admin/edge{?%24select,%24expand}")
29+
end
30+
##
31+
## Delete navigation property edge for admin
32+
## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
33+
## @return a Fiber of void
34+
##
35+
def delete(request_configuration=nil)
36+
request_info = self.to_delete_request_information(
37+
request_configuration
38+
)
39+
error_mapping = Hash.new
40+
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
41+
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
42+
return @request_adapter.send_async(request_info, nil, error_mapping)
43+
end
44+
##
45+
## Get edge from admin
46+
## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
47+
## @return a Fiber of edge
48+
##
49+
def get(request_configuration=nil)
50+
request_info = self.to_get_request_information(
51+
request_configuration
52+
)
53+
error_mapping = Hash.new
54+
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
55+
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
56+
return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Edge.create_from_discriminator_value(pn) }, error_mapping)
57+
end
58+
##
59+
## Update the navigation property edge in admin
60+
## @param body The request body
61+
## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
62+
## @return a Fiber of edge
63+
##
64+
def patch(body, request_configuration=nil)
65+
raise StandardError, 'body cannot be null' if body.nil?
66+
request_info = self.to_patch_request_information(
67+
body, request_configuration
68+
)
69+
error_mapping = Hash.new
70+
error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
71+
error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrors::ODataError.create_from_discriminator_value(pn) }
72+
return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Edge.create_from_discriminator_value(pn) }, error_mapping)
73+
end
74+
##
75+
## Delete navigation property edge for admin
76+
## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
77+
## @return a request_information
78+
##
79+
def to_delete_request_information(request_configuration=nil)
80+
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
81+
request_info.url_template = @url_template
82+
request_info.path_parameters = @path_parameters
83+
request_info.http_method = :DELETE
84+
unless request_configuration.nil?
85+
request_info.add_headers_from_raw_object(request_configuration.headers)
86+
request_info.add_request_options(request_configuration.options)
87+
end
88+
return request_info
89+
end
90+
##
91+
## Get edge from admin
92+
## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
93+
## @return a request_information
94+
##
95+
def to_get_request_information(request_configuration=nil)
96+
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
97+
request_info.url_template = @url_template
98+
request_info.path_parameters = @path_parameters
99+
request_info.http_method = :GET
100+
request_info.headers.add('Accept', 'application/json')
101+
unless request_configuration.nil?
102+
request_info.add_headers_from_raw_object(request_configuration.headers)
103+
request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters)
104+
request_info.add_request_options(request_configuration.options)
105+
end
106+
return request_info
107+
end
108+
##
109+
## Update the navigation property edge in admin
110+
## @param body The request body
111+
## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options.
112+
## @return a request_information
113+
##
114+
def to_patch_request_information(body, request_configuration=nil)
115+
raise StandardError, 'body cannot be null' if body.nil?
116+
request_info = MicrosoftKiotaAbstractions::RequestInformation.new()
117+
request_info.url_template = @url_template
118+
request_info.path_parameters = @path_parameters
119+
request_info.http_method = :PATCH
120+
request_info.headers.add('Accept', 'application/json')
121+
unless request_configuration.nil?
122+
request_info.add_headers_from_raw_object(request_configuration.headers)
123+
request_info.add_request_options(request_configuration.options)
124+
end
125+
request_info.set_content_from_parsable(@request_adapter, "application/json", body)
126+
return request_info
127+
end
128+
129+
##
130+
# Get edge from admin
131+
class EdgeRequestBuilderGetQueryParameters
132+
133+
##
134+
# Expand related entities
135+
attr_accessor :expand
136+
##
137+
# Select properties to be returned
138+
attr_accessor :select
139+
##
140+
## Maps the query parameters names to their encoded names for the URI template parsing.
141+
## @param original_name The original query parameter name in the class.
142+
## @return a string
143+
##
144+
def get_query_parameter(original_name)
145+
raise StandardError, 'original_name cannot be null' if original_name.nil?
146+
case original_name
147+
when "expand"
148+
return "%24expand"
149+
when "select"
150+
return "%24select"
151+
else
152+
return original_name
153+
end
154+
end
155+
end
156+
end
157+
end
158+
end
159+
end

lib/admin/edge/internet_explorer_mode/internet_explorer_mode.rb

Whitespace-only changes.

0 commit comments

Comments
 (0)